From 1395ff30321ce605ab2ca79b1301cd93f51a5ca1 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Mon, 1 Dec 2008 11:26:59 +0000 Subject: Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2008-12-01 Tomas Mraz * modules/pam_access/pam_access.8.xml: Fix description of nodefgroup option. * modules/pam_group/pam_group.c (is_same): Fix check for correct string length. --- modules/pam_group/pam_group.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/pam_group') diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index bddcf1cb..4a931c4f 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -331,10 +331,10 @@ is_same (const pam_handle_t *pamh UNUSED, } /* 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)) - return FALSE; + wildcards, but now the length of both strings must be the same, + too. In this case it means, a[i] has to be the end of the string. */ + if (a[i] != '\0') + return FALSE; return ( !len ); } -- cgit v1.2.3