id: sanitize arguments better
The -[AMc] flags ignore the user argument. Better if id rejects invocations that include a user argument along with any of those flags. PR: 256554 MFC after: 2 weeks Reviewed by: trasz Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D30734
This commit is contained in:
parent
7d681ad774
commit
4a06e93773
@ -144,6 +144,8 @@ main(int argc, char *argv[])
|
||||
|
||||
if (iswhoami && argc > 0)
|
||||
usage();
|
||||
if ((cflag || Aflag || Mflag) && argc > 0)
|
||||
usage();
|
||||
|
||||
switch(Aflag + Gflag + Mflag + Pflag + gflag + pflag + uflag) {
|
||||
case 1:
|
||||
|
Loading…
Reference in New Issue
Block a user