From 1d863dc0b41da22b5a06110d67b47a0f102cb639 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Jun 1999 17:41:35 +0000 Subject: Update. 1999-06-30 Ulrich Drepper * sysdeps/unix/sysv/linux/gethostid.c: Handle failing call to getxxbyYY_r functions correctly for non-existing entry. * sunrpc/getrpcport.c: Likewise. * sunrpc/clnt_simp.c: Likewise. * inet/rexec.c: Likewise. * sunrpc/clnt_gen.c: Likewise. * inet/rcmd.c: Likewise. * sysdeps/generic/glob.c: Likewise. --- inet/rcmd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'inet/rcmd.c') diff --git a/inet/rcmd.c b/inet/rcmd.c index 923f21fe40..30f20d1922 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -80,7 +80,8 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) hstbuflen = 1024; tmphstbuf = __alloca (hstbuflen); while (__gethostbyname_r (*ahost, &hostbuf, tmphstbuf, hstbuflen, - &hp, &herr) != 0) + &hp, &herr) != 0 + || hp == NULL) if (herr != NETDB_INTERNAL || errno != ERANGE) { __set_h_errno (herr); @@ -270,7 +271,8 @@ ruserok(rhost, superuser, ruser, luser) buffer = __alloca (buflen); while (__gethostbyname_r (rhost, &hostbuf, buffer, buflen, &hp, &herr) - != 0) + != 0 + || hp == NULL) if (herr != NETDB_INTERNAL || errno != ERANGE) return -1; else @@ -370,7 +372,8 @@ iruserok2 (raddr, superuser, ruser, luser, rhost) char *buffer = __alloca (buflen); uid_t uid; - if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd)) + if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) != 0 + || pwd == NULL) return -1; dirlen = strlen (pwd->pw_dir); @@ -469,7 +472,8 @@ __icheckhost (raddr, lhost, rhost) buffer = __alloca (buflen); save_errno = errno; while (__gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr) - != 0) + != 0 + || hp = NULL) if (herr != NETDB_INTERNAL || errno != ERANGE) return (0); else { -- cgit v1.2.3