summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-01-08 11:46:24 -0500
committerRay Strode <rstrode@redhat.com>2014-01-08 11:50:42 -0500
commit29def8761bbac04cf84c7f83722bed447d5d03c6 (patch)
treea2215d32c25c6dbd6e157004a176eb1647cbf0e7
parent60c531fcd0c961e213c8c2bfc288c71f9750171f (diff)
downloadgdm-29def8761bbac04cf84c7f83722bed447d5d03c6.tar.gz
worker: ignore '' username
Some PAM modules set a "" username to mean "user not set yet", apparently, instead of NULL. This commit guards against that to prevent a crash. Red-Hat-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=965370 https://bugzilla.gnome.org/show_bug.cgi?id=721803
-rw-r--r--daemon/gdm-session-worker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 8c4dc3ab..f2850133 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -655,6 +655,7 @@ gdm_session_worker_update_username (GdmSessionWorker *worker)
* to keep trying to read settings)
*/
if (worker->priv->username != NULL &&
+ worker->priv->username[0] != '\0' &&
!gdm_session_settings_is_loaded (worker->priv->user_settings)) {
attempt_to_load_user_settings (worker, worker->priv->username);
}