From: Todd C. Miller Date: Mon, 15 Nov 2004 14:59:03 +0000 (+0000) Subject: Use userpw_matches() to compare usernames, not strcmp(), since the latter X-Git-Tag: SUDO_1_7_0~832 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=244eec5cdb319a97b66ca86c9796fa15cd9aec30;p=sudo Use userpw_matches() to compare usernames, not strcmp(), since the latter checks for "#uid". --- diff --git a/match.c b/match.c index ca04a33c9..3307ac431 100644 --- a/match.c +++ b/match.c @@ -128,7 +128,7 @@ user_matches(pw, list) matched = !m->negated; break; case WORD: - if (strcmp(m->name, pw->pw_name) == 0) + if (userpw_matches(m->name, pw->pw_name, pw)) matched = !m->negated; break; } @@ -147,7 +147,7 @@ runas_matches(pw, list) struct member *list; { if (list == NULL) - return(strcmp(pw->pw_name, def_runas_default) == 0); + return(userpw_matches(def_runas_default, pw->pw_name, pw)); return(user_matches(pw, list)); }