summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw/pw_user.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 0b56b81..483148a 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -321,6 +321,9 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
(a_uid = a_name)->ch = 'u';
a_name = NULL;
}
+ } else {
+ if (strspn(a_uid->val, "0123456789") != strlen(a_uid->val))
+ errx(EX_USAGE, "-u expects a number");
}
/*