From 7f9721a6d36697a57170c604aa845af3531bd157 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 16 Jan 2005 22:13:35 +0000 Subject: 2005-01-16 Havoc Pennington * test/unused-code-gc.py: hacky script to find code that's used only by the bus (not libdbus) or used only by tests or not used at all. It has some false alarms, but looks like we can clean up a lot of size from libdbus. * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c, dbus/Makefile.am: initially move 10K of binary size out of libdbus --- dbus/dbus-userdb.c | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'dbus/dbus-userdb.c') diff --git a/dbus/dbus-userdb.c b/dbus/dbus-userdb.c index d8477cd2..aa9aaf2a 100644 --- a/dbus/dbus-userdb.c +++ b/dbus/dbus-userdb.c @@ -65,7 +65,7 @@ free_group_info (void *data) dbus_free (info); } -static DBusUserInfo* +DBusUserInfo* _dbus_user_database_lookup (DBusUserDatabase *db, dbus_uid_t uid, const DBusString *username, @@ -399,47 +399,6 @@ _dbus_get_user_id (const DBusString *username, return TRUE; } -/** - * Checks to see if the UID sent in is the console user - * - * @param uid UID of person to check - * @param error return location for errors - * @returns #TRUE if the UID is the same as the console user and there are no errors - */ -dbus_bool_t -_dbus_is_console_user (dbus_uid_t uid, - DBusError *error) -{ - - DBusUserDatabase *db; - const DBusUserInfo *info; - dbus_bool_t result = FALSE; - - _dbus_user_database_lock_system (); - - db = _dbus_user_database_get_system (); - if (db == NULL) - { - dbus_set_error (error, DBUS_ERROR_FAILED, "Could not get system database."); - _dbus_user_database_unlock_system (); - return FALSE; - } - - info = _dbus_user_database_lookup (db, uid, NULL, error); - - if (info == NULL) - { - _dbus_user_database_unlock_system (); - return FALSE; - } - - result = _dbus_user_at_console (info->username, error); - - _dbus_user_database_unlock_system (); - - return result; -} - /** * Gets group ID given groupname * -- cgit