]> granicus.if.org Git - sudo/commitdiff
Ignore case when matching user/group names in the cache. From Quest sudo.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 13:57:29 +0000 (09:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 13:57:29 +0000 (09:57 -0400)
--HG--
branch : 1.7

pwutil.c

index a20a849f7b3bc772294eab96b2ba899491851cab..dc55e2dca0ea82e911745211bb31eeded728412f 100644 (file)
--- a/pwutil.c
+++ b/pwutil.c
@@ -89,7 +89,7 @@ cmp_pwnam(v1, v2)
 {
     const struct passwd *pw1 = (const struct passwd *) v1;
     const struct passwd *pw2 = (const struct passwd *) v2;
-    return(strcmp(pw1->pw_name, pw2->pw_name));
+    return(strcasecmp(pw1->pw_name, pw2->pw_name));
 }
 
 #define FIELD_SIZE(src, name, size)                    \
@@ -403,7 +403,7 @@ cmp_grnam(v1, v2)
 {
     const struct group *grp1 = (const struct group *) v1;
     const struct group *grp2 = (const struct group *) v2;
-    return(strcmp(grp1->gr_name, grp2->gr_name));
+    return(strcasecmp(grp1->gr_name, grp2->gr_name));
 }
 
 struct group *