diff options
Diffstat (limited to 'src/arping.c')
-rw-r--r-- | src/arping.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/arping.c b/src/arping.c index 26c568a..789aed7 100644 --- a/src/arping.c +++ b/src/arping.c @@ -318,9 +318,13 @@ drop_privileges(const char* drop_group) gid_t gid = 0; if (!(pw = getpwnam(drop_user))) { if (verbose) { - // TODO: better error message. - printf("arping: getpwnam(%s): %s\n", - drop_user, strerror(errno)); + if (errno != 0) { + printf("arping: getpwnam(%s): %s\n", + drop_user, strerror(errno)); + } else { + printf("arping: getpwnam(%s): unknown user\n", + drop_user); + } } return; // TODO: remove this 'return'. } else { |