From c884b39a9b4c3c4c7a4874c3a3dac591f56fdfc7 Mon Sep 17 00:00:00 2001 From: op Date: Tue, 30 May 2023 16:44:16 +0000 Subject: [PATCH] fail when an argument is given on 'id -R' from Lucas (lucas [at] sexy [dot] is). ok millert@ --- usr.bin/id/id.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.20.1