Merge Debian's patch 408_passwd_check_arguments

* NEWS, src/passwd.c: Make sure that no more than one username
	argument was provided.
This commit is contained in:
nekral-guest
2007-12-26 22:17:13 +00:00
parent b77cef01a9
commit f5461ff01e
3 changed files with 14 additions and 0 deletions

View File

@@ -788,6 +788,12 @@ int main (int argc, char **argv)
else
name = myname;
/*
* Make sure that at most one username was specified.
*/
if (argc > optind+1)
usage (E_USAGE);
/*
* The -a flag requires -S, no other flags, no username, and
* you must be root. --marekm