summaryrefslogtreecommitdiff
path: root/parse.yacc
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>1995-11-21 02:13:59 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>1995-11-21 02:13:59 +0000
commit47584b5f0ecc933550941893b11bb03e803d4128 (patch)
tree8b129f672d01cf2fbf6072604f47333d4dcb3d9c /parse.yacc
parent565c0bbba8c8e64e9bc3750c7a0efcdfa4bc9833 (diff)
downloadsudo-47584b5f0ecc933550941893b11bb03e803d4128.tar.gz
now uses sudo_pw_ent
Diffstat (limited to 'parse.yacc')
-rw-r--r--parse.yacc5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.yacc b/parse.yacc
index 3376c40a9..d35d4e01d 100644
--- a/parse.yacc
+++ b/parse.yacc
@@ -37,6 +37,7 @@ static char rcsid[] = "$Id$";
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
+#include <pwd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
@@ -328,13 +329,13 @@ userlist : user
;
user : NAME {
- if (strcmp($1, user) == 0)
+ if (strcmp($1, sudo_pw_ent->pw_name) == 0)
user_matches = TRUE;
(void) free($1);
$1 = NULL; /* XXX */
}
| NETGROUP {
- if (netgr_matches($1, NULL, user))
+ if (netgr_matches($1, NULL, sudo_pw_ent->pw_name))
user_matches = TRUE;
(void) free($1);
$1 = NULL; /* XXX */