summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/setuid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/setuid.c b/tests/setuid.c
index 9d77850..772de94 100644
--- a/tests/setuid.c
+++ b/tests/setuid.c
@@ -43,6 +43,11 @@ int main(int argc, char *argv[])
/* Return codes */
int ret;
+ if (argc < 2) {
+ printf("Usage: %s <uid_value> \n", argv[0]);
+ goto finished;
+ }
+
pwd = getpwnam(argv[1]);
uid = pwd->pw_uid;
fprintf(stdout, "Setting UID to %s (%d).\n", pwd->pw_name, uid);