Files
RedBear-OS/local/recipes/system/dbus/source/dbus/dbus-userdb.h
T
vasilito f31522130f fix: comprehensive boot warnings and exceptions — fixable silenced, unfixable diagnosed
Build system (5 gaps hardened):
- COOKBOOK_OFFLINE defaults to true (fork-mode)
- normalize_patch handles diff -ruN format
- New 'repo validate-patches' command (25/25 relibc patches)
- 14 patched Qt/Wayland/display recipes added to protected list
- relibc archive regenerated with current patch chain

Boot fixes (fixable):
- Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset)
- D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped)
- redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped)
- daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch)
- udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async)
- relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs
- greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait)
- greeter-ui: built and linked (header guard unification, sem_compat stubs removed)
- mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps
- greeter config: removed stale keymapd dependency from display/greeter services
- prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified

Unfixable (diagnosed, upstream):
- i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort
- kded6/greeter-ui: page fault 0x8 — Qt library null deref
- Thread panics fd != -1 — Rust std library on Redox
- DHCP timeout / eth0 MAC — QEMU user-mode networking
- hwrngd/thermald — no hardware RNG/thermal in VM
- live preload allocation — BIOS memory fragmentation, continues on demand
2026-05-05 20:20:37 +01:00

125 lines
5.3 KiB
C

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* dbus-userdb.h User database abstraction
*
* Copyright (C) 2003 Red Hat, Inc.
*
* SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later
*
* Licensed under the Academic Free License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef DBUS_USERDB_H
#define DBUS_USERDB_H
#include <dbus/dbus-sysdeps-unix.h>
#ifdef DBUS_WIN
#error "Don't include this on Windows"
#endif
DBUS_BEGIN_DECLS
typedef struct DBusUserDatabase DBusUserDatabase;
#ifdef DBUS_USERDB_INCLUDES_PRIVATE
#include <dbus/dbus-hash.h>
/**
* Internals of DBusUserDatabase
*/
struct DBusUserDatabase
{
int refcount; /**< Reference count */
DBusHashTable *users; /**< Users in the database by UID */
DBusHashTable *groups; /**< Groups in the database by GID */
DBusHashTable *users_by_name; /**< Users in the database by name */
DBusHashTable *groups_by_name; /**< Groups in the database by name */
};
DBusUserDatabase* _dbus_user_database_new (void);
DBusUserDatabase* _dbus_user_database_ref (DBusUserDatabase *db);
void _dbus_user_database_flush (DBusUserDatabase *db);
void _dbus_user_database_unref (DBusUserDatabase *db);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_user_database_get_uid (DBusUserDatabase *db,
dbus_uid_t uid,
const DBusUserInfo **info,
DBusError *error);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_user_database_get_username (DBusUserDatabase *db,
const DBusString *username,
const DBusUserInfo **info,
DBusError *error);
DBUS_PRIVATE_EXPORT
const DBusUserInfo *_dbus_user_database_lookup (DBusUserDatabase *db,
dbus_uid_t uid,
const DBusString *username,
DBusError *error);
DBUS_PRIVATE_EXPORT
const DBusGroupInfo* _dbus_user_database_lookup_group (DBusUserDatabase *db,
dbus_gid_t gid,
const DBusString *groupname,
DBusError *error);
void _dbus_user_info_unref (DBusUserInfo *info);
DBUS_PRIVATE_EXPORT
void _dbus_group_info_unref (DBusGroupInfo *info);
#endif /* DBUS_USERDB_INCLUDES_PRIVATE */
DBUS_PRIVATE_EXPORT
DBusUserDatabase* _dbus_user_database_get_system (void);
DBUS_PRIVATE_EXPORT _DBUS_WARN_UNUSED_RESULT
dbus_bool_t _dbus_user_database_lock_system (void);
DBUS_PRIVATE_EXPORT
void _dbus_user_database_unlock_system (void);
void _dbus_user_database_flush_system (void);
dbus_bool_t _dbus_get_user_id (const DBusString *username,
dbus_uid_t *uid);
dbus_bool_t _dbus_get_group_id (const DBusString *group_name,
dbus_gid_t *gid);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_get_user_id_and_primary_group (const DBusString *username,
dbus_uid_t *uid_p,
dbus_gid_t *gid_p);
dbus_bool_t _dbus_groups_from_uid (dbus_uid_t uid,
dbus_gid_t **group_ids,
int *n_group_ids,
DBusError *error);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_is_console_user (dbus_uid_t uid,
DBusError *error);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_is_a_number (const DBusString *str,
unsigned long *num);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_username_from_current_process (const DBusString **username);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_homedir_from_current_process (const DBusString **homedir);
dbus_bool_t _dbus_homedir_from_uid (dbus_uid_t uid,
DBusString *homedir);
DBUS_END_DECLS
#endif /* DBUS_USERDB_H */