mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
Reviewed by: trasz
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D30734
(cherry picked from commit 4a06e93773)
This commit is contained in:
parent
ba56ee36eb
commit
bc997ea6b8
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue