geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit d878002edce4e4a731a4936011e045f162d5c967
parent 06e2364496697e53a903409adb3fcf09926adb06
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:
main.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

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"); }