aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-04 17:14:36 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-04 17:14:36 +0000
commit2eb45444a74df5f8d47ba14e318aff2e78a915db (patch)
tree25bd570a73d217b7ed478e43398b341372e87dcd /nscd
parentea7eb7e3eb09a7f9444e0c599fdbafaadb3e391d (diff)
downloadglibc-2eb45444a74df5f8d47ba14e318aff2e78a915db.zip
glibc-2eb45444a74df5f8d47ba14e318aff2e78a915db.tar.gz
glibc-2eb45444a74df5f8d47ba14e318aff2e78a915db.tar.bz2
Update.
1998-03-04 16:12 H.J. Lu <hjl@gnu.org> * libio/strops.c (_IO_str_seekoff): Handle MODE == 0. 1998-03-04 16:19 Ulrich Drepper <drepper@cygnus.com> * nscd/nscd_getgr_r.c: Follow nscd_getpw_r.c change. 1998-03-04 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nscd/nscd_getpw_r.c (nscd_open_socket): Safe and reset errno so that a failure to connect to nscd doesn't change errno. 1998-03-04 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/maint.texi (Reporting Bugs): Change bug-glibc@prep.ai.mit.edu to bug-glibc@gnu.org. * locale/iso-4217.def: Likewise 1998-03-04 12:43 Ulrich Drepper <drepper@cygnus.com> * manual/texinfo.tex: Updated. 1998-03-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/posix/fpathconf.c: Don't modify errno for an undefined value. * sysdeps/posix/pathconf.c: Likewise. * posix/getconf.c: Print `undefined' if pathconf returns -1 without setting errno. 1998-03-04 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Fix cut&paste problem. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: New file. Patches by Elliot Lee <sopwith@cuc.edu>.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getgr_r.c7
-rw-r--r--nscd/nscd_getpw_r.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index f133530..596e31f 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -67,16 +67,21 @@ nscd_open_socket (void)
{
struct sockaddr_un addr;
int sock;
+ int saved_errno = errno;
sock = socket (PF_UNIX, SOCK_STREAM, 0);
if (sock < 0)
- return -1;
+ {
+ __set_errno (saved_errno);
+ return -1;
+ }
addr.sun_family = AF_UNIX;
strcpy (addr.sun_path, _PATH_NSCDSOCKET);
if (connect (sock, (struct sockaddr *) &addr, sizeof (addr)) < 0)
{
close (sock);
+ __set_errno (saved_errno);
return -1;
}
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index c956abc..4fc78e1 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -67,16 +67,21 @@ nscd_open_socket (void)
{
struct sockaddr_un addr;
int sock;
+ int saved_errno = errno;
sock = socket (PF_UNIX, SOCK_STREAM, 0);
if (sock < 0)
- return -1;
+ {
+ __set_errno (saved_errno);
+ return -1;
+ }
addr.sun_family = AF_UNIX;
strcpy (addr.sun_path, _PATH_NSCDSOCKET);
if (connect (sock, (struct sockaddr *) &addr, sizeof (addr)) < 0)
{
close (sock);
+ __set_errno (saved_errno);
return -1;
}