If the user specified a uid with the -u flag and the uid exists in

the passwd file, set runas_user to the name, not the uid.

When comparing usernames in sudoers, if a name is really a uid (starts
with '#') compare it numerically to pw_uid.
This commit is contained in:
Todd C. Miller
2004-03-24 23:06:34 +00:00
parent 631cbc2857
commit 6190f376c1
6 changed files with 65 additions and 16 deletions

View File

@@ -96,6 +96,7 @@ int addr_matches __P((char *));
int command_matches __P((char *, char *, char *, char *));
int hostname_matches __P((char *, char *, char *));
int netgr_matches __P((char *, char *, char *, char *));
int usergr_matches __P((char *, char *));
int userpw_matches __P((char *, char *, struct passwd *));
int usergr_matches __P((char *, char *, struct passwd *));
#endif /* _SUDO_PARSE_H */