summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_config.c
diff options
context:
space:
mode:
authorRobbie Harwood <rharwood@redhat.com>2015-09-11 18:18:29 -0400
committerSimo Sorce <simo@redhat.com>2015-09-14 15:05:42 -0400
commitd9ebdccbc0a01acaf773ea9f3976c6ff9b51a5b4 (patch)
tree462acafbb1797328e6e572f9743aafc98b88bf5e /proxy/src/gp_config.c
parent37b160e668b4861bab888abdc5547a96dc327d32 (diff)
downloadgss-proxy-d9ebdccbc0a01acaf773ea9f3976c6ff9b51a5b4.tar.gz
gss-proxy-d9ebdccbc0a01acaf773ea9f3976c6ff9b51a5b4.tar.xz
gss-proxy-d9ebdccbc0a01acaf773ea9f3976c6ff9b51a5b4.zip
getpwman(3) can return NULL without setting errno
Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/gp_config.c')
-rw-r--r--proxy/src/gp_config.c3
1 files changed, 3 insertions, 0 deletions
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;
}