diff options
author | Ray Strode <rstrode@redhat.com> | 2013-10-01 10:50:46 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-10-08 10:56:35 -0400 |
commit | 631c57790fe79ee70d79522eb1b3e461e2899d82 (patch) | |
tree | 5b1664520966745f69b7f530a9230eb7a5f4ced6 | |
parent | 0a7e6f638e643fca3e08c3cf47fbc7aa3c5c1582 (diff) |
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
-rw-r--r-- | src/user.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 { |