Have useful errors on group and user errors. - geomyidae - A small C-based gopherd. (HTM) git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ (DIR) Log (DIR) Files (DIR) Refs (DIR) Tags (DIR) README (DIR) LICENSE --- (DIR) commit d878002edce4e4a731a4936011e045f162d5c967 (DIR) parent 06e2364496697e53a903409adb3fcf09926adb06 (HTM) Author: Christoph Lohmann <20h@r-36.net> Date: Tue, 30 Oct 2018 20:46:43 +0100 Have useful errors on group and user errors. Diffstat: M main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- (DIR) diff --git a/main.c b/main.c @@ -469,7 +469,7 @@ main(int argc, char *argv[]) errno = 0; if ((gr = getgrnam(group)) == NULL) { if (errno == 0) { - perror("no such group"); + fprintf(stderr, "no such group '%s'\n", group); } else { perror("getgrnam"); } @@ -481,7 +481,7 @@ main(int argc, char *argv[]) errno = 0; if ((us = getpwnam(user)) == NULL) { if (errno == 0) { - perror("no such user"); + fprintf(stderr, "no such user '%s'\n", user); } else { perror("getpwnam"); }