summaryrefslogtreecommitdiff
path: root/pam_gdm
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-01-08 13:50:39 -0500
committerRay Strode <rstrode@redhat.com>2018-01-08 15:54:01 -0500
commit250dd691b286be7ed72bc7149bf2065a1b0b233c (patch)
tree50a745d979ab56aacbde419bca58aeae721045f3 /pam_gdm
parentbf0a66405dae3fadef187e72e41406f816f1d2e1 (diff)
downloadgdm-250dd691b286be7ed72bc7149bf2065a1b0b233c.tar.gz
pam_gdm: bail if more than one password
it's possible for different disks to have different encryption passwords at startup. In that case, we won't know which one to use, so bail. https://bugzilla.gnome.org/show_bug.cgi?id=792339
Diffstat (limited to 'pam_gdm')
-rw-r--r--pam_gdm/pam_gdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pam_gdm/pam_gdm.c b/pam_gdm/pam_gdm.c
index d87c91b7..767a6c8c 100644
--- a/pam_gdm/pam_gdm.c
+++ b/pam_gdm/pam_gdm.c
@@ -47,7 +47,7 @@ pam_sm_authenticate (pam_handle_t *pamh,
return PAM_AUTHINFO_UNAVAIL;
r = keyctl_read_alloc (serial, &cached_password);
- if (r < 0)
+ if (r < 0 || r != strlen (cached_password))
return PAM_AUTHINFO_UNAVAIL;
r = pam_set_item (pamh, PAM_AUTHTOK, cached_password);