1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
1999-06-30  Ulrich Drepper  <drepper@cygnus.com>

	* 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.
This commit is contained in:
Ulrich Drepper
1999-06-30 17:41:35 +00:00
parent c11f120913
commit 1d863dc0b4
9 changed files with 40 additions and 15 deletions

View File

@@ -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 {