* nis/nis_call.c (do_ypcall, yp_all): Safe and reset errno.
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.
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.
?? 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
dir = rec_dirsearch (name, dir, flags, &status);
if (dir == NULL)
- return status;
+ {
+ __set_errno (saved_errno);
+ return status;
+ }
}
if (flags & MASTER_ONLY)
nis_free_directory (dir);
+ __set_errno (saved_errno);
+
return retcode;
}
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);
}
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);
{
if (is_new)
free (ysd);
- __set_errno (saved_errno);
return YPERR_YPBIND;
}
/*
clnt_destroy (client);
if (is_new)
free (ysd);
- __set_errno (saved_errno);
return YPERR_YPBIND;
}
bool_t use_ypbindlist = FALSE;
int try, status;
enum clnt_stat result;
+ int saved_errno = errno;
try = 0;
status = YPERR_YPERR;
{
if (use_ypbindlist)
__libc_lock_unlock (ypbindlist_lock);
+ __set_errno (saved_errno);
return YPERR_DOMAIN;
}
ydb = NULL;
}
+ __set_errno (saved_errno);
+
return status;
}
CLIENT *clnt;
unsigned long status;
int clnt_sock;
+ int saved_errno = errno;
if (indomain == NULL || indomain[0] == '\0' ||
inmap == NULL || inmap == '\0')
{
if (__yp_bind (indomain, &ydb) != 0)
{
+ __set_errno (saved_errno);
return YPERR_DOMAIN;
}
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;
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;
}