diff options
-rw-r--r-- | source3/auth/pampass.c | 4 | ||||
-rw-r--r-- | source3/lib/util.c | 3 | ||||
-rw-r--r-- | source3/modules/vfs_recycle.c | 2 | ||||
-rw-r--r-- | source3/smbd/chgpasswd.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c index 18d83ee364..26b45c5ff8 100644 --- a/source3/auth/pampass.c +++ b/source3/auth/pampass.c @@ -310,7 +310,7 @@ static int smb_pam_passchange_conv(int num_msg, DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: trying to match |%s| to |%s|\n", t->prompt, current_prompt )); - if (unix_wild_match(t->prompt, current_prompt) == 0) { + if (unix_wild_match(t->prompt, current_prompt)) { fstrcpy(current_reply, t->reply); DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: We sent: %s\n", current_reply)); pwd_sub(current_reply, udp->PAM_username, udp->PAM_password, udp->PAM_newpassword); @@ -341,7 +341,7 @@ static int smb_pam_passchange_conv(int num_msg, DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: trying to match |%s| to |%s|\n", t->prompt, current_prompt )); - if (unix_wild_match(t->prompt, current_prompt) == 0) { + if (unix_wild_match(t->prompt, current_prompt)) { fstrcpy(current_reply, t->reply); DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: We sent: %s\n", current_reply)); pwd_sub(current_reply, udp->PAM_username, udp->PAM_password, udp->PAM_newpassword); diff --git a/source3/lib/util.c b/source3/lib/util.c index 677871e2d0..38878befc7 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2640,6 +2640,7 @@ static BOOL unix_do_match(const char *regexp, const char *str) /******************************************************************* Simple case insensitive interface to a UNIX wildcard matcher. + Returns True if match, False if not. *******************************************************************/ BOOL unix_wild_match(const char *pattern, const char *string) @@ -2660,7 +2661,7 @@ BOOL unix_wild_match(const char *pattern, const char *string) if (strequal(p2,"*")) return True; - return unix_do_match(p2, s2) == 0; + return unix_do_match(p2, s2); } /********************************************************************** diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 0abcc29bcf..28593f4fbb 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -319,7 +319,7 @@ static BOOL matchparam(const char **haystack_list, const char *needle) } for(i=0; haystack_list[i] ; i++) { - if(!unix_wild_match(haystack_list[i], needle)) { + if(unix_wild_match(haystack_list[i], needle)) { return True; } } diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index c1168583ae..fed73db043 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -263,7 +263,7 @@ static int expect(int master, char *issue, char *expected) pstrcpy( str, buffer); trim_char( str, ' ', ' '); - if ((match = (unix_wild_match(expected, str) == 0))) { + if ((match = unix_wild_match(expected, str)) == True) { /* Now data has started to return, lower timeout. */ timeout = lp_passwd_chat_timeout() * 100; } |