aefbd0093d
- fix for incorrect handling of groups in Runas_User - added /usr/local/sbin to secure-path
24 lines
706 B
Diff
24 lines
706 B
Diff
Index: parse.c
|
|
===================================================================
|
|
RCS file: /home/cvs/courtesan/sudo/parse.c,v
|
|
retrieving revision 1.160.2.21
|
|
diff -u -r1.160.2.21 parse.c
|
|
--- parse.c 2 Nov 2008 14:35:53 -0000 1.160.2.21
|
|
+++ parse.c 23 Jan 2009 19:16:55 -0000
|
|
@@ -651,9 +651,11 @@
|
|
/*
|
|
* If the user has a supplementary group vector, check it first.
|
|
*/
|
|
- for (i = 0; i < user_ngroups; i++) {
|
|
- if (grp->gr_gid == user_groups[i])
|
|
- return(TRUE);
|
|
+ if (strcmp(user, user_name) == 0) {
|
|
+ for (i = 0; i < user_ngroups; i++) {
|
|
+ if (grp->gr_gid == user_groups[i])
|
|
+ return(TRUE);
|
|
+ }
|
|
}
|
|
if (grp->gr_mem != NULL) {
|
|
for (cur = grp->gr_mem; *cur; cur++) {
|
|
|