summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--modules/pam_time/pam_time.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a91eb2d5..4f688036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-25 Thorsten Kukuk <kukuk@thkukuk.de>
+
+ * modules/pam_time/pam_time.c (is_same): Fix check
+ of correct string length (debian bug #326407).
+
2008-11-24 Thorsten Kukuk <kukuk@thkukuk.de>
* xtests/Makefile.am: Add pam_time1 tests.
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 );