summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOmar Polo <op@cvs.openbsd.org>2023-05-30 16:44:17 +0000
committerOmar Polo <op@cvs.openbsd.org>2023-05-30 16:44:17 +0000
commitb16e9a8fc540a866a07d17271429527e069bafcb (patch)
tree5e69618bb9061e58869ccdf98203058fd6523965 /usr.bin
parent1ea9138ac843d8bd5306d25edf0c4b18f2ff8469 (diff)
fail when an argument is given on 'id -R'
from Lucas (lucas [at] sexy [dot] is). ok millert@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/id/id.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index 30e2c58e088..bb1ebc0e3fd 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: id.c,v 1.29 2022/12/04 23:50:48 cheloha Exp $ */
+/* $OpenBSD: id.c,v 1.30 2023/05/30 16:44:16 op Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -128,6 +128,8 @@ main(int argc, char *argv[])
usage();
if (Rflag) {
+ if (argc != 0)
+ usage();
printf("%d\n", getrtable());
exit(0);
}