From 631c57790fe79ee70d79522eb1b3e461e2899d82 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 1 Oct 2013 10:50:46 -0400 Subject: user: treat NULL shadow entry as "password handled remotely" Right now we set the password mode of a user based on the password hash in shadow. SSSD (and other remote login facilities presumably) don't send the password hash over the wire to the client, but of course those users do have a password set. This commit changes the code to notice when there's no shadow entry for a user and treat that case conservatively (assume user has a password). Related to: https://bugzilla.gnome.org/show_bug.cgi?id=708997 https://bugs.freedesktop.org/show_bug.cgi?id=70005 --- src/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user.c b/src/user.c index 1f28e78..76cb470 100644 --- a/src/user.c +++ b/src/user.c @@ -271,7 +271,7 @@ user_update_from_pwent (User *user, g_object_notify (G_OBJECT (user), "locked"); } - if (passwd && passwd[0] != 0) { + if (passwd == NULL || passwd[0] != 0) { mode = PASSWORD_MODE_REGULAR; } else { -- cgit v1.2.3