]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 6 Mar 1998 09:18:45 +0000 (09:18 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 6 Mar 1998 09:18:45 +0000 (09:18 +0000)
* nis/nis_call.c (do_ypcall, yp_all): Safe and reset errno.

ChangeLog
FAQ.in
nis/nis_call.c
nis/ypclnt.c

index 711db65dead61d322aa081f4a5e1c2e931f2c454..4c2430d9ecc97542a474c15eab3da31f89d8c7d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 1998-03-06  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
 
-       * nis/nis_call.c (__do_niscall): Safe and reset errno.
+       * nis/nis_call.c (do_ypcall, yp_all): Safe and reset errno.
 
        * nis/ypclnt.c (__yp_bind): Safe and reset errno.
 
diff --git a/FAQ.in b/FAQ.in
index 32c35ebaf063009137521e30ab54282b19d68f22..97e55256e86bb8983a64eba005059d09d6230e84 100644 (file)
--- a/FAQ.in
+++ b/FAQ.in
@@ -550,7 +550,16 @@ http://www-vt.uni-paderborn.de/~kukuk/linux/nisplus.html).
 from ypbind.  ypbind 3.3 and older versions don't always remove these
 files, so glibc will continue to use them.  Other BSD versions seem to
 work correctly.  Until ypbind 3.4 is released, you can find a patch at
-ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc2.diff.
+ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypbind-3.3-glibc3.diff.
+
+??     Under Linux/Alpha, I always get "do_ypcall: clnt_call:
+       RPC: Unable to receive; errno = Connection refused" when using NIS.
+
+{TK} You need a ypbind version which is 64bit clean.  Some versions
+are not 64bit clean.  A 64bit clean implemention is ypbind-mt.  For
+ypbind 3.3, you need the patch from ftp.kernel.org (See the previous
+question).  I don't know about other versions.
+
 
 ??     After installing glibc name resolving doesn't work properly.
 
@@ -611,11 +620,11 @@ problem.
 
 ??     What do I need for C++ development?
 
-{HJ,AJ} You need either egcs 1.0.1 or gcc-2.8.0 with libstdc++
-2.8.0. libg++ 2.7.2 (and the Linux Versions 2.7.2.x) doesn't work very
-well with the GNU C library due to vtable thunks.
+{HJ,AJ} You need either egcs 1.0.1 or gcc-2.8.1 with libstdc++
+2.8.1 (or more recent versions). libg++ 2.7.2 (and the Linux Versions
+2.7.2.x) doesn't work very well with the GNU C library due to vtable thunks.
 If you're upgrading from glibc 2.0.x to 2.1 you have to recompile
-libstc++ the library compiled for 2.0 is not compatible due to the new
+libstc++ since the library compiled for 2.0 is not compatible due to the new
 Large File Support (LFS) in version 2.1.
 
 ? Source and binary incompatibilities, and what to do about them
index 8e0aca20ce3474b58a80a778c0f419429280ca28..affae099cf6f44084c1480d227896fd99baf0078 100644 (file)
@@ -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;
 }
index 924a6293f1346d081155079eb322b288a2c39dc9..ceaaa710b755a6530588948eda0590b15cdab5bd 100644 (file)
@@ -104,7 +104,6 @@ __yp_bind (const char *domain, dom_binding **ypdb)
          struct iovec vec[2];
          u_short port;
          int fd;
-         int saved_errno = errno;
 
          sprintf (path, "%s/%s.%ld", BINDINGDIR, domain, YPBINDVERS);
          fd = open (path, O_RDONLY);
@@ -133,14 +132,11 @@ __yp_bind (const char *domain, dom_binding **ypdb)
                }
              close (fd);
            }
-         __set_errno (saved_errno);
        }
 #endif /* USE_BINDINGDIR */
 
       if (ysd->dom_vers == -1)
        {
-         int saved_errno = errno;
-
          if(ysd->dom_client)
            {
              clnt_destroy(ysd->dom_client);
@@ -157,7 +153,6 @@ __yp_bind (const char *domain, dom_binding **ypdb)
             {
               if (is_new)
                 free (ysd);
-             __set_errno (saved_errno);
               return YPERR_YPBIND;
             }
           /*
@@ -170,7 +165,6 @@ __yp_bind (const char *domain, dom_binding **ypdb)
               clnt_destroy (client);
               if (is_new)
                 free (ysd);
-             __set_errno (saved_errno);
               return YPERR_YPBIND;
             }
 
@@ -253,6 +247,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
   bool_t use_ypbindlist = FALSE;
   int try, status;
   enum clnt_stat result;
+  int saved_errno = errno;
 
   try = 0;
   status = YPERR_YPERR;
@@ -281,6 +276,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
        {
          if (use_ypbindlist)
            __libc_lock_unlock (ypbindlist_lock);
+         __set_errno (saved_errno);
          return YPERR_DOMAIN;
        }
 
@@ -317,6 +313,8 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
        ydb = NULL;
       }
 
+  __set_errno (saved_errno);
+
   return status;
 }
 
@@ -670,6 +668,7 @@ yp_all (const char *indomain, const char *inmap,
   CLIENT *clnt;
   unsigned long status;
   int clnt_sock;
+  int saved_errno = errno;
 
   if (indomain == NULL || indomain[0] == '\0' ||
       inmap == NULL || inmap == '\0')
@@ -682,6 +681,7 @@ yp_all (const char *indomain, const char *inmap,
     {
       if (__yp_bind (indomain, &ydb) != 0)
        {
+         __set_errno (saved_errno);
          return YPERR_DOMAIN;
        }
 
@@ -691,7 +691,10 @@ yp_all (const char *indomain, const char *inmap,
       clnt_sin.sin_port = 0;
       clnt = clnttcp_create (&clnt_sin, YPPROG, YPVERS, &clnt_sock, 0, 0);
       if (clnt == NULL)
-       return YPERR_PMAP;
+       {
+         __set_errno (saved_errno);
+         return YPERR_PMAP;
+       }
       req.domain = (char *) indomain;
       req.map = (char *) inmap;
 
@@ -714,10 +717,15 @@ yp_all (const char *indomain, const char *inmap,
       close (clnt_sock);
 
       if (status != YP_NOMORE)
-       return ypprot_err (status);
-      try++;
+       {
+         __set_errno (saved_errno);
+         return ypprot_err (status);
+       }
+      ++try;
     }
 
+  __set_errno (saved_errno);
+
   return res;
 }
 
This page took 0.058416 seconds and 5 git commands to generate.