From d9ebdccbc0a01acaf773ea9f3976c6ff9b51a5b4 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 11 Sep 2015 18:18:29 -0400 Subject: getpwman(3) can return NULL without setting errno Signed-off-by: Robbie Harwood Reviewed-by: Simo Sorce --- proxy/src/gp_config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'proxy') diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c index 862f90c..f5a3fab 100644 --- a/proxy/src/gp_config.c +++ b/proxy/src/gp_config.c @@ -280,6 +280,9 @@ static int load_services(struct gp_config *cfg, struct gp_ini_context *ctx) eu_passwd = getpwnam(value); if (!eu_passwd) { ret = errno; + if (ret == 0) { /* not that it gets set anyway... */ + ret = ENOENT; + } } else { valnum = eu_passwd->pw_uid; } -- cgit