aboutsummaryrefslogtreecommitdiff
path: root/src/checkown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/checkown.c')
-rw-r--r--src/checkown.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/checkown.c b/src/checkown.c
index 9402b8af..d9294dac 100644
--- a/src/checkown.c
+++ b/src/checkown.c
@@ -132,6 +132,7 @@ static struct group *get_group (const char *name)
}
#include "_usage.h"
+#define extraopts "dir1 dir2 ..."
#define getoptstring "fm:g:u:" getoptstring_COMMON
static struct option longopts[] = {
{ "directory", 0, NULL, 'd'},
@@ -190,6 +191,9 @@ int checkown (int argc, char **argv)
}
}
+ if (optind >= argc)
+ usage (EXIT_FAILURE);
+
if (pw) {
uid = pw->pw_uid;
gid = pw->pw_gid;