diff options
Diffstat (limited to 'daemon/gdm-display-access-file.c')
-rw-r--r-- | daemon/gdm-display-access-file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c index 36258a11..ed0a146d 100644 --- a/daemon/gdm-display-access-file.c +++ b/daemon/gdm-display-access-file.c @@ -278,7 +278,15 @@ _create_xauth_file_for_user (const char *username, } g_chmod (GDM_XAUTH_DIR, 0711); - _get_uid_and_gid_for_user (GDM_USERNAME, &uid, &gid); + if (!_get_uid_and_gid_for_user (GDM_USERNAME, &uid, &gid)) { + g_set_error (error, + GDM_DISPLAY_ERROR, + GDM_DISPLAY_ERROR_GETTING_USER_INFO, + _("Could not find user ā%sā on system"), + GDM_USERNAME); + goto out; + } + if (chown (GDM_XAUTH_DIR, 0, gid) != 0) { g_warning ("Unable to change owner of '%s'", GDM_XAUTH_DIR); |