mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
1999-06-28 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/gethostid.c: Test for gethostbyname_r function correctly. * sunrpc/getrpcport.c: Test for gethostbyname_r function correctly. * sunrpc/clnt_simp.c: Test for gethostbyname_r function correctly. * sunrpc/clnt_gen.c: Test for gethostbyname_r and getprotobyname_r functions correctly. * inet/rexec.c (rexec): Test for gethostbyname_r result correctly. * inet/rcmd.c: Test for gethostbyname_r result correctly. Optimize file reading a bit. * sysdeps/generic/glob.c: Test for getpwnam_r result correctly. 1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/string.texi (Copying and Concatenation): Mention that strndup is a GNU extension. 1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> * pwd/getpw.c (__getpw): Fix check for error return.
This commit is contained in:
29
ChangeLog
29
ChangeLog
@ -1,3 +1,32 @@
|
|||||||
|
1999-06-28 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/gethostid.c: Test for gethostbyname_r
|
||||||
|
function correctly.
|
||||||
|
|
||||||
|
* sunrpc/getrpcport.c: Test for gethostbyname_r function
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
* sunrpc/clnt_simp.c: Test for gethostbyname_r function correctly.
|
||||||
|
|
||||||
|
* sunrpc/clnt_gen.c: Test for gethostbyname_r and getprotobyname_r
|
||||||
|
functions correctly.
|
||||||
|
|
||||||
|
* inet/rexec.c (rexec): Test for gethostbyname_r result correctly.
|
||||||
|
|
||||||
|
* inet/rcmd.c: Test for gethostbyname_r result correctly. Optimize
|
||||||
|
file reading a bit.
|
||||||
|
|
||||||
|
* sysdeps/generic/glob.c: Test for getpwnam_r result correctly.
|
||||||
|
|
||||||
|
1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* manual/string.texi (Copying and Concatenation): Mention that
|
||||||
|
strndup is a GNU extension.
|
||||||
|
|
||||||
|
1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||||
|
|
||||||
|
* pwd/getpw.c (__getpw): Fix check for error return.
|
||||||
|
|
||||||
1999-06-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
1999-06-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
* elf/dl-deps.c (_dl_map_object_deps): When looking for the next
|
* elf/dl-deps.c (_dl_map_object_deps): When looking for the next
|
||||||
|
@ -80,7 +80,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
|||||||
hstbuflen = 1024;
|
hstbuflen = 1024;
|
||||||
tmphstbuf = __alloca (hstbuflen);
|
tmphstbuf = __alloca (hstbuflen);
|
||||||
while (__gethostbyname_r (*ahost, &hostbuf, tmphstbuf, hstbuflen,
|
while (__gethostbyname_r (*ahost, &hostbuf, tmphstbuf, hstbuflen,
|
||||||
&hp, &herr) < 0)
|
&hp, &herr) != 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
{
|
{
|
||||||
__set_h_errno (herr);
|
__set_h_errno (herr);
|
||||||
@ -469,7 +469,7 @@ __icheckhost (raddr, lhost, rhost)
|
|||||||
buffer = __alloca (buflen);
|
buffer = __alloca (buflen);
|
||||||
save_errno = errno;
|
save_errno = errno;
|
||||||
while (__gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
|
while (__gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
|
||||||
< 0)
|
!= 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
return (0);
|
return (0);
|
||||||
else {
|
else {
|
||||||
@ -563,10 +563,10 @@ __ivaliduser2(hostf, raddr, luser, ruser, rhost)
|
|||||||
|
|
||||||
/* Skip lines that are too long. */
|
/* Skip lines that are too long. */
|
||||||
if (strchr (p, '\n') == NULL) {
|
if (strchr (p, '\n') == NULL) {
|
||||||
int ch = getc (hostf);
|
int ch = getc_unlocked (hostf);
|
||||||
|
|
||||||
while (ch != '\n' && ch != EOF)
|
while (ch != '\n' && ch != EOF)
|
||||||
ch = getc (hostf);
|
ch = getc_unlocked (hostf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
|
|||||||
hstbuflen = 1024;
|
hstbuflen = 1024;
|
||||||
hsttmpbuf = __alloca (hstbuflen);
|
hsttmpbuf = __alloca (hstbuflen);
|
||||||
while (__gethostbyname_r (*ahost, &hostbuf, hsttmpbuf, hstbuflen,
|
while (__gethostbyname_r (*ahost, &hostbuf, hsttmpbuf, hstbuflen,
|
||||||
&hp, &herr) < 0)
|
&hp, &herr) != 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
{
|
{
|
||||||
__set_h_errno (herr);
|
__set_h_errno (herr);
|
||||||
|
@ -372,6 +372,8 @@ terminated.
|
|||||||
|
|
||||||
This function is different to @code{strncpy} in that it always
|
This function is different to @code{strncpy} in that it always
|
||||||
terminates the destination string.
|
terminates the destination string.
|
||||||
|
|
||||||
|
@code{strndup} is a GNU extension.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@comment string.h
|
@comment string.h
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1996, 1998, 1999 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -47,7 +47,7 @@ __getpw (uid, buf)
|
|||||||
buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
|
buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||||
tmpbuf = alloca (buflen);
|
tmpbuf = alloca (buflen);
|
||||||
|
|
||||||
if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) < 0)
|
if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sprintf (buf, "%s:%s:%lu:%lu:%s:%s:%s", p->pw_name, p->pw_passwd,
|
if (sprintf (buf, "%s:%s:%lu:%lu:%s:%s:%s", p->pw_name, p->pw_passwd,
|
||||||
|
@ -78,7 +78,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
|
|||||||
hstbuflen = 1024;
|
hstbuflen = 1024;
|
||||||
hsttmpbuf = __alloca (hstbuflen);
|
hsttmpbuf = __alloca (hstbuflen);
|
||||||
while (__gethostbyname_r (hostname, &hostbuf, hsttmpbuf, hstbuflen,
|
while (__gethostbyname_r (hostname, &hostbuf, hsttmpbuf, hstbuflen,
|
||||||
&h, &herr) < 0)
|
&h, &herr) != 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
{
|
{
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
|
rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
|
||||||
@ -107,8 +107,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
|
|||||||
|
|
||||||
prtbuflen = 1024;
|
prtbuflen = 1024;
|
||||||
prttmpbuf = __alloca (prtbuflen);
|
prttmpbuf = __alloca (prtbuflen);
|
||||||
while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p)
|
while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0)
|
||||||
< 0)
|
|
||||||
if (errno != ERANGE)
|
if (errno != ERANGE)
|
||||||
{
|
{
|
||||||
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
|
||||||
|
@ -105,7 +105,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
|
|||||||
buflen = 1024;
|
buflen = 1024;
|
||||||
buffer = __alloca (buflen);
|
buffer = __alloca (buflen);
|
||||||
while (__gethostbyname_r (host, &hostbuf, buffer, buflen,
|
while (__gethostbyname_r (host, &hostbuf, buffer, buflen,
|
||||||
&hp, &herr) < 0)
|
&hp, &herr) != 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
return (int) RPC_UNKNOWNHOST;
|
return (int) RPC_UNKNOWNHOST;
|
||||||
else
|
else
|
||||||
|
@ -56,8 +56,7 @@ getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto)
|
|||||||
|
|
||||||
buflen = 1024;
|
buflen = 1024;
|
||||||
buffer = __alloca (buflen);
|
buffer = __alloca (buflen);
|
||||||
while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr)
|
while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) != 0)
|
||||||
< 0)
|
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
@ -651,7 +651,8 @@ glob (pattern, flags, errfunc, pglob)
|
|||||||
pwtmpbuf = (char *) __alloca (pwbuflen);
|
pwtmpbuf = (char *) __alloca (pwbuflen);
|
||||||
|
|
||||||
success = 1;
|
success = 1;
|
||||||
while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) < 0)
|
while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
|
||||||
|
!= 0)
|
||||||
{
|
{
|
||||||
if (errno != ERANGE)
|
if (errno != ERANGE)
|
||||||
{
|
{
|
||||||
@ -735,7 +736,7 @@ glob (pattern, flags, errfunc, pglob)
|
|||||||
buflen = 1024;
|
buflen = 1024;
|
||||||
pwtmpbuf = (char *) __alloca (buflen);
|
pwtmpbuf = (char *) __alloca (buflen);
|
||||||
|
|
||||||
while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) < 0)
|
while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
|
||||||
{
|
{
|
||||||
if (errno != ERANGE)
|
if (errno != ERANGE)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
|
/* Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -91,7 +91,7 @@ gethostid ()
|
|||||||
|
|
||||||
/* To get the IP address we need to know the host name. */
|
/* To get the IP address we need to know the host name. */
|
||||||
while (__gethostbyname_r (hostname, &hostbuf, buffer, buflen, &hp, &herr)
|
while (__gethostbyname_r (hostname, &hostbuf, buffer, buflen, &hp, &herr)
|
||||||
< 0)
|
!= 0)
|
||||||
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
if (herr != NETDB_INTERNAL || errno != ERANGE)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user