diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-18 12:35:05 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-18 12:35:05 -0500 |
commit | c9e0ebffe5cb3787c5437bd6ad8482ed8a432ddb (patch) | |
tree | 9aecd6278fab5fcf5ad1f95f922ce63cac5d0f8c /src/users-service-dbus.c | |
parent | a8bf2f6f5c84909c70a890712bc8b27683a457d7 (diff) | |
download | ayatana-indicator-session-c9e0ebffe5cb3787c5437bd6ad8482ed8a432ddb.tar.gz ayatana-indicator-session-c9e0ebffe5cb3787c5437bd6ad8482ed8a432ddb.tar.bz2 ayatana-indicator-session-c9e0ebffe5cb3787c5437bd6ad8482ed8a432ddb.zip |
clearing house: the remainder of bugfixes & readability changes
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r-- | src/users-service-dbus.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index 57cc3a6..8a050fc 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -30,13 +30,13 @@ #include <pwd.h> /* getpwuid() */ -#include "dbus-shared-names.h" #include "dbus-accounts.h" #include "dbus-consolekit-manager.h" #include "dbus-consolekit-seat.h" #include "dbus-consolekit-session.h" #include "dbus-display-manager.h" #include "dbus-user.h" +#include "shared-names.h" #include "users-service-dbus.h" #define CK_ADDR "org.freedesktop.ConsoleKit" @@ -326,7 +326,6 @@ create_consolekit_session_proxy (const char * ssid) ssid, NULL, &error); - if (error != NULL) { g_warning ("%s: %s", G_STRLOC, error->message); @@ -644,7 +643,6 @@ update_user_list (UsersServiceDbus *self) GError * error = NULL; char ** object_paths = NULL; UsersServiceDbusPrivate * priv = self->priv; - g_debug ("%s updating the user list", G_STRLOC); accounts_call_list_cached_users_sync (priv->accounts_proxy, &object_paths, @@ -680,7 +678,7 @@ on_user_added (Accounts * o G_GNUC_UNUSED, { /* We see a new user but we might not want to list it -- for example, lightdm shows up when we switch to the greeter. - So instead of adding the user directly here, let's ask + So instead of adding the user directly here, let's ask org.freedesktop.Accounts for a fresh list of users because it filters out special cases. */ update_user_list (service); @@ -790,7 +788,7 @@ get_unix_username_from_ssid (UsersServiceDbus * self, g_warning ("Failed to lookup user id %d: %s", (int)uid, g_strerror(errno)); } else - { + { username = g_strdup (pwent->pw_name); } } @@ -807,7 +805,7 @@ is_guest_username (const char * username) if (!g_strcmp0 (username, "guest")) return TRUE; - if ((strlen(username)==12) && !memcmp(username,"guest-",6)) + if (username && (strlen(username)==12) && !memcmp(username,"guest-",6)) return TRUE; return FALSE; |