27 #include <dbus/dbus-sysdeps-unix.h> 30 #error "Don't include this on Windows" 35 typedef struct DBusUserDatabase DBusUserDatabase;
37 #ifdef DBUS_USERDB_INCLUDES_PRIVATE 38 #include <dbus/dbus-hash.h> 43 struct DBusUserDatabase
56 DBusUserDatabase* _dbus_user_database_ref (DBusUserDatabase *db);
DBusUserInfo * _dbus_user_database_lookup(DBusUserDatabase *db, dbus_uid_t uid, const DBusString *username, DBusError *error)
Looks up a uid or username in the user database.
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
dbus_bool_t _dbus_groups_from_uid(dbus_uid_t uid, dbus_gid_t **group_ids, int *n_group_ids)
Gets all groups corresponding to the given UID.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_user_database_lock_system(void) _DBUS_GNUC_WARN_UNUSED_RESULT
Locks global system user database.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_is_console_user(dbus_uid_t uid, DBusError *error)
Checks to see if the UID sent in is the console user.
void _dbus_user_database_flush_system(void)
Flushes the system global user database;.
dbus_bool_t _dbus_homedir_from_username(const DBusString *username, DBusString *homedir)
Gets the home directory for the given user.
void _dbus_user_database_flush(DBusUserDatabase *db)
Flush all information out of the user database.
dbus_bool_t _dbus_user_database_get_uid(DBusUserDatabase *db, dbus_uid_t uid, const DBusUserInfo **info, DBusError *error)
Gets the user information for the given UID, returned user info should not be freed.
DBUS_PRIVATE_EXPORT void _dbus_user_database_unlock_system(void)
Unlocks global system user database.
dbus_bool_t _dbus_user_database_get_groupname(DBusUserDatabase *db, const DBusString *groupname, const DBusGroupInfo **info, DBusError *error)
Gets the user information for the given group name, returned group info should not be freed...
void _dbus_user_info_free_allocated(DBusUserInfo *info)
Frees the given DBusUserInfo's members with _dbus_user_info_free() and also calls dbus_free() on the ...
DBUS_PRIVATE_EXPORT DBusUserDatabase * _dbus_user_database_get_system(void)
Gets the system global user database; must be called with lock held (_dbus_user_database_lock_system(...
dbus_bool_t _dbus_homedir_from_uid(dbus_uid_t uid, DBusString *homedir)
Gets the home directory for the given user.
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)
Gets user ID and primary group given username.
dbus_bool_t _dbus_user_database_get_gid(DBusUserDatabase *db, dbus_gid_t gid, const DBusGroupInfo **info, DBusError *error)
Gets the user information for the given GID, returned group info should not be freed.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_is_a_number(const DBusString *str, unsigned long *num)
Checks if a given string is actually a number and converts it if it is.
void _dbus_group_info_free_allocated(DBusGroupInfo *info)
Frees the given DBusGroupInfo's members with _dbus_group_info_free() and also calls dbus_free() on th...
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
DBusGroupInfo * _dbus_user_database_lookup_group(DBusUserDatabase *db, dbus_gid_t gid, const DBusString *groupname, DBusError *error)
Looks up a gid or group name in the user database.
dbus_bool_t _dbus_get_group_id(const DBusString *group_name, dbus_gid_t *gid)
Gets group ID given groupname.
Object representing an exception.
DBusUserDatabase * _dbus_user_database_new(void)
Creates a new user database object used to look up and cache user information.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_homedir_from_current_process(const DBusString **homedir)
Gets homedir of user owning current process.
Information about a UNIX group.
dbus_bool_t _dbus_get_user_id(const DBusString *username, dbus_uid_t *uid)
Gets user ID given username.
Internals of DBusHashTable.
dbus_bool_t _dbus_user_database_get_username(DBusUserDatabase *db, const DBusString *username, const DBusUserInfo **info, DBusError *error)
Gets the user information for the given username.
unsigned long dbus_gid_t
A group ID.
void _dbus_user_database_unref(DBusUserDatabase *db)
Decrements refcount of user database.
unsigned long dbus_uid_t
A user ID.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_username_from_current_process(const DBusString **username)
Gets username of user owning current process.
Information about a UNIX user.
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.