summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-userdb.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2005-01-16 22:13:35 +0000
committerHavoc Pennington <hp@redhat.com>2005-01-16 22:13:35 +0000
commit7f9721a6d36697a57170c604aa845af3531bd157 (patch)
tree4c621bf9671e8c855803bba07ff2d6d87b9baf3d /dbus/dbus-userdb.c
parent31988af4089f3793940417535f8eabaae1ac26c8 (diff)
2005-01-16 Havoc Pennington <hp@redhat.com>
* 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
Diffstat (limited to 'dbus/dbus-userdb.c')
-rw-r--r--dbus/dbus-userdb.c43
1 files changed, 1 insertions, 42 deletions
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,
@@ -400,47 +400,6 @@ _dbus_get_user_id (const DBusString *username,
}
/**
- * 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
*
* @param groupname the groupname