Ignore case when matching user/group names in the cache. From Quest sudo.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 14:05:37 +0000 (10:05 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 14:05:37 +0000 (10:05 -0400)
plugins/sudoers/pwutil.c

index 16f53ae3e8f686c062e97359afe6cd7135e20425..2285691848eeb90461f6721983986a063320b2e7 100644 (file)
@@ -82,7 +82,7 @@ cmp_pwnam(const void *v1, const void *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)                    \
@@ -373,7 +373,7 @@ cmp_grnam(const void *v1, const void *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 *