From 7b57bfe5988e476ea40934457dfd1c8a231e2391 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Apr 2011 21:59:36 -0400 Subject: Obsolete RPC implementation in libc. --- ChangeLog | 74 +++++++++++++++++++++++ Makefile | 54 +++++++++++------ NEWS | 8 ++- include/libc-symbols.h | 15 ++++- include/rpc/auth.h | 30 ++++----- include/rpc/auth_des.h | 9 ++- include/rpc/auth_unix.h | 3 +- include/rpc/clnt.h | 39 ++++-------- include/rpc/des_crypt.h | 2 + include/rpc/key_prot.h | 23 +++---- include/rpc/pmap_clnt.h | 4 ++ include/rpc/pmap_prot.h | 7 +-- include/rpc/pmap_rmt.h | 7 +-- include/rpc/rpc_msg.h | 9 ++- include/rpc/svc.h | 35 ++++++----- include/rpc/svc_auth.h | 4 +- include/rpc/xdr.h | 95 ++++++++++++++--------------- nis/Makefile | 11 ++-- nss/Makefile | 5 +- sunrpc/Makefile | 67 ++++++++++++++------- sunrpc/auth_des.c | 25 +++++--- sunrpc/auth_none.c | 10 +-- sunrpc/auth_unix.c | 38 ++++++------ sunrpc/authdes_prot.c | 29 +++++---- sunrpc/authuxprot.c | 24 ++++---- sunrpc/clnt_gen.c | 12 ++-- sunrpc/clnt_perr.c | 15 ++++- sunrpc/clnt_raw.c | 16 ++--- sunrpc/clnt_simp.c | 3 +- sunrpc/clnt_tcp.c | 30 ++++----- sunrpc/clnt_udp.c | 38 +++++++----- sunrpc/clnt_unix.c | 50 ++++++++------- sunrpc/des_crypt.c | 5 +- sunrpc/des_soft.c | 3 +- sunrpc/get_myaddr.c | 5 ++ sunrpc/key_call.c | 90 +++++++++++++++------------ sunrpc/key_prot.c | 65 ++++++++++---------- sunrpc/netname.c | 13 +++- sunrpc/pm_getmaps.c | 11 ++-- sunrpc/pm_getport.c | 19 +++--- sunrpc/pmap_clnt.c | 22 +++---- sunrpc/pmap_prot.c | 10 +-- sunrpc/pmap_prot2.c | 10 +-- sunrpc/pmap_rmt.c | 46 +++++++------- sunrpc/publickey.c | 3 +- sunrpc/rpc_cmsg.c | 30 ++++----- sunrpc/rpc_common.c | 3 +- sunrpc/rpc_dtable.c | 2 +- sunrpc/rpc_prot.c | 60 +++++++++--------- sunrpc/rpc_thread.c | 12 +++- sunrpc/rtime.c | 2 +- sunrpc/svc.c | 61 ++++++++++++++----- sunrpc/svc_auth.c | 2 +- sunrpc/svc_authux.c | 7 +-- sunrpc/svc_raw.c | 8 +-- sunrpc/svc_run.c | 4 +- sunrpc/svc_simple.c | 17 +++--- sunrpc/svc_tcp.c | 26 +++++--- sunrpc/svc_udp.c | 21 ++++--- sunrpc/svc_unix.c | 20 +++--- sunrpc/svcauth_des.c | 1 + sunrpc/xcrypt.c | 8 ++- sunrpc/xdr.c | 157 +++++++++++++++++++++++++++++++++++++----------- sunrpc/xdr_array.c | 9 ++- sunrpc/xdr_float.c | 2 + sunrpc/xdr_intXX_t.c | 36 ++++++++--- sunrpc/xdr_mem.c | 6 +- sunrpc/xdr_rec.c | 8 +-- sunrpc/xdr_ref.c | 11 +++- sunrpc/xdr_sizeof.c | 5 ++ sunrpc/xdr_stdio.c | 5 +- 71 files changed, 993 insertions(+), 623 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3766105dd..468799ce6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,77 @@ +2011-04-16 Ulrich Drepper + + * Makefile: Add rules to build linkobj/libc.so. + * include/libc-symbols.h: Define libc_hidden_nolink. + * include/rpc/auth.h: Mark functions which are to be hidden. + * include/rpc/auth_des.h: Likewise. + * include/rpc/auth_unix.h: Likewise. + * include/rpc/clnt.h: Likewise. + * include/rpc/des_crypt.h: Likewise. + * include/rpc/key_prot.h: Likewise. + * include/rpc/pmap_clnt.h: Likewise. + * include/rpc/pmap_prot.h: Likewise. + * include/rpc/pmap_rmt.h: Likewise. + * include/rpc/rpc_msg.h: Likewise. + * include/rpc/svc.h: Likewise. + * include/rpc/svc_auth.h: Likewise. + * include/rpc/xdr.h: Likewise. + * nis/Makefile: Link all DSOs against linkobj/libc.so. + * nss/Makefile: Likewise. + * sunrpc/Makefile: Don't install headers. Build library with normal + entry points. Don't build rpcinfo. Link RPC tests appropriately. + * sunrpc/auth_des.c: Hide exported symbols by default, export some + for the compat linking library. Remove use of INTDEF/INTUSE. + * sunrpc/auth_none.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/authdes_prot.c: Likewise. + * sunrpc/authuxprot.c: Likewise. + * sunrpc/clnt_gen.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_raw.c: Likewise. + * sunrpc/clnt_simp.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/des_crypt.c: Likewise. + * sunrpc/des_soft.c: Likewise. + * sunrpc/get_myaddr.c: Likewise. + * sunrpc/key_call.c: Likewise. + * sunrpc/key_prot.c: Likewise. + * sunrpc/netname.c: Likewise. + * sunrpc/pm_getmaps.c: Likewise. + * sunrpc/pm_getport.c: Likewise. + * sunrpc/pmap_clnt.c: Likewise. + * sunrpc/pmap_prot.c: Likewise. + * sunrpc/pmap_prot2.c: Likewise. + * sunrpc/pmap_rmt.c: Likewise. + * sunrpc/publickey.c: Likewise. + * sunrpc/rpc_cmsg.c: Likewise. + * sunrpc/rpc_common.c: Likewise. + * sunrpc/rpc_dtable.c: Likewise. + * sunrpc/rpc_prot.c: Likewise. + * sunrpc/rpc_thread.c: Likewise. + * sunrpc/rtime.c: Likewise. + * sunrpc/svc.c: Likewise. + * sunrpc/svc_auth.c: Likewise. + * sunrpc/svc_authux.c: Likewise. + * sunrpc/svc_raw.c: Likewise. + * sunrpc/svc_run.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/svcauth_des.c: Likewise. + * sunrpc/xcrypt.c: Likewise. + * sunrpc/xdr.c: Likewise. + * sunrpc/xdr_array.c: Likewise. + * sunrpc/xdr_float.c: Likewise. + * sunrpc/xdr_intXX_t.c: Likewise. + * sunrpc/xdr_mem.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sunrpc/xdr_sizeof.c: Likewise. + * sunrpc/xdr_stdio.c: Likewise. + 2011-04-10 Ulrich Drepper [BZ #12650] diff --git a/Makefile b/Makefile index 61cfa436c4..ea7a5b5e58 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009 +# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009,2011 # Free Software Foundation, Inc. # This file is part of the GNU C Library. @@ -63,8 +63,8 @@ endif # $(AUTOCONF) = no +subdir_targets := subdir_lib objects objs others subdir_mostlyclean \ subdir_clean subdir_distclean subdir_realclean \ tests xtests subdir_lint.out \ - subdir_update-abi subdir_check-abi \ - subdir_echo-headers \ + subdir_update-abi subdir_check-abi \ + subdir_echo-headers \ subdir_install \ subdir_objs subdir_stubs subdir_testclean \ $(addprefix install-, no-libc.a bin lib data headers others) @@ -135,6 +135,20 @@ lib-noranlib: subdir_lib ifeq (yes,$(build-shared)) # Build the shared object from the PIC object library. lib: $(common-objpfx)libc.so + +lib: $(common-objpfx)linkobj/libc.so + +$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os $(common-objpfx)linkobj/libc_pic.a $(elfobjdir)/sofini.os $(elfobjdir)/interp.os $(elfobjdir)/ld.so $(common-objpfx)shlib.lds $(common-objpfx)elf/ld.so + $(build-shlib) + +$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a $(common-objpfx)sunrpc/librpc_compat_pic.a + $(..)./scripts/mkinstalldirs $(common-objpfx)linkobj + (cd $(common-objpfx)linkobj; \ + $(AR) x ../libc_pic.a; \ + rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \ + $(AR) x ../sunrpc/librpc_compat_pic.a; \ + $(AR) cr libc_pic.a *.os; \ + rm *.os) endif @@ -247,11 +261,11 @@ tests-clean: tests: $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out ifneq ($(CXX),no) check-data := $(firstword $(wildcard \ - $(foreach D,$(add-ons) scripts,\ - $(patsubst %,$D/data/c++-types-%.data,\ - $(abi-name) \ - $(addsuffix -$(config-os),\ - $(config-machine) \ + $(foreach D,$(add-ons) scripts,\ + $(patsubst %,$D/data/c++-types-%.data,\ + $(abi-name) \ + $(addsuffix -$(config-os),\ + $(config-machine) \ $(base-machine)))))) ifneq (,$(check-data)) $(objpfx)c++-types-check.out: $(check-data) scripts/check-c++-types.sh @@ -408,18 +422,18 @@ install: remove-old-headers endif endif -headers2_0 := __math.h bytesex.h confname.h direntry.h elfclass.h \ - errnos.h fcntlbits.h huge_val.h ioctl-types.h \ - ioctls.h iovec.h jmp_buf.h libc-lock.h local_lim.h \ - mathcalls.h mpool.h nan.h ndbm.h posix1_lim.h \ - posix2_lim.h posix_opt.h resourcebits.h schedbits.h \ - selectbits.h semaphorebits.h sigaction.h sigcontext.h \ - signum.h sigset.h sockaddrcom.h socketbits.h stab.def \ - statbuf.h statfsbuf.h stdio-lock.h stdio_lim.h \ - syscall-list.h termbits.h timebits.h ustatbits.h \ - utmpbits.h utsnamelen.h waitflags.h waitstatus.h \ - xopen_lim.h gnu/types.h sys/ipc_buf.h \ - sys/kernel_termios.h sys/msq_buf.h sys/sem_buf.h \ +headers2_0 := __math.h bytesex.h confname.h direntry.h elfclass.h \ + errnos.h fcntlbits.h huge_val.h ioctl-types.h \ + ioctls.h iovec.h jmp_buf.h libc-lock.h local_lim.h \ + mathcalls.h mpool.h nan.h ndbm.h posix1_lim.h \ + posix2_lim.h posix_opt.h resourcebits.h schedbits.h \ + selectbits.h semaphorebits.h sigaction.h sigcontext.h \ + signum.h sigset.h sockaddrcom.h socketbits.h stab.def \ + statbuf.h statfsbuf.h stdio-lock.h stdio_lim.h \ + syscall-list.h termbits.h timebits.h ustatbits.h \ + utmpbits.h utsnamelen.h waitflags.h waitstatus.h \ + xopen_lim.h gnu/types.h sys/ipc_buf.h \ + sys/kernel_termios.h sys/msq_buf.h sys/sem_buf.h \ sys/shm_buf.h sys/socketcall.h sigstack.h .PHONY: remove-old-headers diff --git a/NEWS b/NEWS index 528688dc5b..670dbf3018 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 2011-4-10 +GNU C Library NEWS -- history of user-visible changes. 2011-4-16 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc. See the end for copying conditions. @@ -7,6 +7,12 @@ using `glibc' in the "product" field. Version 2.14 +* The RPC implementation in libc is obsoleted. Old programs keep working + but new programs cannot be linked with the routines in libc anymore. + Programs in need of RPC functionality must be linked against TI-RPC. + The TI-RPC implemtation is IPv6 enabled and there are other benefits. + Implemented by Ulrich Drepper. + * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at, syncfs diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 252141eb01..67e1ca2083 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -1,6 +1,7 @@ /* Support macros for making weak and strong aliases for symbols, and for using symbol sets and linker warnings with GNU ld. - Copyright (C) 1995-1998,2000-2006,2008,2009 Free Software Foundation, Inc. + Copyright (C) 1995-1998,2000-2006,2008,2009,2011 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -266,7 +267,7 @@ # else # define link_warning(symbol, msg) \ asm (".stabs \"" msg "\",30,0,0,0\n\t" \ - ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n"); + ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n"); # endif /* XCOFF */ # define libc_freeres_ptr(decl) decl # define __libc_freeres_fn_section @@ -585,6 +586,15 @@ for linking") # define hidden_weak(name) \ __hidden_ver1(__GI_##name, name, name) __attribute__((weak)); # define hidden_data_weak(name) hidden_weak(name) +# define hidden_nolink(name, lib, version) \ + __hidden_nolink1 (__GI_##name, __EI_##name, name, VERSION_##lib##_##version) +# define __hidden_nolink1(local, internal, name, version) \ + __hidden_nolink2 (local, internal, name, version) +# define __hidden_nolink2(local, internal, name, version) \ + extern __typeof (name) internal __attribute__ ((alias (#local))); \ + __hidden_nolink3 (local, internal, #name "@" #version) +# define __hidden_nolink3(local, internal, vername) \ + __asm__ (".symver " #internal ", " vername); # else /* For assembly, we need to do the opposite of what we do in C: in assembly gcc __REDIRECT stuff is not in place, so functions @@ -625,6 +635,7 @@ for linking") # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libc_hidden_def(name) hidden_def (name) # define libc_hidden_weak(name) hidden_weak (name) +# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version) # define libc_hidden_ver(local, name) hidden_ver (local, name) # define libc_hidden_data_def(name) hidden_data_def (name) # define libc_hidden_data_weak(name) hidden_data_weak (name) diff --git a/include/rpc/auth.h b/include/rpc/auth.h index a03188ed44..0219fd9316 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -13,7 +13,7 @@ extern int key_setnet (struct key_netstarg *arg); #define DECLARE_NSS_PROTOTYPES(service) \ extern enum nss_status _nss_ ##service ## _netname2user \ - (char netname[MAXNETNAMELEN + 1], uid_t *uidp, \ + (char netname[MAXNETNAMELEN + 1], uid_t *uidp, \ gid_t *gidp, int *gidlenp, gid_t *gidlist, \ int *errnop); @@ -22,23 +22,23 @@ DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES -extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp) - attribute_hidden; -extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *) - attribute_hidden; - -extern AUTH *authunix_create_internal (char *__machname, __uid_t __uid, - __gid_t __gid, int __len, - __gid_t *__aup_gids) attribute_hidden; -extern AUTH *authunix_create_default_internal (void) attribute_hidden; -extern AUTH *authnone_create_internal (void) attribute_hidden; -extern AUTH *authdes_pk_create_internal (const char *, netobj *, u_int, - struct sockaddr *, - des_block *) attribute_hidden; - libc_hidden_proto (key_encryptsession_pk) libc_hidden_proto (key_decryptsession_pk) libc_hidden_proto (_null_auth) +libc_hidden_proto (authnone_create) +libc_hidden_proto (authunix_create) +libc_hidden_proto (authunix_create_default) +libc_hidden_proto (xdr_des_block) +libc_hidden_proto (xdr_opaque_auth) +libc_hidden_proto (authdes_create) +libc_hidden_proto (authdes_pk_create) +libc_hidden_proto (key_decryptsession) +libc_hidden_proto (key_encryptsession) +libc_hidden_proto (key_get_conv) +libc_hidden_proto (key_secretkey_is_set) +libc_hidden_proto (key_setnet) +libc_hidden_proto (key_setsecret) +libc_hidden_proto (netname2host) #endif diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h index 6dee05961d..c14f069668 100644 --- a/include/rpc/auth_des.h +++ b/include/rpc/auth_des.h @@ -3,6 +3,7 @@ #include libc_hidden_proto (getpublickey) +libc_hidden_proto (getsecretkey) libc_hidden_proto (rtime) extern bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred); @@ -16,9 +17,9 @@ extern enum auth_stat _svcauth_des (register struct svc_req *rqst, #define DECLARE_NSS_PROTOTYPES(service) \ extern enum nss_status _nss_ ## service ## _getpublickey \ - (const char *netname, char *pkey, int *errnop); \ + (const char *netname, char *pkey, int *errnop); \ extern enum nss_status _nss_ ## service ## _getsecretkey \ - (const char *netname, char *skey, char *passwd, \ + (const char *netname, char *skey, char *passwd, \ int *errnop); DECLARE_NSS_PROTOTYPES (files) @@ -27,4 +28,8 @@ DECLARE_NSS_PROTOTYPES (nisplus) #undef DECLARE_NSS_PROTOTYPES +libc_hidden_proto (authdes_getucred) +libc_hidden_proto (xdr_authdes_cred) +libc_hidden_proto (xdr_authdes_verf) + #endif diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h index 14928cc67f..07031c9bd9 100644 --- a/include/rpc/auth_unix.h +++ b/include/rpc/auth_unix.h @@ -1,4 +1,3 @@ #include -extern bool_t xdr_authunix_parms_internal (XDR *__xdrs, - struct authunix_parms *__p); +libc_hidden_proto (xdr_authunix_parms) diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 75d88a65ca..d79a6a7b5b 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -4,44 +4,27 @@ /* Now define the internal interfaces. */ extern int _openchild (const char *command, FILE **fto, FILE **ffrom); -extern CLIENT *clnt_create_internal (__const char *__host, - __const u_long __prog, - __const u_long __vers, - __const char *__prot) attribute_hidden; -extern CLIENT *clnttcp_create_internal (struct sockaddr_in *__raddr, - u_long __prog, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz) attribute_hidden; -extern CLIENT *clntudp_create_internal (struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp) attribute_hidden; -extern CLIENT *clntudp_bufcreate_internal (struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp, u_int __sendsz, - u_int __recvsz) attribute_hidden; extern CLIENT *__libc_clntudp_bufcreate (struct sockaddr_in *__raddr, u_long __program, u_long __version, struct timeval __wait_resend, int *__sockp, u_int __sendsz, u_int __recvsz, int __flags); -extern CLIENT *__libc_clntudp_bufcreate_internal (struct sockaddr_in *__raddr, - u_long __program, - u_long __version, - struct timeval __wait_resend, - int *__sockp, u_int __sendsz, - u_int __recvsz, int __flags) - attribute_hidden; -extern CLIENT *clntunix_create_internal (struct sockaddr_un *__raddr, - u_long __program, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz) attribute_hidden; libc_hidden_proto (clnt_sperrno) libc_hidden_proto (clnt_spcreateerror) libc_hidden_proto (clnt_perror) libc_hidden_proto (clnt_sperror) libc_hidden_proto (_rpc_dtablesize) +libc_hidden_proto (callrpc) +libc_hidden_proto (clnt_create) +libc_hidden_proto (clnt_pcreateerror) +libc_hidden_proto (clnt_perrno) +libc_hidden_proto (clntraw_create) +libc_hidden_proto (clnttcp_create) +libc_hidden_proto (clntudp_bufcreate) +libc_hidden_proto (clntudp_create) +libc_hidden_proto (get_myaddress) +libc_hidden_proto (clntunix_create) +libc_hidden_proto (__libc_clntudp_bufcreate) #endif diff --git a/include/rpc/des_crypt.h b/include/rpc/des_crypt.h index 8c4a60ecee..44f7e669b0 100644 --- a/include/rpc/des_crypt.h +++ b/include/rpc/des_crypt.h @@ -9,5 +9,7 @@ extern int xdecrypt (char *secret, char *passwd); libc_hidden_proto (des_setparity) libc_hidden_proto (ecb_crypt) libc_hidden_proto (cbc_crypt) +libc_hidden_proto (xencrypt) +libc_hidden_proto (xdecrypt) #endif diff --git a/include/rpc/key_prot.h b/include/rpc/key_prot.h index 2da5de7f70..29d14cc8a0 100644 --- a/include/rpc/key_prot.h +++ b/include/rpc/key_prot.h @@ -1,15 +1,12 @@ #include -extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp) - attribute_hidden; -extern bool_t xdr_keystatus_internal (XDR *, keystatus*) attribute_hidden; -extern bool_t xdr_keybuf_internal (XDR *, keybuf) attribute_hidden; -extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*) attribute_hidden; -extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*) - attribute_hidden; -extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*) - attribute_hidden; -extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*) - attribute_hidden; -extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*) attribute_hidden; -extern bool_t xdr_unixcred_internal (XDR *, unixcred*) attribute_hidden; +libc_hidden_proto (xdr_cryptkeyarg) +libc_hidden_proto (xdr_cryptkeyarg2) +libc_hidden_proto (xdr_cryptkeyres) +libc_hidden_proto (xdr_key_netstarg) +libc_hidden_proto (xdr_key_netstres) +libc_hidden_proto (xdr_keybuf) +libc_hidden_proto (xdr_keystatus) +libc_hidden_proto (xdr_getcredres) +libc_hidden_proto (xdr_netnamestr) +libc_hidden_proto (xdr_unixcred) diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h index b9a7063bbe..67628e0589 100644 --- a/include/rpc/pmap_clnt.h +++ b/include/rpc/pmap_clnt.h @@ -14,4 +14,8 @@ extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program, internal_function; libc_hidden_proto (__libc_rpc_getport) +libc_hidden_proto (clnt_broadcast) +libc_hidden_proto (pmap_getmaps) +libc_hidden_proto (pmap_rmtcall) + #endif diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h index 902faba019..2e9076ee3d 100644 --- a/include/rpc/pmap_prot.h +++ b/include/rpc/pmap_prot.h @@ -1,7 +1,4 @@ #include - -extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs) - attribute_hidden; -extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp) - attribute_hidden; +libc_hidden_proto (xdr_pmap) +libc_hidden_proto (xdr_pmaplist) diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h index 63e41cab28..e8822dabe9 100644 --- a/include/rpc/pmap_rmt.h +++ b/include/rpc/pmap_rmt.h @@ -1,7 +1,4 @@ #include -extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs, - struct rmtcallargs *__crp) - attribute_hidden; -extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp) - attribute_hidden; +libc_hidden_proto (xdr_rmtcall_args) +libc_hidden_proto (xdr_rmtcallres) diff --git a/include/rpc/rpc_msg.h b/include/rpc/rpc_msg.h index 3e518c93d4..be1f4838c9 100644 --- a/include/rpc/rpc_msg.h +++ b/include/rpc/rpc_msg.h @@ -7,8 +7,11 @@ libc_hidden_proto (_seterr_reply) extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr); extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar); -extern bool_t xdr_callmsg_internal (XDR *__xdrs, struct rpc_msg *__cmsg); -extern bool_t xdr_callhdr_internal (XDR *__xdrs, struct rpc_msg *__cmsg); -extern bool_t xdr_replymsg_internal (XDR *__xdrs, struct rpc_msg *__rmsg); + +libc_hidden_proto (xdr_accepted_reply) +libc_hidden_proto (xdr_callhdr) +libc_hidden_proto (xdr_callmsg) +libc_hidden_proto (xdr_rejected_reply) +libc_hidden_proto (xdr_replymsg) #endif diff --git a/include/rpc/svc.h b/include/rpc/svc.h index dc758391a2..141971ecf5 100644 --- a/include/rpc/svc.h +++ b/include/rpc/svc.h @@ -10,24 +10,29 @@ libc_hidden_proto (svcerr_noprog) libc_hidden_proto (svcerr_progvers) /* Now define the internal interfaces. */ -extern int registerrpc (u_long prognum, u_long versnum, u_long procnum, - char *(*progname) (char *), xdrproc_t inproc, - xdrproc_t outproc); - extern SVCXPRT *svcfd_create (int fd, u_int sendsize, u_int recvsize); extern int svcudp_enablecache (SVCXPRT *transp, u_long size); extern SVCXPRT *svcunixfd_create (int fd, u_int sendsize, u_int recvsize); -extern bool_t svc_sendreply_internal (SVCXPRT *xprt, xdrproc_t __xdr_results, - caddr_t __xdr_location) attribute_hidden; -extern void svcerr_decode_internal (SVCXPRT *__xprt) attribute_hidden; -extern void svc_getreq_internal (int __rdfds) attribute_hidden; -extern void svc_getreq_common_internal (const int __fd) attribute_hidden; -extern void svc_getreqset_internal (fd_set *__readfds) attribute_hidden; -extern void svc_getreq_poll_internal (struct pollfd *, - const int) attribute_hidden; -extern SVCXPRT *svcudp_create_internal (int __sock) attribute_hidden; -extern SVCXPRT *svcudp_bufcreate_internal (int __sock, u_int __sendsz, - u_int __recvsz) attribute_hidden; + +libc_hidden_proto (svc_exit) +libc_hidden_proto (svc_getreq) +libc_hidden_proto (svc_getreqset) +libc_hidden_proto (svc_run) +libc_hidden_proto (svc_sendreply) +libc_hidden_proto (svcerr_decode) +libc_hidden_proto (svcerr_noproc) +libc_hidden_proto (svcerr_systemerr) +libc_hidden_proto (svcerr_weakauth) +libc_hidden_proto (svcfd_create) +libc_hidden_proto (svcraw_create) +libc_hidden_proto (svctcp_create) +libc_hidden_proto (svcudp_bufcreate) +libc_hidden_proto (svcudp_create) +libc_hidden_proto (svcudp_enablecache) +libc_hidden_proto (svcunix_create) +libc_hidden_proto (svcunixfd_create) +libc_hidden_proto (svc_getreq_common) +libc_hidden_proto (svc_getreq_poll) #endif diff --git a/include/rpc/svc_auth.h b/include/rpc/svc_auth.h index bf5ce91b68..582bb31aea 100644 --- a/include/rpc/svc_auth.h +++ b/include/rpc/svc_auth.h @@ -6,7 +6,7 @@ extern enum auth_stat _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg); extern enum auth_stat _svcauth_short (struct svc_req *rqst, struct rpc_msg *msg); -extern enum auth_stat _authenticate_internal (struct svc_req *__rqst, - struct rpc_msg *__msg) attribute_hidden; + +libc_hidden_proto (_authenticate) #endif diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index e10d53e3b1..57971d0758 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1,54 +1,47 @@ #include -extern bool_t xdr_void_internal (void) attribute_hidden; -extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp) attribute_hidden; -extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp) - attribute_hidden; -extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp) - attribute_hidden; -extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up) - attribute_hidden; -extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp) - attribute_hidden; -extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp) - attribute_hidden; -extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp) - attribute_hidden; -extern bool_t xdr_int_internal (XDR *__xdrs, int *__up) - attribute_hidden; -extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp) - attribute_hidden; -extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep) - attribute_hidden; -extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp, - const struct xdr_discrim *choices, - xdrproc_t dfault) attribute_hidden; -extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize); -extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp, - u_int *__sizep, u_int __maxsize, - u_int __elsize, xdrproc_t __elproc) - attribute_hidden; -extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp, - u_int __size, xdrproc_t __proc) - attribute_hidden; -extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep, - u_int maxsize) attribute_hidden; -extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np) - attribute_hidden; -extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt) - attribute_hidden; -extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize, - u_int __recvsize, caddr_t __tcp_handle, - int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int)) - attribute_hidden; -extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op) - attribute_hidden; -extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow) - attribute_hidden; -extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs) - attribute_hidden; -extern bool_t xdrrec_eof_internal (XDR *__xdrs) - attribute_hidden; - libc_hidden_proto (xdrstdio_create) +libc_hidden_proto (xdr_array) +libc_hidden_proto (xdr_bool) +libc_hidden_proto (xdr_bytes) +libc_hidden_proto (xdr_char) +libc_hidden_proto (xdr_double) +libc_hidden_proto (xdr_enum) +libc_hidden_proto (xdr_float) +libc_hidden_proto (xdr_free) +libc_hidden_proto (xdr_int) +libc_hidden_proto (xdr_long) +libc_hidden_proto (xdr_netobj) +libc_hidden_proto (xdr_opaque) +libc_hidden_proto (xdr_pointer) +libc_hidden_proto (xdr_reference) +libc_hidden_proto (xdr_short) +libc_hidden_proto (xdr_string) +libc_hidden_proto (xdr_u_char) +libc_hidden_proto (xdr_u_int) +libc_hidden_proto (xdr_u_long) +libc_hidden_proto (xdr_u_short) +libc_hidden_proto (xdr_union) +libc_hidden_proto (xdr_vector) +libc_hidden_proto (xdr_void) +libc_hidden_proto (xdr_wrapstring) +libc_hidden_proto (xdrmem_create) +libc_hidden_proto (xdrrec_create) +libc_hidden_proto (xdrrec_endofrecord) +libc_hidden_proto (xdrrec_eof) +libc_hidden_proto (xdrrec_skiprecord) +libc_hidden_proto (xdr_int16_t) +libc_hidden_proto (xdr_int32_t) +libc_hidden_proto (xdr_int8_t) +libc_hidden_proto (xdr_sizeof) +libc_hidden_proto (xdr_uint16_t) +libc_hidden_proto (xdr_uint32_t) +libc_hidden_proto (xdr_uint8_t) +libc_hidden_proto (xdr_hyper) +libc_hidden_proto (xdr_u_hyper) +libc_hidden_proto (xdr_longlong_t) +libc_hidden_proto (xdr_u_longlong_t) +libc_hidden_proto (xdr_int64_t) +libc_hidden_proto (xdr_uint64_t) +libc_hidden_proto (xdr_quad_t) +libc_hidden_proto (xdr_u_quad_t) diff --git a/nis/Makefile b/nis/Makefile index 8083ee8044..f63ada62db 100644 --- a/nis/Makefile +++ b/nis/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1996,1997,1998,2001,2004,2006 Free Software Foundation, Inc. +# Copyright (C) 1996-1998,2001,2004,2006,2011 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -45,9 +45,9 @@ subdir-dirs = $(services:%=nss_%) vpath %.c $(subdir-dirs) libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ - nis_subr nis_local_names nis_free nis_file \ - nis_print nis_error nis_call nis_lookup\ - nis_table nis_xdr nis_server nis_ping \ + nis_subr nis_local_names nis_free nis_file \ + nis_print nis_error nis_call nis_lookup\ + nis_table nis_xdr nis_server nis_ping \ nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\ nis_verifygroup nis_ismember nis_addmember nis_util\ nis_removemember nis_creategroup nis_destroygroup\ @@ -78,7 +78,8 @@ $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version) # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. -$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(common-objpfx)libc.so\ +libnsl-libc = $(common-objpfx)linkobj/libc.so +$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(libnsl-libc) \ $(common-objpfx)libc_nonshared.a diff --git a/nss/Makefile b/nss/Makefile index 04165b7604..2b0432f45c 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1996-1998,2000-2002,2007,2009,2010 +# Copyright (C) 1996-1998,2000-2002,2007,2009,2010,2011 # Free Software Foundation, Inc. # This file is part of the GNU C Library. @@ -83,7 +83,8 @@ endif # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. -$(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so \ +libnss-libc = $(common-objpfx)linkobj/libc.so +$(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \ $(common-objpfx)libc_nonshared.a diff --git a/sunrpc/Makefile b/sunrpc/Makefile index 30f74dc135..f067e92398 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1994-2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1994-2004, 2005, 2006, 2011 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -47,44 +47,52 @@ subdir := sunrpc rpcsvc = bootparam_prot.x nlm_prot.x rstat.x \ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ rusers.x spray.x nfs_prot.x rquota.x key_prot.x -headers = $(addprefix rpc/,auth.h auth_unix.h clnt.h netdb.h pmap_clnt.h \ - pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h svc.h \ - svc_auth.h types.h xdr.h auth_des.h \ - des_crypt.h key_prot.h rpc_des.h) \ - $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h +headers_in_tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \ + pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h \ + svc.h svc_auth.h types.h xdr.h auth_des.h \ + des_crypt.h) +headers_not_in_tirpc = $(addprefix rpc/,netdb.h key_prot.h rpc_des.h) \ + $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h install-others = $(inst_sysconfdir)/rpc generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen generated-dirs := rpcsvc -routines := auth_none auth_unix authuxprot bindrsvprt \ - clnt_gen clnt_perr clnt_raw clnt_simp clnt_tcp \ - clnt_udp rpc_dtable get_myaddr getrpcport \ - pmap_clnt pm_getmaps pm_getport pmap_prot \ - pmap_prot2 pmap_rmt rpc_prot rpc_common rpc_cmsg rpc_thread \ - svc svc_auth svc_authux svc_raw svc_run svc_simple \ - svc_tcp svc_udp xdr xdr_array xdr_float xdr_mem \ - xdr_rec xdr_ref xdr_stdio publickey xdr_sizeof \ - auth_des authdes_prot des_crypt des_impl des_soft \ - key_call key_prot netname openchild rtime svcauth_des xcrypt\ - clnt_unix svc_unix create_xid xdr_intXX_t - -others := rpcinfo +include ../Makeconfig + +ifeq ($(versioning),yes) +need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ + clnt_udp get_myaddr key_call netname pm_getport \ + rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \ + xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio + +routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ + rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \ + pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \ + svc_run svc_simple xdr_float xdr_rec publickey authdes_prot \ + des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ + clnt_unix svc_unix create_xid $(need-export-routines) +# We only add the RPC for compatibility to libc.so. +shared-only-routines = $(routines) +endif + +# We do not build rpcinfo anymore. It is not needed for a bootstrap +# and not wanted on complete systems. +# others := rpcinfo +# install-sbin := rpcinfo install-bin := rpcgen -install-sbin := rpcinfo rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \ rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \ rpc_tblout.o rpc_sample.o # These headers are part of rpcgen. distribute := proto.h rpc_util.h rpc_parse.h rpc_scan.h \ + $(headers_in_tirpc) $(headers_not_in_tirpc) \ $(rpcgen-objs:.o=.c) etc.rpc \ errqueue.h extra-objs = $(rpcgen-objs) all: # Make this the default target; it will be defined in Rules. -include ../Makeconfig - tests = tst-xdrmem tst-xdrmem2 xtests := tst-getmyaddr @@ -108,6 +116,17 @@ librpcsvc-inhibit-o = .os # Build no shared rpcsvc library. omit-deps = $(librpcsvc-routines) endif +ifeq (yes,$(build-shared)) +rpc-compat-routines = $(addprefix compat-,$(need-export-routines)) +rpc-compat-routines.os = $(addprefix $(objpfx), \ + $(addsuffix .os,$(rpc-compat-routines))) +subdir_lib: $(objpfx)librpc_compat_pic.a +$(objpfx)librpc_compat_pic.a: $(rpc-compat-routines.os) + $(AR) cr$(verbose) $@ $^ +$(rpc-compat-routines.os): $(objpfx)compat-%.os: %.c + $(compile-command.c) -DEXPORT_RPC_SYMBOLS +endif + CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag) CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag) CFLAGS-xrstat.c = -Wno-unused $(PIC-ccflag) @@ -131,6 +150,10 @@ CPPFLAGS += -D_RPC_THREAD_SAFE_ include ../Rules +$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so +$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so +$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so + $(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) \ $(sort $(filter $(common-objpfx)libc%,$(link-libc))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 0228562b89..96bbcfc328 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -51,8 +51,6 @@ #define debug(msg) /* printf("%s\n", msg) */ -extern bool_t INTUSE(xdr_authdes_cred) (XDR *, struct authdes_cred *); -extern bool_t INTUSE(xdr_authdes_verf) (XDR *, struct authdes_verf *); /* * DES authenticator operations vector @@ -79,8 +77,8 @@ static const struct auth_ops authdes_ops = { */ struct ad_private { char *ad_fullname; /* client's full name */ - u_int ad_fullnamelen; /* length of name, rounded up */ - char *ad_servername; /* server's full name */ + u_int ad_fullnamelen; /* length of name, rounded up */ + char *ad_servername; /* server's full name */ u_int ad_servernamelen; /* length of name, rounded up */ uint32_t ad_window; /* client specified window */ bool_t ad_dosync; /* synchronize? */ @@ -91,7 +89,7 @@ struct ad_private { struct authdes_verf ad_verf; /* storage for verifier */ struct rpc_timeval ad_timestamp; /* timestamp sent */ des_block ad_xkey; /* encrypted conversation key */ - u_char ad_pkey[1024]; /* Servers actual public key */ + u_char ad_pkey[1024]; /* Servers actual public key */ }; @@ -114,8 +112,13 @@ authdes_create (const char *servername, u_int window, pkey.n_bytes = pkey_data; pkey.n_len = strlen (pkey_data) + 1; - return INTUSE(authdes_pk_create) (servername, &pkey, window, syncaddr, ckey); + return authdes_pk_create (servername, &pkey, window, syncaddr, ckey); } +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (authdes_create) +#else +libc_hidden_nolink (authdes_create, GLIBC_2_1) +#endif AUTH * authdes_pk_create (const char *servername, netobj *pkey, u_int window, @@ -205,7 +208,11 @@ failed: } return NULL; } -INTDEF(authdes_pk_create) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (authdes_pk_create) +#else +libc_hidden_nolink (authdes_pk_create, GLIBC_2_1) +#endif /* * Implement the five authentication operations @@ -309,7 +316,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (INTUSE(xdr_authdes_cred) (xdrs, cred)); + ATTEMPT (xdr_authdes_cred (xdrs, cred)); len = (2 + 1) * BYTES_PER_XDR_UNIT; if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL) @@ -322,7 +329,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs) ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor)); ATTEMPT (xdr_putint32 (xdrs, &len)); } - ATTEMPT (INTUSE(xdr_authdes_verf) (xdrs, verf)); + ATTEMPT (xdr_authdes_verf (xdrs, verf)); return TRUE; } diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c index 57b3418c51..5f252a9544 100644 --- a/sunrpc/auth_none.c +++ b/sunrpc/auth_none.c @@ -81,10 +81,10 @@ authnone_create_once (void) ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ap->no_client.ah_ops = (struct auth_ops *) &ops; xdrs = &xdr_stream; - INTUSE(xdrmem_create) (xdrs, ap->marshalled_client, - (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE); - (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_cred); - (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf); + xdrmem_create (xdrs, ap->marshalled_client, + (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE); + (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); + (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); ap->mcnt = XDR_GETPOS (xdrs); XDR_DESTROY (xdrs); } @@ -95,7 +95,7 @@ authnone_create (void) __libc_once (authnone_private_guard, authnone_create_once); return &authnone_private.no_client; } -INTDEF (authnone_create) +libc_hidden_nolink (authnone_create, GLIBC_2_0) static bool_t authnone_marshal (AUTH *client, XDR *xdrs) diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index 301055bf16..858523eb8d 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -134,8 +134,8 @@ no_memory: /* * Serialize the parameters into origcred */ - INTUSE(xdrmem_create) (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); - if (!INTUSE(xdr_authunix_parms) (&xdrs, &aup)) + xdrmem_create (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE); + if (!xdr_authunix_parms (&xdrs, &aup)) abort (); au->au_origcred.oa_length = len = XDR_GETPOS (&xdrs); au->au_origcred.oa_flavor = AUTH_UNIX; @@ -151,7 +151,7 @@ no_memory: marshal_new_auth (auth); return auth; } -INTDEF (authunix_create) +libc_hidden_nolink (authunix_create, GLIBC_2_0) /* * Returns an auth handle with parameters determined by doing lots of @@ -208,15 +208,18 @@ authunix_create_default (void) /* This braindamaged Sun code forces us here to truncate the list of groups to NGRPS members since the code in authuxprot.c transforms a fixed array. Grrr. */ - AUTH *result = INTUSE(authunix_create) (machname, uid, gid, MIN (NGRPS, len), - gids); + AUTH *result = authunix_create (machname, uid, gid, MIN (NGRPS, len), gids); if (max_nr_groups >= ALLOCA_LIMIT || retry) free (gids); return result; } -INTDEF (authunix_create_default) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (authunix_create_default) +#else +libc_hidden_nolink (authunix_create_default, GLIBC_2_0) +#endif /* * authunix operations @@ -245,8 +248,7 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) if (verf->oa_flavor == AUTH_SHORT) { au = AUTH_PRIVATE (auth); - INTUSE(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) { @@ -254,14 +256,14 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf) au->au_shcred.oa_length); au->au_shcred.oa_base = NULL; } - if (INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred)) + if (xdr_opaque_auth (&xdrs, &au->au_shcred)) { auth->ah_cred = au->au_shcred; } else { xdrs.x_op = XDR_FREE; - (void) INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred); + (void) xdr_opaque_auth (&xdrs, &au->au_shcred); au->au_shcred.oa_base = NULL; auth->ah_cred = au->au_origcred; } @@ -289,9 +291,9 @@ authunix_refresh (AUTH *auth) /* first deserialize the creds back into a struct authunix_parms */ aup.aup_machname = NULL; aup.aup_gids = (gid_t *) NULL; - INTUSE(xdrmem_create) (&xdrs, au->au_origcred.oa_base, - au->au_origcred.oa_length, XDR_DECODE); - stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); + xdrmem_create (&xdrs, au->au_origcred.oa_base, + au->au_origcred.oa_length, XDR_DECODE); + stat = xdr_authunix_parms (&xdrs, &aup); if (!stat) goto done; @@ -300,7 +302,7 @@ authunix_refresh (AUTH *auth) aup.aup_time = now.tv_sec; xdrs.x_op = XDR_ENCODE; XDR_SETPOS (&xdrs, 0); - stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup); + stat = xdr_authunix_parms (&xdrs, &aup); if (!stat) goto done; auth->ah_cred = au->au_origcred; @@ -308,7 +310,7 @@ authunix_refresh (AUTH *auth) done: /* free the struct authunix_parms created by deserializing */ xdrs.x_op = XDR_FREE; - (void) INTUSE(xdr_authunix_parms) (&xdrs, &aup); + (void) xdr_authunix_parms (&xdrs, &aup); XDR_DESTROY (&xdrs); return stat; } @@ -343,9 +345,9 @@ marshal_new_auth (AUTH *auth) XDR *xdrs = &xdr_stream; struct audata *au = AUTH_PRIVATE (auth); - INTUSE(xdrmem_create) (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); - if ((!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_cred))) || - (!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_verf)))) + xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE); + if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) || + (!xdr_opaque_auth (xdrs, &(auth->ah_verf)))) perror (_("auth_unix.c: Fatal marshalling problem")); else au->au_mpos = XDR_GETPOS (xdrs); diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c index 0d1b5353f3..0a25bac143 100644 --- a/sunrpc/authdes_prot.c +++ b/sunrpc/authdes_prot.c @@ -45,26 +45,25 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred) /* * Unrolled xdr */ - ATTEMPT (INTUSE(xdr_enum) (xdrs, (enum_t *) & cred->adc_namekind)); + ATTEMPT (xdr_enum (xdrs, (enum_t *) & cred->adc_namekind)); switch (cred->adc_namekind) { case ADN_FULLNAME: - ATTEMPT (INTUSE(xdr_string) (xdrs, &cred->adc_fullname.name, - MAXNETNAMELEN)); - ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.key, - sizeof (des_block))); - ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.window, - sizeof (cred->adc_fullname.window))); + ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN)); + ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key, + sizeof (des_block))); + ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.window, + sizeof (cred->adc_fullname.window))); return (TRUE); case ADN_NICKNAME: - ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_nickname, - sizeof (cred->adc_nickname))); + ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_nickname, + sizeof (cred->adc_nickname))); return TRUE; default: return FALSE; } } -INTDEF(xdr_authdes_cred) +libc_hidden_nolink (xdr_authdes_cred, GLIBC_2_1) bool_t @@ -73,10 +72,10 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf) /* * Unrolled xdr */ - ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_xtimestamp, - sizeof (des_block))); - ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_int_u, - sizeof (verf->adv_int_u))); + ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp, + sizeof (des_block))); + ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_int_u, + sizeof (verf->adv_int_u))); return TRUE; } -INTDEF(xdr_authdes_verf) +libc_hidden_nolink (xdr_authdes_verf, GLIBC_2_1) diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c index 74db8a24b1..64da1799e0 100644 --- a/sunrpc/authuxprot.c +++ b/sunrpc/authuxprot.c @@ -45,22 +45,22 @@ bool_t xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) { - if (INTUSE(xdr_u_long) (xdrs, &(p->aup_time)) - && INTUSE(xdr_string) (xdrs, &(p->aup_machname), MAX_MACHINE_NAME) + if (xdr_u_long (xdrs, &(p->aup_time)) + && xdr_string (xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && (sizeof (uid_t) == sizeof (short int) - ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_uid)) - : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_uid))) + ? xdr_u_short (xdrs, (u_short *) & (p->aup_uid)) + : xdr_u_int (xdrs, (u_int *) & (p->aup_uid))) && (sizeof (gid_t) == sizeof (short int) - ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_gid)) - : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_gid))) - && INTUSE(xdr_array) (xdrs, (caddr_t *) & (p->aup_gids), - & (p->aup_len), NGRPS, sizeof (gid_t), - (sizeof (gid_t) == sizeof (short int) - ? (xdrproc_t) INTUSE(xdr_u_short) - : (xdrproc_t) INTUSE(xdr_u_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) + ? (xdrproc_t) xdr_u_short + : (xdrproc_t) xdr_u_int))) { return TRUE; } return FALSE; } -INTDEF(xdr_authunix_parms) +libc_hidden_nolink (xdr_authunix_parms, GLIBC_2_0) diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c index a562f41b39..2b7096cf20 100644 --- a/sunrpc/clnt_gen.c +++ b/sunrpc/clnt_gen.c @@ -64,7 +64,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers, sun.sun_family = AF_UNIX; strcpy (sun.sun_path, hostname); sock = RPC_ANYSOCK; - client = INTUSE(clntunix_create) (&sun, prog, vers, &sock, 0, 0); + client = clntunix_create (&sun, prog, vers, &sock, 0, 0); if (client == NULL) return NULL; #if 0 @@ -134,7 +134,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers, case IPPROTO_UDP: tv.tv_sec = 5; tv.tv_usec = 0; - client = INTUSE(clntudp_create) (&sin, prog, vers, tv, &sock); + client = clntudp_create (&sin, prog, vers, tv, &sock); if (client == NULL) { return NULL; @@ -148,7 +148,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers, #endif break; case IPPROTO_TCP: - client = INTUSE(clnttcp_create) (&sin, prog, vers, &sock, 0, 0); + client = clnttcp_create (&sin, prog, vers, &sock, 0, 0); if (client == NULL) { return NULL; @@ -172,4 +172,8 @@ clnt_create (const char *hostname, u_long prog, u_long vers, } return client; } -INTDEF (clnt_create) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (clnt_create) +#else +libc_hidden_nolink (clnt_create, GLIBC_2_0) +#endif diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index f48c53af62..734c2b3636 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -130,14 +130,18 @@ clnt_sperror (CLIENT * rpch, const char *msg) return str; } -libc_hidden_def (clnt_sperror) +libc_hidden_nolink (clnt_sperror, GLIBC_2_0) void clnt_perror (CLIENT * rpch, const char *msg) { (void) __fxprintf (NULL, "%s", clnt_sperror (rpch, msg)); } +#ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnt_perror) +#else +libc_hidden_nolink (clnt_perror, GLIBC_2_0) +#endif struct rpc_errtab @@ -266,7 +270,7 @@ clnt_perrno (enum clnt_stat num) { (void) __fxprintf (NULL, "%s", clnt_sperrno (num)); } - +libc_hidden_nolink (clnt_perrno, GLIBC_2_0) char * clnt_spcreateerror (const char *msg) @@ -303,13 +307,18 @@ clnt_spcreateerror (const char *msg) return str; } -libc_hidden_def (clnt_spcreateerror) +libc_hidden_nolink (clnt_spcreateerror, GLIBC_2_0) void clnt_pcreateerror (const char *msg) { (void) __fxprintf (NULL, "%s", clnt_spcreateerror (msg)); } +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (clnt_pcreateerror) +#else +libc_hidden_nolink (clnt_pcreateerror, GLIBC_2_0) +#endif struct auth_errtab { diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index 7a8030e41f..95e3eae988 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -109,9 +109,8 @@ clntraw_create (u_long prog, u_long vers) call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_vers = vers; - INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE, - XDR_ENCODE); - if (!INTUSE(xdr_callhdr) (xdrs, &call_msg)) + xdrmem_create (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE, XDR_ENCODE); + if (!xdr_callhdr (xdrs, &call_msg)) { perror (_ ("clnt_raw.c: fatal header serialization error")); } @@ -121,15 +120,16 @@ clntraw_create (u_long prog, u_long vers) /* * Set xdrmem for client/server shared buffer */ - INTUSE(xdrmem_create) (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); + xdrmem_create (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE); /* * create client handle */ client->cl_ops = (struct clnt_ops *) &client_ops; - client->cl_auth = INTUSE(authnone_create) (); + client->cl_auth = authnone_create (); return client; } +libc_hidden_nolink (clntraw_create, GLIBC_2_0) static enum clnt_stat clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout) @@ -172,7 +172,7 @@ call_again: * We have to call server input routine here because this is * all going on in one process. Yuk. */ - INTUSE(svc_getreq) (1); + svc_getreq (1); /* * get results @@ -182,7 +182,7 @@ call_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = resultsp; msg.acpted_rply.ar_results.proc = xresults; - if (!INTUSE(xdr_replymsg) (xdrs, &msg)) + if (!xdr_replymsg (xdrs, &msg)) return RPC_CANTDECODERES; _seterr_reply (&msg, &error); status = error.re_status; @@ -209,7 +209,7 @@ call_again: if (msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) INTUSE(xdr_opaque_auth) (xdrs, &(msg.acpted_rply.ar_verf)); + (void) xdr_opaque_auth (xdrs, &(msg.acpted_rply.ar_verf)); } } diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c index b7a64e65b7..d2dd3b307a 100644 --- a/sunrpc/clnt_simp.c +++ b/sunrpc/clnt_simp.c @@ -119,7 +119,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum, memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length); server_addr.sin_family = AF_INET; server_addr.sin_port = 0; - if ((crp->client = INTUSE(clntudp_create) (&server_addr, (u_long) prognum, + if ((crp->client = clntudp_create (&server_addr, (u_long) prognum, (u_long) versnum, timeout, &crp->socket)) == NULL) return (int) get_rpc_createerr().cf_stat; crp->valid = 1; @@ -139,6 +139,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum, crp->valid = 0; return (int) clnt_stat; } +libc_hidden_nolink (callrpc, GLIBC_2_0) #ifdef _RPC_THREAD_SAFE_ void diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 8527868a73..a07f50a1b1 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -188,9 +188,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, - XDR_ENCODE); - if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) + xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); + if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) { @@ -205,11 +204,11 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readtcp, writetcp); + xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readtcp, writetcp); h->cl_ops = (struct clnt_ops *) &tcp_ops; h->cl_private = (caddr_t) ct; - h->cl_auth = INTUSE(authnone_create) (); + h->cl_auth = authnone_create (); return h; fooy: @@ -220,7 +219,11 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return ((CLIENT *) NULL); } -INTDEF (clnttcp_create) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (clnttcp_create) +#else +libc_hidden_nolink (clnttcp_create, GLIBC_2_0) +#endif static enum clnt_stat clnttcp_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) @@ -260,10 +263,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); + (void) xdrrec_endofrecord (xdrs, TRUE); return (ct->ct_error.re_status); } - if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) + if (!xdrrec_endofrecord (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -284,11 +287,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); - if (!INTUSE(xdrrec_skiprecord) (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; + if (!xdrrec_skiprecord (xdrs)) return (ct->ct_error.re_status); /* now decode and validate the response header */ - if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) + if (!xdr_replymsg (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -318,8 +321,7 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) INTUSE(xdr_opaque_auth) (xdrs, - &(reply_msg.acpted_rply.ar_verf)); + (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 6bb1ca37e5..7aa86a64c3 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -57,7 +57,6 @@ #include -extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); extern u_long _create_xid (void); /* @@ -165,8 +164,8 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = program; call_msg.rm_call.cb_vers = version; - INTUSE(xdrmem_create) (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE); - if (!INTUSE(xdr_callhdr) (&(cu->cu_outxdrs), &call_msg)) + xdrmem_create (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE); + if (!xdr_callhdr (&(cu->cu_outxdrs), &call_msg)) { goto fooy; } @@ -229,7 +228,7 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, cu->cu_closeit = FALSE; } cu->cu_sock = *sockp; - cl->cl_auth = INTUSE(authnone_create) (); + cl->cl_auth = authnone_create (); return cl; fooy: if (cu) @@ -238,17 +237,21 @@ fooy: mem_free ((caddr_t) cl, sizeof (CLIENT)); return (CLIENT *) NULL; } -INTDEF (__libc_clntudp_bufcreate) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (__libc_clntudp_bufcreate) +#else +libc_hidden_nolink (__libc_clntudp_bufcreate, GLIBC_PRIVATE) +#endif CLIENT * clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp, u_int sendsz, u_int recvsz) { - return INTUSE(__libc_clntudp_bufcreate) (raddr, program, version, wait, - sockp, sendsz, recvsz, 0); + return __libc_clntudp_bufcreate (raddr, program, version, wait, + sockp, sendsz, recvsz, 0); } -INTDEF (clntudp_bufcreate) +libc_hidden_nolink (clntudp_bufcreate, GLIBC_2_0) CLIENT * clntudp_create (raddr, program, version, wait, sockp) @@ -258,10 +261,14 @@ clntudp_create (raddr, program, version, wait, sockp) struct timeval wait; int *sockp; { - return INTUSE(__libc_clntudp_bufcreate) (raddr, program, version, wait, - sockp, UDPMSGSIZE, UDPMSGSIZE, 0); + return __libc_clntudp_bufcreate (raddr, program, version, wait, + sockp, UDPMSGSIZE, UDPMSGSIZE, 0); } -INTDEF (clntudp_create) +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (clntudp_create) +#else +libc_hidden_nolink (clntudp_create, GLIBC_2_0) +#endif static int is_network_up (int sock) @@ -465,7 +472,7 @@ send_again: continue; /* see if reply transaction id matches sent id. - Don't do this if we only wait for a replay */ + Don't do this if we only wait for a replay */ if (xargs != NULL && (*((u_int32_t *) (cu->cu_inbuf)) != *((u_int32_t *) (cu->cu_outbuf)))) @@ -477,8 +484,8 @@ send_again: /* * now decode and validate the response */ - INTUSE(xdrmem_create) (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); - ok = INTUSE(xdr_replymsg) (&reply_xdrs, &reply_msg); + xdrmem_create (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); + ok = xdr_replymsg (&reply_xdrs, &reply_msg); /* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */ if (ok) { @@ -494,8 +501,7 @@ send_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) INTUSE(xdr_opaque_auth) (xdrs, - &(reply_msg.acpted_rply.ar_verf)); + (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 02b14893da..5d361b3034 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -173,9 +173,8 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, /* * pre-serialize the static part of the call msg and stash it away */ - INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, - XDR_ENCODE); - if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg)) + xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE); + if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg)) { if (ct->ct_closeit) __close (*sockp); @@ -188,11 +187,11 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, * Create a client handle which uses xdrrec for serialization * and authnone for authentication. */ - INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz, - (caddr_t) ct, readunix, writeunix); + xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz, + (caddr_t) ct, readunix, writeunix); h->cl_ops = (struct clnt_ops *) &unix_ops; h->cl_private = (caddr_t) ct; - h->cl_auth = INTUSE(authnone_create) (); + h->cl_auth = authnone_create (); return h; fooy: @@ -203,7 +202,7 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return (CLIENT *) NULL; } -INTDEF (clntunix_create) +libc_hidden_nolink (clntunix_create, GLIBC_2_1) static enum clnt_stat clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) @@ -243,10 +242,10 @@ call_again: { if (ct->ct_error.re_status == RPC_SUCCESS) ct->ct_error.re_status = RPC_CANTENCODEARGS; - (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE); + (void) xdrrec_endofrecord (xdrs, TRUE); return ct->ct_error.re_status; } - if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow)) + if (!xdrrec_endofrecord (xdrs, shipnow)) return ct->ct_error.re_status = RPC_CANTSEND; if (!shipnow) return RPC_SUCCESS; @@ -265,11 +264,11 @@ call_again: { reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_results.where = NULL; - reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void); - if (!INTUSE(xdrrec_skiprecord) (xdrs)) + reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; + if (!xdrrec_skiprecord (xdrs)) return ct->ct_error.re_status; /* now decode and validate the response header */ - if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg)) + if (!xdr_replymsg (xdrs, &reply_msg)) { if (ct->ct_error.re_status == RPC_SUCCESS) continue; @@ -299,8 +298,7 @@ call_again: if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { xdrs->x_op = XDR_FREE; - (void) INTUSE(xdr_opaque_auth) (xdrs, - &(reply_msg.acpted_rply.ar_verf)); + (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf)); } } /* end successful completion */ else @@ -549,18 +547,18 @@ readunix (char *ctptr, char *buf, int len) while (TRUE) { switch (__poll (&fd, 1, milliseconds)) - { - case 0: - ct->ct_error.re_status = RPC_TIMEDOUT; - return -1; - - case -1: - if (errno == EINTR) - continue; - ct->ct_error.re_status = RPC_CANTRECV; - ct->ct_error.re_errno = errno; - return -1; - } + { + case 0: + ct->ct_error.re_status = RPC_TIMEDOUT; + return -1; + + case -1: + if (errno == EINTR) + continue; + ct->ct_error.re_status = RPC_CANTRECV; + ct->ct_error.re_errno = errno; + return -1; + } break; } switch (len = __msgread (ct->ct_sock, buf, len)) diff --git a/sunrpc/des_crypt.c b/sunrpc/des_crypt.c index 57dce6ae88..8745900b82 100644 --- a/sunrpc/des_crypt.c +++ b/sunrpc/des_crypt.c @@ -32,6 +32,7 @@ #include #include +#include #include "des.h" extern int _des_crypt (char *, unsigned, struct desparams *); @@ -101,7 +102,7 @@ cbc_crypt (char *key, char *buf, unsigned int len, unsigned int mode, COPY8 (dp.des_ivec, ivec); return err; } -libc_hidden_def (cbc_crypt) +libc_hidden_nolink (cbc_crypt, GLIBC_2_1) /* * ECB mode encryption @@ -114,4 +115,4 @@ ecb_crypt (char *key, char *buf, unsigned int len, unsigned int mode) dp.des_mode = ECB; return common_crypt (key, buf, len, mode, &dp); } -libc_hidden_def (ecb_crypt) +libc_hidden_nolink (ecb_crypt, GLIBC_2_1) diff --git a/sunrpc/des_soft.c b/sunrpc/des_soft.c index 20a3214dab..27d918c64d 100644 --- a/sunrpc/des_soft.c +++ b/sunrpc/des_soft.c @@ -32,6 +32,7 @@ static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/ */ #include +#include /* * Table giving odd parity in the low bit for ASCII characters */ @@ -69,4 +70,4 @@ des_setparity (char *p) p++; } } -libc_hidden_def (des_setparity) +libc_hidden_nolink (des_setparity, GLIBC_2_1) diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c index 1906cfad43..def5b7a74a 100644 --- a/sunrpc/get_myaddr.c +++ b/sunrpc/get_myaddr.c @@ -96,3 +96,8 @@ get_myaddress (struct sockaddr_in *addr) if no interface is up. Probably this won't happen (at least loopback is there) but still... */ } +#ifdef EXPORT_RPC_SYMBOLS +libc_hidden_def (get_myaddress) +#else +libc_hidden_nolink (get_myaddress, GLIBC_2_0) +#endif diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c index 4ab6b97bc6..6d08bf8e80 100644 --- a/sunrpc/key_call.c +++ b/sunrpc/key_call.c @@ -70,8 +70,8 @@ key_setsecret (char *secretkey) { keystatus status; - if (!key_call (