now uses sudo_pw_ent
This commit is contained in:
@@ -37,6 +37,7 @@ static char rcsid[] = "$Id$";
|
|||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif /* HAVE_UNISTD_H */
|
#endif /* HAVE_UNISTD_H */
|
||||||
|
#include <pwd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@@ -328,13 +329,13 @@ userlist : user
|
|||||||
;
|
;
|
||||||
|
|
||||||
user : NAME {
|
user : NAME {
|
||||||
if (strcmp($1, user) == 0)
|
if (strcmp($1, sudo_pw_ent->pw_name) == 0)
|
||||||
user_matches = TRUE;
|
user_matches = TRUE;
|
||||||
(void) free($1);
|
(void) free($1);
|
||||||
$1 = NULL; /* XXX */
|
$1 = NULL; /* XXX */
|
||||||
}
|
}
|
||||||
| NETGROUP {
|
| NETGROUP {
|
||||||
if (netgr_matches($1, NULL, user))
|
if (netgr_matches($1, NULL, sudo_pw_ent->pw_name))
|
||||||
user_matches = TRUE;
|
user_matches = TRUE;
|
||||||
(void) free($1);
|
(void) free($1);
|
||||||
$1 = NULL; /* XXX */
|
$1 = NULL; /* XXX */
|
||||||
|
Reference in New Issue
Block a user