about summary refs log tree commit diff
path: root/nis/nis_call.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-06 09:18:45 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-06 09:18:45 +0000
commita788b6c2163aa8b7c526a61542d01b7cbbc8859e (patch)
tree81e5b9daab0ac234b55a30b6de71bb09f3478f8c /nis/nis_call.c
parent36a8586ddfca3b825704eedda81c81ac8d653f1e (diff)
downloadglibc-a788b6c2163aa8b7c526a61542d01b7cbbc8859e.tar.gz
glibc-a788b6c2163aa8b7c526a61542d01b7cbbc8859e.tar.xz
glibc-a788b6c2163aa8b7c526a61542d01b7cbbc8859e.zip
Update.
	* nis/nis_call.c (do_ypcall, yp_all): Safe and reset errno.
Diffstat (limited to 'nis/nis_call.c')
-rw-r--r--nis/nis_call.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 8e0aca20ce..affae099cf 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -581,7 +581,10 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
 
       dir = rec_dirsearch (name, dir, flags, &status);
       if (dir == NULL)
-	return status;
+	{
+	  __set_errno (saved_errno);
+	  return status;
+	}
     }
 
   if (flags & MASTER_ONLY)
@@ -601,5 +604,7 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
 
   nis_free_directory (dir);
 
+  __set_errno (saved_errno);
+
   return retcode;
 }