summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-04-09 15:40:48 -0400
committerRay Strode <rstrode@redhat.com>2012-04-09 15:40:48 -0400
commit4df3dea6b59445be769ae16fef6d206695190b7a (patch)
tree0ee75d88b2775288af5afbb456fbf24ce08442b3
parentfd1498bce1cb2d9653c5fc575659a1139a5f87fe (diff)
downloadgdm-4df3dea6b59445be769ae16fef6d206695190b7a.tar.gz
welcome: more seat_id fixes
Two commits ago I tried to only strip the consolekit prefix off the seat id, if there was a consolekit prefix. In the process I ended up not initializing the seat_id variable at all in the non-consolekit case. This commit fixes that.
-rw-r--r--daemon/gdm-welcome-session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/gdm-welcome-session.c b/daemon/gdm-welcome-session.c
index d0ca4e6c..778d5dce 100644
--- a/daemon/gdm-welcome-session.c
+++ b/daemon/gdm-welcome-session.c
@@ -308,8 +308,9 @@ build_welcome_environment (GdmWelcomeSession *welcome_session,
if (start_session && welcome_session->priv->x11_display_seat_id != NULL) {
char *seat_id;
- if (g_str_has_prefix (welcome_session->priv->x11_display_seat_id, "/org/freedesktop/ConsoleKit/")) {
- seat_id = welcome_session->priv->x11_display_seat_id + strlen ("/org/freedesktop/ConsoleKit/");
+ seat_id = welcome_session->priv->x11_display_seat_id;
+ if (g_str_has_prefix (seat_id, "/org/freedesktop/ConsoleKit/")) {
+ seat_id += strlen ("/org/freedesktop/ConsoleKit/");
}
g_hash_table_insert (hash, g_strdup ("GDM_SEAT_ID"), g_strdup (seat_id));