summaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-02-10 03:19:57 +0000
committerUlrich Drepper <drepper@redhat.com>1997-02-10 03:19:57 +0000
commit7cc27f440c2f709fda63af7ecb3747deeeb799f0 (patch)
tree01e140591e31d13b80fe5acb882781b94c4e9968 /sunrpc
parent6952e59e25071a5c18a28c32dbcc93fcfe8f9d62 (diff)
update from main archive 970209cvs/libc-970210
1997-02-09 02:59 Ulrich Drepper <drepper@cygnus.com> * version.h (VERSION): Bump to 2.0.2. * posix/Makefile (routines): Add getopt_init. * posix/getopt.c: Don't get environment variable with nonoption flags here. Depend on __getopt_nonoption_flags variable filled somewhere else. This is necessary since the variable must be removed even when getopt isn't used in case exec(2) gets called. * posix/getopt_init.c: New file. Initialize __getopt_nonoption_flags and remove environment variable. * sysdeps/i386/init-first.c: Call __getopt_clean_environment. * sysdeps/mach/hurd/i386/init-first.c: Likewise. * sysdeps/stub/init-first.c: Likewise. * sysdeps/unix/sysv/linux/init-first.c: Likewise. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Recognize AT_PAGESZ entry in auxiliary vector and store value in _dl_pagesize. * sysdeps/generic/crypt-entry.h: Return EOPNOTSUPP when DES encryption is wanted. * libio/vsnprintf.c: If MAXLEN is 0 return 0. * stdio/vsnprintf.c: Likewise. Reported by Philip Blundell <pjb27@cam.ac.uk>. 1997-02-07 17:43 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/sysd-stdio.c: Include <errno.h>. Change PTR to void *. * sysdeps/posix/vdprintf.c: Change PTR to void *. Reported by Brian Oxley <boxley%dev.cm.ssb.com@clipper.ssb.com>. 1997-02-07 17:41 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/unix/sysv/linux/socketbits.h: Fix typo. 1997-02-06 13:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * rellns-sh: No need to check for existance of first parameter. 1997-02-06 14:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/posix/getcwd.c (__getcwd): Fix resource leaks. Reported by David Holland <dholland@eecs.harvard.edu>. 1997-02-06 14:38 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sunrpc/clnt_tcp.c (readtcp): Pass copy of timeout value to select, in case it is modified by the latter. * sunrpc/clnt_udp.c (clntudp_call): Likewise. * sunrpc/pmap_rmt.c (clnt_broadcast): Likewise. * sunrpc/svc_tcp.c (readtcp): Likewise. * sunrpc/svc_authux.c (_svcauth_unix): Fix type of area_gids array. * sunrpc/authuxprot.c (xdr_authunix_parms): Check size of uid_t and gid_t. * sunrpc/auth_unix.c (authunix_validate): Fix type of second argument. 1997-02-06 14:29 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/Makefile (extra-objs): Don't zap previous value. * Makefile (before-compile): Likewise. Don't add gnu/lib-names.h twice. 1997-02-06 14:19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/brk.c: Add workaround for braindamage (sigh!). 1997-02-06 17:10 Jim Meyering <meyering@asic.sc.ti.com> * manual/memory.texi: Correct `copystring' example for obstacks. 1997-02-06 14:10 Ulrich Drepper <drepper@cygnus.com> * Makeconfig: Don't use [:lower:] and [:upper:] in tr since old GNU tr don't grok it. 1997-02-03 21:13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/socketbits.h [__GNUC__<2] (struct cmsghdr): Don't use GNU C extensions. (CMSG_DATA): Use portable definition. 1997-02-05 05:58 Ulrich Drepper <drepper@cygnus.com> * elf/ldd.bash.in: Add test for read permission and print appropriate message. Change warning and error messages to print "ldd: " at start. * elf/ldd.sh.in: Likewise. * stdlib/Makefile (routines): Add atoll. * stdlib/atoll.c: New file. * stdlib/stdlib.h: Add prototype and optimization for atoll. * stdlib/a64l.c: Update copyright. * stdlib/abs.c: Likewise. * stdlib/atof.c: Likewise. * stdlib/atoi.c: Likewise. * stdlib/atol.c: Likewise. * stdlib/bsearch.c: Likewise. * stdlib/exit.c: Likewise. * stdlib/fpioconst.c: Likewise. * stdlib/fpioconst.h: Likewise. * stdlib/jrand48.c: Likewise. * stdlib/jrand48_r.c: Likewise. * stdlib/labs.c: Likewise. * stdlib/lcong48.c: Likewise. * stdlib/lcong48_r.c: Likewise. * stdlib/llabs.c: Likewise. * stdlib/lrand48.c: Likewise. * stdlib/lrand48_r.c: Likewise. * stdlib/mblen.c: Likewise. * stdlib/mbstowcs.c: Likewise. * stdlib/mbtowc.c: Likewise. * stdlib/mp_clz_tab.c: Likewise. * stdlib/mrand48.c: Likewise. * stdlib/mrand48_r.c: Likewise. * stdlib/msort.c: Likewise. * stdlib/nrand48.c: Likewise. * stdlib/nrand48_r.c: Likewise. * stdlib/qsort.c: Likewise. * stdlib/rpmatch.c: Likewise. * stdlib/seed48.c: Likewise. * stdlib/seed48_r.c: Likewise. * stdlib/srand48.c: Likewise. * stdlib/srand48_r.c: Likewise. * stdlib/strtod.c: Likewise. * stdlib/wcstombs.c: Likewise. * stdlib/wctomb.c: Likewise. 1997-02-05 05:08 Ulrich Drepper <drepper@cygnus.com> * stdlib/mp_clz_tab.c (__clz_tab): Follow change in GMP and define as const. 1997-02-04 23:57 Fila Kolodny <fila@ibi.com> * sysdeps/unix/sysv/linux/socketbits.h: Define __need_NULL before including <stddef.h>. 1997-02-03 20:01 H.J. Lu <hjl@gnu.ai.mit.edu> * time/Makefile (tzbases, tzlinks): New. (tzfiles): Changed to $(tzbases) $(tzlinks). ($(tzfiles:%=$(objpfx)z.%): Make $(tzlinks) depend on $(tzbases). 1997-02-02 12:13 H.J. Lu <hjl@gnu.ai.mit.edu> * Makefile (install): Ignore error from ldconfig. * time/zic.c (mkdirs): Double check the error return of mkdir (). 1997-02-04 22:01 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfprintf.c: Prepare to use __va_copy for architectures like PPC where va_list is no integral type. 1997-02-04 15:27 Roma Ekzhanov <ekzhanov@paragraph.com> * posix/getopt.c (exchange): Don't allocate nonoption_flags array if nonoption_flags_len == -1.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/auth_unix.c7
-rw-r--r--sunrpc/authuxprot.c25
-rw-r--r--sunrpc/clnt_tcp.c3
-rw-r--r--sunrpc/clnt_udp.c3
-rw-r--r--sunrpc/pmap_rmt.c5
-rw-r--r--sunrpc/svc_authux.c14
-rw-r--r--sunrpc/svc_tcp.c3
7 files changed, 35 insertions, 25 deletions
diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
index bb631b4d52..8890a926ba 100644
--- a/sunrpc/auth_unix.c
+++ b/sunrpc/auth_unix.c
@@ -215,14 +215,15 @@ authunix_marshal(auth, xdrs)
static bool_t
authunix_validate(auth, verf)
register AUTH *auth;
- struct opaque_auth verf;
+ struct opaque_auth *verf;
{
register struct audata *au;
XDR xdrs;
- if (verf.oa_flavor == AUTH_SHORT) {
+ if (verf->oa_flavor == AUTH_SHORT) {
au = AUTH_PRIVATE(auth);
- xdrmem_create(&xdrs, verf.oa_base, verf.oa_length, XDR_DECODE);
+ xdrmem_create(&xdrs, verf->oa_base, verf->oa_length,
+ XDR_DECODE);
if (au->au_shcred.oa_base != NULL) {
mem_free(au->au_shcred.oa_base,
diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c
index a60d99a57b..9b21ce195e 100644
--- a/sunrpc/authuxprot.c
+++ b/sunrpc/authuxprot.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -55,12 +55,17 @@ xdr_authunix_parms(xdrs, p)
if (xdr_u_long(xdrs, &(p->aup_time))
&& xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_int(xdrs, &(p->aup_uid))
- && xdr_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
- &(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
+ && (sizeof (uid_t) == sizeof (short int)
+ ? xdr_u_short(xdrs, (u_short *) &(p->aup_uid))
+ : xdr_u_int(xdrs, (u_int *) &(p->aup_uid)))
+ && (sizeof (gid_t) == sizeof (short int)
+ ? xdr_u_short(xdrs, (u_short *) &(p->aup_gid))
+ : xdr_u_int(xdrs, (u_int *) &(p->aup_gid)))
+ && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
+ &(p->aup_len), NGRPS, sizeof(gid_t),
+ (sizeof (gid_t) == sizeof (short int)
+ ? xdr_u_short : xdr_u_int)) ) {
return (TRUE);
}
return (FALSE);
}
-
diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
index bd40cdddf6..aeaf558ad2 100644
--- a/sunrpc/clnt_tcp.c
+++ b/sunrpc/clnt_tcp.c
@@ -417,9 +417,10 @@ readtcp(ct, buf, len)
#endif /* def FD_SETSIZE */
while (TRUE) {
+ struct timeval timeout = ct->ct_wait;
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL,
- &(ct->ct_wait))) {
+ &timeout)) {
case 0:
ct->ct_error.re_status = RPC_TIMEDOUT;
return (-1);
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 6b12306a55..e166dede81 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -287,9 +287,10 @@ send_again:
mask = 1 << cu->cu_sock;
#endif /* def FD_SETSIZE */
for (;;) {
+ struct timeval timeout = cu->cu_wait;
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
- (int *)NULL, &(cu->cu_wait))) {
+ (int *)NULL, &timeout)) {
case 0:
time_waited.tv_sec += cu->cu_wait.tv_sec;
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index 40a35f1990..8907929973 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -244,7 +244,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
struct rmtcallargs a;
struct rmtcallres r;
struct rpc_msg msg;
- struct timeval t;
+ struct timeval t, t1;
char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
/*
@@ -324,8 +324,9 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
msg.acpted_rply.ar_results.where = (caddr_t)&r;
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask;
+ t1 = t;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
- (int *)NULL, &t)) {
+ (int *)NULL, &t1)) {
case 0: /* timed out */
stat = RPC_TIMEDOUT;
diff --git a/sunrpc/svc_authux.c b/sunrpc/svc_authux.c
index 1b766d49f6..59fdde6ad8 100644
--- a/sunrpc/svc_authux.c
+++ b/sunrpc/svc_authux.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -60,7 +60,7 @@ _svcauth_unix(rqst, msg)
struct area {
struct authunix_parms area_aup;
char area_machname[MAX_MACHINE_NAME+1];
- int area_gids[NGRPS];
+ gid_t area_gids[NGRPS];
} *area;
u_int auth_len;
int str_len, gid_len;
@@ -125,7 +125,7 @@ done:
* Looks up longhand in a cache.
*/
/*ARGSUSED*/
-enum auth_stat
+enum auth_stat
_svcauth_short(rqst, msg)
struct svc_req *rqst;
struct rpc_msg *msg;
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index 2555e32be5..278e16fc33 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -305,9 +305,10 @@ readtcp(xprt, buf, len)
int readfds;
#endif /* def FD_SETSIZE */
do {
+ struct timeval timeout = wait_per_try;
readfds = mask;
if (select(_rpc_dtablesize(), &readfds, (int*)NULL, (int*)NULL,
- &wait_per_try) <= 0) {
+ &timeout) <= 0) {
if (errno == EINTR) {
continue;
}