From: Thorsten Kukuk Date: Tue, 25 Nov 2008 13:49:37 +0000 (+0000) Subject: Relevant BUGIDs: debian #326407 X-Git-Tag: Linux-PAM-1_0_3~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beaba770999e305693d2c5f5751fe2c081f2f5cd;p=linux-pam Relevant BUGIDs: debian #326407 Purpose of commit: bugfix Commit summary: --------------- 2008-11-25 Thorsten Kukuk * modules/pam_time/pam_time.c (is_same): Fix check of correct string length (debian bug #326407). --- diff --git a/ChangeLog b/ChangeLog index ae725e51..05bb175e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2008-11-25 Thorsten Kukuk + + * modules/pam_time/pam_time.c (is_same): Fix check + of correct string length (debian bug #326407). + 2008-10-17 Tomas Mraz - * modules/pam_keyinit/pam_keyinit.c (kill_keyrings): Save the old - euid to suid to be able to restore it. + * modules/pam_keyinit/pam_keyinit.c (kill_keyrings): Save the old + euid to suid to be able to restore it. 2008-09-25 Tomas Mraz diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c index 8e3b2486..7e418808 100644 --- a/modules/pam_time/pam_time.c +++ b/modules/pam_time/pam_time.c @@ -358,8 +358,8 @@ is_same(pam_handle_t *pamh UNUSED, const void *A, const char *b, /* Ok, we know that b is a substring from A and does not contain wildcards, but now the length of both strings must be the same, - too. */ - if (strlen (a) != strlen(b)) + too. In this case it means, a[i] has to be the end of the string. */ + if (a[i] != '\0') return FALSE; return ( !len );