mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Obsolete RPC implementation in libc.
This commit is contained in:
parent
e6c6149412
commit
7b57bfe598
74
ChangeLog
74
ChangeLog
@ -1,3 +1,77 @@
|
||||
2011-04-16 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* 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 <drepper@gmail.com>
|
||||
|
||||
[BZ #12650]
|
||||
|
16
Makefile
16
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.
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
8
NEWS
8
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
|
||||
|
||||
|
@ -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
|
||||
@ -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)
|
||||
|
@ -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
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <sunrpc/rpc/auth_des.h>
|
||||
|
||||
libc_hidden_proto (getpublickey)
|
||||
libc_hidden_proto (getsecretkey)
|
||||
libc_hidden_proto (rtime)
|
||||
|
||||
extern bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred);
|
||||
@ -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
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <sunrpc/rpc/auth_unix.h>
|
||||
|
||||
extern bool_t xdr_authunix_parms_internal (XDR *__xdrs,
|
||||
struct authunix_parms *__p);
|
||||
libc_hidden_proto (xdr_authunix_parms)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,15 +1,12 @@
|
||||
#include <sunrpc/rpc/key_prot.h>
|
||||
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include <sunrpc/rpc/pmap_prot.h>
|
||||
|
||||
|
||||
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)
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include <sunrpc/rpc/pmap_rmt.h>
|
||||
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,54 +1,47 @@
|
||||
#include <sunrpc/rpc/xdr.h>
|
||||
|
||||
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)
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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) \
|
||||
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
|
||||
include ../Makeconfig
|
||||
|
||||
others := rpcinfo
|
||||
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)
|
||||
|
@ -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
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
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);
|
||||
(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)
|
||||
|
@ -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,
|
||||
xdrmem_create (&xdrs, au->au_origcred.oa_base,
|
||||
au->au_origcred.oa_length, XDR_DECODE);
|
||||
stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup);
|
||||
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);
|
||||
|
@ -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,
|
||||
ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN));
|
||||
ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key,
|
||||
sizeof (des_block)));
|
||||
ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.window,
|
||||
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,
|
||||
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,
|
||||
ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp,
|
||||
sizeof (des_block)));
|
||||
ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_int_u,
|
||||
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)
|
||||
|
@ -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),
|
||||
? 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) INTUSE(xdr_u_short)
|
||||
: (xdrproc_t) INTUSE(xdr_u_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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
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
|
||||
|
@ -57,7 +57,6 @@
|
||||
|
||||
#include <kernel-features.h>
|
||||
|
||||
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,
|
||||
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,
|
||||
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)
|
||||
@ -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
|
||||
|
@ -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,
|
||||
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
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <rpc/des_crypt.h>
|
||||
#include <abi-versions.h>
|
||||
#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)
|
||||
|
@ -32,6 +32,7 @@ static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/
|
||||
*/
|
||||
|
||||
#include <rpc/des_crypt.h>
|
||||
#include <abi-versions.h>
|
||||
/*
|
||||
* 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)
|
||||
|
@ -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
|
||||
|
@ -70,8 +70,8 @@ key_setsecret (char *secretkey)
|
||||
{
|
||||
keystatus status;
|
||||
|
||||
if (!key_call ((u_long) KEY_SET, (xdrproc_t) INTUSE(xdr_keybuf), secretkey,
|
||||
(xdrproc_t) INTUSE(xdr_keystatus), (char *) &status))
|
||||
if (!key_call ((u_long) KEY_SET, (xdrproc_t) xdr_keybuf, secretkey,
|
||||
(xdrproc_t) xdr_keystatus, (char *) &status))
|
||||
return -1;
|
||||
if (status != KEY_SUCCESS)
|
||||
{
|
||||
@ -80,6 +80,7 @@ key_setsecret (char *secretkey)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_nolink (key_setsecret, GLIBC_2_1)
|
||||
|
||||
/* key_secretkey_is_set() returns 1 if the keyserver has a secret key
|
||||
* stored for the caller's effective uid; it returns 0 otherwise
|
||||
@ -93,8 +94,8 @@ key_secretkey_is_set (void)
|
||||
struct key_netstres kres;
|
||||
|
||||
memset (&kres, 0, sizeof (kres));
|
||||
if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) INTUSE(xdr_void),
|
||||
(char *) NULL, (xdrproc_t) INTUSE(xdr_key_netstres),
|
||||
if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) xdr_void,
|
||||
(char *) NULL, (xdrproc_t) xdr_key_netstres,
|
||||
(char *) &kres) &&
|
||||
(kres.status == KEY_SUCCESS) &&
|
||||
(kres.key_netstres_u.knet.st_priv_key[0] != 0))
|
||||
@ -105,6 +106,11 @@ key_secretkey_is_set (void)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (key_secretkey_is_set)
|
||||
#else
|
||||
libc_hidden_nolink (key_secretkey_is_set, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
int
|
||||
key_encryptsession (char *remotename, des_block *deskey)
|
||||
@ -114,8 +120,8 @@ key_encryptsession (char *remotename, des_block *deskey)
|
||||
|
||||
arg.remotename = remotename;
|
||||
arg.deskey = *deskey;
|
||||
if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg),
|
||||
(char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
|
||||
if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) xdr_cryptkeyarg,
|
||||
(char *) &arg, (xdrproc_t) xdr_cryptkeyres,
|
||||
(char *) &res))
|
||||
return -1;
|
||||
|
||||
@ -127,6 +133,7 @@ key_encryptsession (char *remotename, des_block *deskey)
|
||||
*deskey = res.cryptkeyres_u.deskey;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_nolink (key_encryptsession, GLIBC_2_1)
|
||||
|
||||
int
|
||||
key_decryptsession (char *remotename, des_block *deskey)
|
||||
@ -136,8 +143,8 @@ key_decryptsession (char *remotename, des_block *deskey)
|
||||
|
||||
arg.remotename = remotename;
|
||||
arg.deskey = *deskey;
|
||||
if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg),
|
||||
(char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
|
||||
if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) xdr_cryptkeyarg,
|
||||
(char *) &arg, (xdrproc_t) xdr_cryptkeyres,
|
||||
(char *) &res))
|
||||
return -1;
|
||||
if (res.status != KEY_SUCCESS)
|
||||
@ -148,6 +155,7 @@ key_decryptsession (char *remotename, des_block *deskey)
|
||||
*deskey = res.cryptkeyres_u.deskey;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_nolink (key_decryptsession, GLIBC_2_1)
|
||||
|
||||
int
|
||||
key_encryptsession_pk (char *remotename, netobj *remotekey,
|
||||
@ -159,8 +167,8 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
|
||||
arg.remotename = remotename;
|
||||
arg.remotekey = *remotekey;
|
||||
arg.deskey = *deskey;
|
||||
if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2),
|
||||
(char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
|
||||
if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2,
|
||||
(char *) &arg, (xdrproc_t) xdr_cryptkeyres,
|
||||
(char *) &res))
|
||||
return -1;
|
||||
|
||||
@ -172,7 +180,7 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
|
||||
*deskey = res.cryptkeyres_u.deskey;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_def (key_encryptsession_pk)
|
||||
libc_hidden_nolink (key_encryptsession_pk, GLIBC_2_1)
|
||||
|
||||
int
|
||||
key_decryptsession_pk (char *remotename, netobj *remotekey,
|
||||
@ -184,8 +192,8 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
|
||||
arg.remotename = remotename;
|
||||
arg.remotekey = *remotekey;
|
||||
arg.deskey = *deskey;
|
||||
if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2),
|
||||
(char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
|
||||
if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2,
|
||||
(char *) &arg, (xdrproc_t) xdr_cryptkeyres,
|
||||
(char *) &res))
|
||||
return -1;
|
||||
|
||||
@ -197,7 +205,7 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
|
||||
*deskey = res.cryptkeyres_u.deskey;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_def (key_decryptsession_pk)
|
||||
libc_hidden_nolink (key_decryptsession_pk, GLIBC_2_1)
|
||||
|
||||
int
|
||||
key_gendes (des_block *key)
|
||||
@ -212,14 +220,14 @@ key_gendes (des_block *key)
|
||||
sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
|
||||
__bzero (sin.sin_zero, sizeof (sin.sin_zero));
|
||||
socket = RPC_ANYSOCK;
|
||||
client = INTUSE(clntudp_bufcreate) (&sin, (u_long) KEY_PROG,
|
||||
(u_long) KEY_VERS, trytimeout, &socket,
|
||||
RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
client = clntudp_bufcreate (&sin, (u_long) KEY_PROG, (u_long) KEY_VERS,
|
||||
trytimeout, &socket, RPCSMALLMSGSIZE,
|
||||
RPCSMALLMSGSIZE);
|
||||
if (client == NULL)
|
||||
return -1;
|
||||
|
||||
stat = clnt_call (client, KEY_GEN, (xdrproc_t) INTUSE(xdr_void), NULL,
|
||||
(xdrproc_t) INTUSE(xdr_des_block), (caddr_t) key,
|
||||
stat = clnt_call (client, KEY_GEN, (xdrproc_t) xdr_void, NULL,
|
||||
(xdrproc_t) xdr_des_block, (caddr_t) key,
|
||||
tottimeout);
|
||||
clnt_destroy (client);
|
||||
__close (socket);
|
||||
@ -228,15 +236,19 @@ key_gendes (des_block *key)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (key_gendes)
|
||||
#else
|
||||
libc_hidden_nolink (key_gendes, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
int
|
||||
key_setnet (struct key_netstarg *arg)
|
||||
{
|
||||
keystatus status;
|
||||
|
||||
if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) INTUSE(xdr_key_netstarg),
|
||||
(char *) arg,(xdrproc_t) INTUSE(xdr_keystatus),
|
||||
if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) xdr_key_netstarg,
|
||||
(char *) arg,(xdrproc_t) xdr_keystatus,
|
||||
(char *) &status))
|
||||
return -1;
|
||||
|
||||
@ -247,14 +259,15 @@ key_setnet (struct key_netstarg *arg)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_nolink (key_setnet, GLIBC_2_1)
|
||||
|
||||
int
|
||||
key_get_conv (char *pkey, des_block *deskey)
|
||||
{
|
||||
cryptkeyres res;
|
||||
|
||||
if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) INTUSE(xdr_keybuf), pkey,
|
||||
(xdrproc_t) INTUSE(xdr_cryptkeyres), (char *) &res))
|
||||
if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) xdr_keybuf, pkey,
|
||||
(xdrproc_t) xdr_cryptkeyres, (char *) &res))
|
||||
return -1;
|
||||
|
||||
if (res.status != KEY_SUCCESS)
|
||||
@ -265,6 +278,7 @@ key_get_conv (char *pkey, des_block *deskey)
|
||||
*deskey = res.cryptkeyres_u.deskey;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_nolink (key_get_conv, GLIBC_2_1)
|
||||
|
||||
/*
|
||||
* Hack to allow the keyserver to use AUTH_DES (for authenticated
|
||||
@ -322,7 +336,7 @@ key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg,
|
||||
xdrstdio_create (&xdrargs, fargs, XDR_ENCODE);
|
||||
xdrstdio_create (&xdrrslt, frslt, XDR_DECODE);
|
||||
|
||||
if (!INTUSE(xdr_u_long) (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg))
|
||||
if (!xdr_u_long (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg))
|
||||
{
|
||||
debug ("xdr args");
|
||||
success = 0;
|
||||
@ -424,7 +438,7 @@ getkeyserv_handle (int vers)
|
||||
kcp->uid = __geteuid ();
|
||||
auth_destroy (kcp->client->cl_auth);
|
||||
kcp->client->cl_auth =
|
||||
INTUSE(authunix_create) ((char *)"", kcp->uid, 0, 0, NULL);
|
||||
authunix_create ((char *)"", kcp->uid, 0, 0, NULL);
|
||||
if (kcp->client->cl_auth == NULL)
|
||||
{
|
||||
clnt_destroy (kcp->client);
|
||||
@ -439,16 +453,14 @@ getkeyserv_handle (int vers)
|
||||
|
||||
if ((kcp->client == (CLIENT *) NULL))
|
||||
/* Use the AF_UNIX transport */
|
||||
kcp->client = INTUSE(clnt_create) ("/var/run/keyservsock", KEY_PROG, vers,
|
||||
"unix");
|
||||
kcp->client = clnt_create ("/var/run/keyservsock", KEY_PROG, vers, "unix");
|
||||
|
||||
if (kcp->client == (CLIENT *) NULL)
|
||||
return (CLIENT *) NULL;
|
||||
|
||||
kcp->uid = __geteuid ();
|
||||
kcp->pid = __getpid ();
|
||||
kcp->client->cl_auth = INTUSE(authunix_create) ((char *)"", kcp->uid, 0, 0,
|
||||
NULL);
|
||||
kcp->client->cl_auth = authunix_create ((char *)"", kcp->uid, 0, 0, NULL);
|
||||
if (kcp->client->cl_auth == NULL)
|
||||
{
|
||||
clnt_destroy (kcp->client);
|
||||
|
@ -28,73 +28,73 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "rpc/key_prot.h"
|
||||
#include <rpc/key_prot.h>
|
||||
|
||||
bool_t
|
||||
xdr_keystatus (XDR * xdrs, keystatus * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_enum) (xdrs, (enum_t *) objp))
|
||||
if (!xdr_enum (xdrs, (enum_t *) objp))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_keystatus)
|
||||
libc_hidden_nolink (xdr_keystatus, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_keybuf (XDR * xdrs, keybuf objp)
|
||||
{
|
||||
if (!INTUSE(xdr_opaque) (xdrs, objp, HEXKEYBYTES))
|
||||
if (!xdr_opaque (xdrs, objp, HEXKEYBYTES))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_keybuf)
|
||||
libc_hidden_nolink (xdr_keybuf, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_netnamestr (XDR * xdrs, netnamestr * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_string) (xdrs, objp, MAXNETNAMELEN))
|
||||
if (!xdr_string (xdrs, objp, MAXNETNAMELEN))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_netnamestr)
|
||||
libc_hidden_nolink (xdr_netnamestr, GLIBC_2_1)
|
||||
|
||||
bool_t
|
||||
xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename))
|
||||
if (!xdr_netnamestr (xdrs, &objp->remotename))
|
||||
return FALSE;
|
||||
|
||||
if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey))
|
||||
if (!xdr_des_block (xdrs, &objp->deskey))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_cryptkeyarg)
|
||||
libc_hidden_nolink (xdr_cryptkeyarg, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename))
|
||||
if (!xdr_netnamestr (xdrs, &objp->remotename))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_netobj) (xdrs, &objp->remotekey))
|
||||
if (!xdr_netobj (xdrs, &objp->remotekey))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey))
|
||||
if (!xdr_des_block (xdrs, &objp->deskey))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_cryptkeyarg2)
|
||||
libc_hidden_nolink (xdr_cryptkeyarg2, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
|
||||
if (!xdr_keystatus (xdrs, &objp->status))
|
||||
return FALSE;
|
||||
switch (objp->status)
|
||||
{
|
||||
case KEY_SUCCESS:
|
||||
if (!INTUSE(xdr_des_block) (xdrs, &objp->cryptkeyres_u.deskey))
|
||||
if (!xdr_des_block (xdrs, &objp->cryptkeyres_u.deskey))
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
@ -102,32 +102,32 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_cryptkeyres)
|
||||
libc_hidden_nolink (xdr_cryptkeyres, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_unixcred (XDR * xdrs, unixcred * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_u_int) (xdrs, &objp->uid))
|
||||
if (!xdr_u_int (xdrs, &objp->uid))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_u_int) (xdrs, &objp->gid))
|
||||
if (!xdr_u_int (xdrs, &objp->gid))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_array) (xdrs, (void *) &objp->gids.gids_val,
|
||||
if (!xdr_array (xdrs, (void *) &objp->gids.gids_val,
|
||||
(u_int *) & objp->gids.gids_len, MAXGIDS,
|
||||
sizeof (u_int), (xdrproc_t) INTUSE(xdr_u_int)))
|
||||
sizeof (u_int), (xdrproc_t) xdr_u_int))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_unixcred)
|
||||
libc_hidden_nolink (xdr_unixcred, GLIBC_2_1)
|
||||
|
||||
bool_t
|
||||
xdr_getcredres (XDR * xdrs, getcredres * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
|
||||
if (!xdr_keystatus (xdrs, &objp->status))
|
||||
return FALSE;
|
||||
switch (objp->status)
|
||||
{
|
||||
case KEY_SUCCESS:
|
||||
if (!INTUSE(xdr_unixcred) (xdrs, &objp->getcredres_u.cred))
|
||||
if (!xdr_unixcred (xdrs, &objp->getcredres_u.cred))
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
@ -135,29 +135,30 @@ xdr_getcredres (XDR * xdrs, getcredres * objp)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
libc_hidden_nolink (xdr_getcredres, GLIBC_2_1)
|
||||
|
||||
bool_t
|
||||
xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_keybuf) (xdrs, objp->st_priv_key))
|
||||
if (!xdr_keybuf (xdrs, objp->st_priv_key))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_keybuf) (xdrs, objp->st_pub_key))
|
||||
if (!xdr_keybuf (xdrs, objp->st_pub_key))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_netnamestr) (xdrs, &objp->st_netname))
|
||||
if (!xdr_netnamestr (xdrs, &objp->st_netname))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_key_netstarg)
|
||||
libc_hidden_nolink (xdr_key_netstarg, GLIBC_2_0)
|
||||
|
||||
bool_t
|
||||
xdr_key_netstres (XDR * xdrs, key_netstres * objp)
|
||||
{
|
||||
if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
|
||||
if (!xdr_keystatus (xdrs, &objp->status))
|
||||
return FALSE;
|
||||
switch (objp->status)
|
||||
{
|
||||
case KEY_SUCCESS:
|
||||
if (!INTUSE(xdr_key_netstarg) (xdrs, &objp->key_netstres_u.knet))
|
||||
if (!xdr_key_netstarg (xdrs, &objp->key_netstres_u.knet))
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
@ -165,4 +166,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_key_netstres)
|
||||
libc_hidden_nolink (xdr_key_netstres, GLIBC_2_0)
|
||||
|
@ -55,7 +55,7 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
|
||||
netname[i - 1] = '\0';
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_def (user2netname)
|
||||
libc_hidden_nolink (user2netname, GLIBC_2_1)
|
||||
|
||||
int
|
||||
host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
|
||||
@ -116,7 +116,11 @@ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
|
||||
sprintf (netname, "%s.%s@%s", OPSYS, hostname, domainname);
|
||||
return 1;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (host2netname)
|
||||
#else
|
||||
libc_hidden_nolink (host2netname, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
int
|
||||
getnetname (char name[MAXNETNAMELEN + 1])
|
||||
@ -131,7 +135,7 @@ getnetname (char name[MAXNETNAMELEN + 1])
|
||||
dummy = user2netname (name, uid, NULL);
|
||||
return (dummy);
|
||||
}
|
||||
libc_hidden_def (getnetname)
|
||||
libc_hidden_nolink (getnetname, GLIBC_2_1)
|
||||
|
||||
/* Type of the lookup function for netname2user. */
|
||||
typedef int (*netname2user_function) (const char netname[MAXNETNAMELEN + 1],
|
||||
@ -181,7 +185,11 @@ netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
|
||||
|
||||
return status == NSS_STATUS_SUCCESS;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (netname2user)
|
||||
#else
|
||||
libc_hidden_nolink (netname2user, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
int
|
||||
netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
|
||||
@ -208,3 +216,4 @@ netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
|
||||
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_nolink (netname2host, GLIBC_2_1)
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <errno.h>
|
||||
#include <libintl.h>
|
||||
#include <unistd.h>
|
||||
#include <not-cancel.h>
|
||||
|
||||
|
||||
/*
|
||||
@ -66,12 +67,11 @@ pmap_getmaps (struct sockaddr_in *address)
|
||||
if (socket != -1)
|
||||
closeit = true;
|
||||
|
||||
client = INTUSE(clnttcp_create) (address, PMAPPROG,
|
||||
PMAPVERS, &socket, 50, 500);
|
||||
client = clnttcp_create (address, PMAPPROG, PMAPVERS, &socket, 50, 500);
|
||||
if (client != (CLIENT *) NULL)
|
||||
{
|
||||
if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL,
|
||||
(xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head,
|
||||
if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL,
|
||||
(xdrproc_t)xdr_pmaplist, (caddr_t)&head,
|
||||
minutetimeout) != RPC_SUCCESS)
|
||||
{
|
||||
clnt_perror (client, _("pmap_getmaps.c: rpc problem"));
|
||||
@ -80,7 +80,8 @@ pmap_getmaps (struct sockaddr_in *address)
|
||||
}
|
||||
/* We only need to close the socket here if we opened it. */
|
||||
if (closeit)
|
||||
(void) __close (socket);
|
||||
close_not_cancel (socket);
|
||||
address->sin_port = 0;
|
||||
return head;
|
||||
}
|
||||
libc_hidden_nolink (pmap_getmaps, GLIBC_2_0)
|
||||
|
@ -107,13 +107,12 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
|
||||
socket = __get_socket(address);
|
||||
if (socket != -1)
|
||||
closeit = true;
|
||||
client = INTUSE(clnttcp_create) (address, PMAPPROG, PMAPVERS, &socket,
|
||||
client = clnttcp_create (address, PMAPPROG, PMAPVERS, &socket,
|
||||
RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
}
|
||||
else
|
||||
client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout,
|
||||
&socket, RPCSMALLMSGSIZE,
|
||||
RPCSMALLMSGSIZE);
|
||||
client = clntudp_bufcreate (address, PMAPPROG, PMAPVERS, timeout,
|
||||
&socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
if (client != (CLIENT *) NULL)
|
||||
{
|
||||
struct rpc_createerr *ce = &get_rpc_createerr ();
|
||||
@ -121,8 +120,8 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
|
||||
parms.pm_vers = version;
|
||||
parms.pm_prot = protocol;
|
||||
parms.pm_port = 0; /* not needed or used */
|
||||
if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)INTUSE(xdr_pmap),
|
||||
(caddr_t)&parms, (xdrproc_t)INTUSE(xdr_u_short),
|
||||
if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap,
|
||||
(caddr_t)&parms, (xdrproc_t)xdr_u_short,
|
||||
(caddr_t)&port, tottimeout) != RPC_SUCCESS)
|
||||
{
|
||||
ce->cf_stat = RPC_PMAPFAILURE;
|
||||
@ -140,7 +139,11 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
|
||||
address->sin_port = 0;
|
||||
return port;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (__libc_rpc_getport)
|
||||
#else
|
||||
libc_hidden_nolink (__libc_rpc_getport, GLIBC_PRIVATE)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@ -157,4 +160,4 @@ pmap_getport (address, program, version, protocol)
|
||||
{
|
||||
return __libc_rpc_getport (address, program, version, protocol, 5, 60);
|
||||
}
|
||||
libc_hidden_def (pmap_getport)
|
||||
libc_hidden_nolink (pmap_getport, GLIBC_2_0)
|
||||
|
@ -112,17 +112,16 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
|
||||
|
||||
if (!__get_myaddress (&myaddress))
|
||||
return FALSE;
|
||||
client = INTUSE(clntudp_bufcreate) (&myaddress, PMAPPROG, PMAPVERS,
|
||||
timeout, &socket, RPCSMALLMSGSIZE,
|
||||
RPCSMALLMSGSIZE);
|
||||
client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket,
|
||||
RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
if (client == (CLIENT *) NULL)
|
||||
return (FALSE);
|
||||
parms.pm_prog = program;
|
||||
parms.pm_vers = version;
|
||||
parms.pm_prot = protocol;
|
||||
parms.pm_port = port;
|
||||
if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)INTUSE(xdr_pmap),
|
||||
(caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt,
|
||||
if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)xdr_pmap,
|
||||
(caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
|
||||
tottimeout) != RPC_SUCCESS)
|
||||
{
|
||||
clnt_perror (client, _("Cannot register service"));
|
||||
@ -132,7 +131,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
|
||||
/* (void)close(socket); CLNT_DESTROY closes it */
|
||||
return rslt;
|
||||
}
|
||||
libc_hidden_def (pmap_set)
|
||||
libc_hidden_nolink (pmap_set, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* Remove the mapping between program,version and port.
|
||||
@ -149,19 +148,18 @@ pmap_unset (u_long program, u_long version)
|
||||
|
||||
if (!__get_myaddress (&myaddress))
|
||||
return FALSE;
|
||||
client = INTUSE(clntudp_bufcreate) (&myaddress, PMAPPROG, PMAPVERS,
|
||||
timeout, &socket, RPCSMALLMSGSIZE,
|
||||
RPCSMALLMSGSIZE);
|
||||
client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket,
|
||||
RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
|
||||
if (client == (CLIENT *) NULL)
|
||||
return FALSE;
|
||||
parms.pm_prog = program;
|
||||
parms.pm_vers = version;
|
||||
parms.pm_port = parms.pm_prot = 0;
|
||||
CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)INTUSE(xdr_pmap),
|
||||
(caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt,
|
||||
CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)xdr_pmap,
|
||||
(caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
|
||||
tottimeout);
|
||||
CLNT_DESTROY (client);
|
||||
/* (void)close(socket); CLNT_DESTROY already closed it */
|
||||
return rslt;
|
||||
}
|
||||
libc_hidden_def (pmap_unset)
|
||||
libc_hidden_nolink (pmap_unset, GLIBC_2_0)
|
||||
|
@ -43,10 +43,10 @@ xdr_pmap (xdrs, regs)
|
||||
struct pmap *regs;
|
||||
{
|
||||
|
||||
if (INTUSE(xdr_u_long) (xdrs, ®s->pm_prog) &&
|
||||
INTUSE(xdr_u_long) (xdrs, ®s->pm_vers) &&
|
||||
INTUSE(xdr_u_long) (xdrs, ®s->pm_prot))
|
||||
return INTUSE(xdr_u_long) (xdrs, ®s->pm_port);
|
||||
if (xdr_u_long (xdrs, ®s->pm_prog) &&
|
||||
xdr_u_long (xdrs, ®s->pm_vers) &&
|
||||
xdr_u_long (xdrs, ®s->pm_prot))
|
||||
return xdr_u_long (xdrs, ®s->pm_port);
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_pmap)
|
||||
libc_hidden_nolink (xdr_pmap, GLIBC_2_0)
|
||||
|
@ -92,7 +92,7 @@ xdr_pmaplist (xdrs, rp)
|
||||
while (TRUE)
|
||||
{
|
||||
more_elements = (bool_t) (*rp != NULL);
|
||||
if (!INTUSE(xdr_bool) (xdrs, &more_elements))
|
||||
if (!xdr_bool (xdrs, &more_elements))
|
||||
return FALSE;
|
||||
if (!more_elements)
|
||||
return TRUE; /* we are done */
|
||||
@ -103,11 +103,11 @@ xdr_pmaplist (xdrs, rp)
|
||||
*/
|
||||
if (freeing)
|
||||
next = (*rp)->pml_next;
|
||||
if (!INTUSE(xdr_reference) (xdrs, (caddr_t *) rp,
|
||||
if (!xdr_reference (xdrs, (caddr_t *) rp,
|
||||
(u_int) sizeof (struct pmaplist),
|
||||
(xdrproc_t) INTUSE(xdr_pmap)))
|
||||
(xdrproc_t) xdr_pmap))
|
||||
return FALSE;
|
||||
rp = freeing ? &next : &((*rp)->pml_next);
|
||||
}
|
||||
}
|
||||
INTDEF(xdr_pmaplist)
|
||||
libc_hidden_nolink (xdr_pmaplist, GLIBC_2_0)
|
||||
|
@ -79,7 +79,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
|
||||
enum clnt_stat stat;
|
||||
|
||||
addr->sin_port = htons (PMAPPORT);
|
||||
client = INTUSE(clntudp_create) (addr, PMAPPROG, PMAPVERS, timeout, &socket);
|
||||
client = clntudp_create (addr, PMAPPROG, PMAPVERS, timeout, &socket);
|
||||
if (client != (CLIENT *) NULL)
|
||||
{
|
||||
a.prog = prog;
|
||||
@ -91,8 +91,8 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
|
||||
r.results_ptr = resp;
|
||||
r.xdr_results = xdrres;
|
||||
stat = CLNT_CALL (client, PMAPPROC_CALLIT,
|
||||
(xdrproc_t)INTUSE(xdr_rmtcall_args),
|
||||
(caddr_t)&a, (xdrproc_t)INTUSE(xdr_rmtcallres),
|
||||
(xdrproc_t)xdr_rmtcall_args,
|
||||
(caddr_t)&a, (xdrproc_t)xdr_rmtcallres,
|
||||
(caddr_t)&r, tout);
|
||||
CLNT_DESTROY (client);
|
||||
}
|
||||
@ -104,6 +104,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
|
||||
addr->sin_port = 0;
|
||||
return stat;
|
||||
}
|
||||
libc_hidden_nolink (pmap_rmtcall, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -115,13 +116,13 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
|
||||
{
|
||||
u_int lenposition, argposition, position;
|
||||
|
||||
if (INTUSE(xdr_u_long) (xdrs, &(cap->prog)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cap->vers)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cap->proc)))
|
||||
if (xdr_u_long (xdrs, &(cap->prog)) &&
|
||||
xdr_u_long (xdrs, &(cap->vers)) &&
|
||||
xdr_u_long (xdrs, &(cap->proc)))
|
||||
{
|
||||
u_long dummy_arglen = 0;
|
||||
lenposition = XDR_GETPOS (xdrs);
|
||||
if (!INTUSE(xdr_u_long) (xdrs, &dummy_arglen))
|
||||
if (!xdr_u_long (xdrs, &dummy_arglen))
|
||||
return FALSE;
|
||||
argposition = XDR_GETPOS (xdrs);
|
||||
if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
|
||||
@ -129,14 +130,14 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
|
||||
position = XDR_GETPOS (xdrs);
|
||||
cap->arglen = (u_long) position - (u_long) argposition;
|
||||
XDR_SETPOS (xdrs, lenposition);
|
||||
if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen)))
|
||||
if (!xdr_u_long (xdrs, &(cap->arglen)))
|
||||
return FALSE;
|
||||
XDR_SETPOS (xdrs, position);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_rmtcall_args)
|
||||
libc_hidden_nolink (xdr_rmtcall_args, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* XDR remote call results
|
||||
@ -150,16 +151,16 @@ xdr_rmtcallres (xdrs, crp)
|
||||
caddr_t port_ptr;
|
||||
|
||||
port_ptr = (caddr_t) crp->port_ptr;
|
||||
if (INTUSE(xdr_reference) (xdrs, &port_ptr, sizeof (u_long),
|
||||
(xdrproc_t) INTUSE(xdr_u_long))
|
||||
&& INTUSE(xdr_u_long) (xdrs, &crp->resultslen))
|
||||
if (xdr_reference (xdrs, &port_ptr, sizeof (u_long),
|
||||
(xdrproc_t) xdr_u_long)
|
||||
&& xdr_u_long (xdrs, &crp->resultslen))
|
||||
{
|
||||
crp->port_ptr = (u_long *) port_ptr;
|
||||
return (*(crp->xdr_results)) (xdrs, crp->results_ptr);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_rmtcallres)
|
||||
libc_hidden_nolink (xdr_rmtcallres, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -212,7 +213,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
resultproc_t eachresult; /* call with each result obtained */
|
||||
{
|
||||
enum clnt_stat stat = RPC_FAILED;
|
||||
AUTH *unix_auth = INTUSE(authunix_create_default) ();
|
||||
AUTH *unix_auth = authunix_create_default ();
|
||||
XDR xdr_stream;
|
||||
XDR *xdrs = &xdr_stream;
|
||||
struct timeval t;
|
||||
@ -276,9 +277,9 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
r.port_ptr = &port;
|
||||
r.xdr_results = xresults;
|
||||
r.results_ptr = resultsp;
|
||||
INTUSE(xdrmem_create) (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
|
||||
if ((!INTUSE(xdr_callmsg) (xdrs, &msg))
|
||||
|| (!INTUSE(xdr_rmtcall_args) (xdrs, &a)))
|
||||
xdrmem_create (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
|
||||
if ((!xdr_callmsg (xdrs, &msg))
|
||||
|| (!xdr_rmtcall_args (xdrs, &a)))
|
||||
{
|
||||
stat = RPC_CANTENCODEARGS;
|
||||
goto done_broad;
|
||||
@ -311,7 +312,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
recv_again:
|
||||
msg.acpted_rply.ar_verf = _null_auth;
|
||||
msg.acpted_rply.ar_results.where = (caddr_t) & r;
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t) INTUSE(xdr_rmtcallres);
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres;
|
||||
milliseconds = t.tv_sec * 1000 + t.tv_usec / 1000;
|
||||
switch (__poll(&fd, 1, milliseconds))
|
||||
{
|
||||
@ -346,8 +347,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
* see if reply transaction id matches sent id.
|
||||
* If so, decode the results.
|
||||
*/
|
||||
INTUSE(xdrmem_create) (xdrs, inbuf, (u_int) inlen, XDR_DECODE);
|
||||
if (INTUSE(xdr_replymsg) (xdrs, &msg))
|
||||
xdrmem_create (xdrs, inbuf, (u_int) inlen, XDR_DECODE);
|
||||
if (xdr_replymsg (xdrs, &msg))
|
||||
{
|
||||
if (((u_int32_t) msg.rm_xid == (u_int32_t) xid) &&
|
||||
(msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
|
||||
@ -368,8 +369,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
#endif
|
||||
}
|
||||
xdrs->x_op = XDR_FREE;
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void);
|
||||
(void) INTUSE(xdr_replymsg) (xdrs, &msg);
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
|
||||
(void) xdr_replymsg (xdrs, &msg);
|
||||
(void) (*xresults) (xdrs, resultsp);
|
||||
xdr_destroy (xdrs);
|
||||
if (done)
|
||||
@ -387,3 +388,4 @@ done_broad:
|
||||
AUTH_DESTROY (unix_auth);
|
||||
return stat;
|
||||
}
|
||||
libc_hidden_nolink (clnt_broadcast, GLIBC_2_0)
|
||||
|
@ -76,7 +76,7 @@ getpublickey (const char *name, char *key)
|
||||
|
||||
return status == NSS_STATUS_SUCCESS;
|
||||
}
|
||||
libc_hidden_def (getpublickey)
|
||||
libc_hidden_nolink (getpublickey, GLIBC_2_0)
|
||||
|
||||
|
||||
int
|
||||
@ -119,3 +119,4 @@ getsecretkey (const char *name, char *key, const char *passwd)
|
||||
|
||||
return status == NSS_STATUS_SUCCESS;
|
||||
}
|
||||
libc_hidden_nolink (getsecretkey, GLIBC_2_0)
|
||||
|
@ -125,7 +125,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
||||
buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
|
||||
if (buf == NULL)
|
||||
{
|
||||
if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
|
||||
if (xdr_opaque (xdrs, oa->oa_base,
|
||||
oa->oa_length) == FALSE)
|
||||
return FALSE;
|
||||
}
|
||||
@ -142,8 +142,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
||||
buf = XDR_INLINE (xdrs, 2 * BYTES_PER_XDR_UNIT);
|
||||
if (buf == NULL)
|
||||
{
|
||||
if (INTUSE(xdr_enum) (xdrs, &oa->oa_flavor) == FALSE ||
|
||||
INTUSE(xdr_u_int) (xdrs, &oa->oa_length) == FALSE)
|
||||
if (xdr_enum (xdrs, &oa->oa_flavor) == FALSE ||
|
||||
xdr_u_int (xdrs, &oa->oa_length) == FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -165,7 +165,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
||||
buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
|
||||
if (buf == NULL)
|
||||
{
|
||||
if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
|
||||
if (xdr_opaque (xdrs, oa->oa_base,
|
||||
oa->oa_length) == FALSE)
|
||||
return FALSE;
|
||||
}
|
||||
@ -182,16 +182,16 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
|
||||
}
|
||||
}
|
||||
if (
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) &&
|
||||
INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_xid)) &&
|
||||
xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
|
||||
(cmsg->rm_direction == CALL) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
|
||||
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_proc)) &&
|
||||
INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_cred)))
|
||||
return INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_verf));
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_proc)) &&
|
||||
xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_cred)))
|
||||
return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_callmsg)
|
||||
libc_hidden_nolink (xdr_callmsg, GLIBC_2_0)
|
||||
|
@ -28,6 +28,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <rpc/rpc.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#ifdef _RPC_THREAD_SAFE_
|
||||
#undef svc_fdset
|
||||
@ -44,7 +45,7 @@
|
||||
section but we cannot add const to the type because this isn't how
|
||||
the variable is declared. So we use the section attribute. */
|
||||
struct opaque_auth _null_auth __attribute__ ((nocommon));
|
||||
libc_hidden_def (_null_auth)
|
||||
libc_hidden_nolink (_null_auth, GLIBC_2_0)
|
||||
fd_set svc_fdset;
|
||||
struct rpc_createerr rpc_createerr;
|
||||
struct pollfd *svc_pollfd;
|
||||
|
@ -46,4 +46,4 @@ _rpc_dtablesize (void)
|
||||
|
||||
return size;
|
||||
}
|
||||
libc_hidden_def (_rpc_dtablesize)
|
||||
libc_hidden_nolink (_rpc_dtablesize, GLIBC_2_0)
|
||||
|
@ -52,12 +52,12 @@ bool_t
|
||||
xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
|
||||
{
|
||||
|
||||
if (INTUSE(xdr_enum) (xdrs, &(ap->oa_flavor)))
|
||||
return INTUSE(xdr_bytes) (xdrs, &ap->oa_base,
|
||||
if (xdr_enum (xdrs, &(ap->oa_flavor)))
|
||||
return xdr_bytes (xdrs, &ap->oa_base,
|
||||
&ap->oa_length, MAX_AUTH_BYTES);
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_opaque_auth)
|
||||
libc_hidden_nolink (xdr_opaque_auth, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* XDR a DES block
|
||||
@ -65,9 +65,9 @@ INTDEF(xdr_opaque_auth)
|
||||
bool_t
|
||||
xdr_des_block (XDR *xdrs, des_block *blkp)
|
||||
{
|
||||
return INTUSE(xdr_opaque) (xdrs, (caddr_t) blkp, sizeof (des_block));
|
||||
return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block));
|
||||
}
|
||||
INTDEF(xdr_des_block)
|
||||
libc_hidden_nolink (xdr_des_block, GLIBC_2_0)
|
||||
|
||||
/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
|
||||
|
||||
@ -78,24 +78,24 @@ bool_t
|
||||
xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
|
||||
{
|
||||
/* personalized union, rather than calling xdr_union */
|
||||
if (!INTUSE(xdr_opaque_auth) (xdrs, &(ar->ar_verf)))
|
||||
if (!xdr_opaque_auth (xdrs, &(ar->ar_verf)))
|
||||
return FALSE;
|
||||
if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (ar->ar_stat)))
|
||||
if (!xdr_enum (xdrs, (enum_t *) & (ar->ar_stat)))
|
||||
return FALSE;
|
||||
switch (ar->ar_stat)
|
||||
{
|
||||
case SUCCESS:
|
||||
return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where));
|
||||
case PROG_MISMATCH:
|
||||
if (!INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.low)))
|
||||
if (!xdr_u_long (xdrs, &(ar->ar_vers.low)))
|
||||
return FALSE;
|
||||
return (INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.high)));
|
||||
return (xdr_u_long (xdrs, &(ar->ar_vers.high)));
|
||||
default:
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE; /* TRUE => open ended set of problems */
|
||||
}
|
||||
INTDEF(xdr_accepted_reply)
|
||||
libc_hidden_nolink (xdr_accepted_reply, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* XDR the MSG_DENIED part of a reply message union
|
||||
@ -104,26 +104,26 @@ bool_t
|
||||
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
|
||||
{
|
||||
/* personalized union, rather than calling xdr_union */
|
||||
if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_stat)))
|
||||
if (!xdr_enum (xdrs, (enum_t *) & (rr->rj_stat)))
|
||||
return FALSE;
|
||||
switch (rr->rj_stat)
|
||||
{
|
||||
case RPC_MISMATCH:
|
||||
if (!INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.low)))
|
||||
if (!xdr_u_long (xdrs, &(rr->rj_vers.low)))
|
||||
return FALSE;
|
||||
return INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.high));
|
||||
return xdr_u_long (xdrs, &(rr->rj_vers.high));
|
||||
|
||||
case AUTH_ERROR:
|
||||
return INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_why));
|
||||
return xdr_enum (xdrs, (enum_t *) & (rr->rj_why));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_rejected_reply)
|
||||
libc_hidden_nolink (xdr_rejected_reply, GLIBC_2_0)
|
||||
|
||||
static const struct xdr_discrim reply_dscrm[3] =
|
||||
{
|
||||
{(int) MSG_ACCEPTED, (xdrproc_t) INTUSE(xdr_accepted_reply)},
|
||||
{(int) MSG_DENIED, (xdrproc_t) INTUSE(xdr_rejected_reply)},
|
||||
{(int) MSG_ACCEPTED, (xdrproc_t) xdr_accepted_reply},
|
||||
{(int) MSG_DENIED, (xdrproc_t) xdr_rejected_reply},
|
||||
{__dontcare__, NULL_xdrproc_t}};
|
||||
|
||||
/*
|
||||
@ -134,15 +134,15 @@ xdr_replymsg (xdrs, rmsg)
|
||||
XDR *xdrs;
|
||||
struct rpc_msg *rmsg;
|
||||
{
|
||||
if (INTUSE(xdr_u_long) (xdrs, &(rmsg->rm_xid)) &&
|
||||
INTUSE(xdr_enum) (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
|
||||
if (xdr_u_long (xdrs, &(rmsg->rm_xid)) &&
|
||||
xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
|
||||
(rmsg->rm_direction == REPLY))
|
||||
return INTUSE(xdr_union) (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
|
||||
return xdr_union (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
|
||||
(caddr_t) & (rmsg->rm_reply.ru), reply_dscrm,
|
||||
NULL_xdrproc_t);
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_replymsg)
|
||||
libc_hidden_nolink (xdr_replymsg, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -160,14 +160,14 @@ xdr_callhdr (xdrs, cmsg)
|
||||
cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
|
||||
if (
|
||||
(xdrs->x_op == XDR_ENCODE) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) &&
|
||||
INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
|
||||
INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)))
|
||||
return INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers));
|
||||
xdr_u_long (xdrs, &(cmsg->rm_xid)) &&
|
||||
xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
|
||||
xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)))
|
||||
return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_callhdr)
|
||||
libc_hidden_nolink (xdr_callhdr, GLIBC_2_0)
|
||||
|
||||
/* ************************** Client utility routine ************* */
|
||||
|
||||
@ -277,4 +277,4 @@ _seterr_reply (struct rpc_msg *msg,
|
||||
break;
|
||||
}
|
||||
}
|
||||
libc_hidden_def (_seterr_reply)
|
||||
libc_hidden_nolink (_seterr_reply, GLIBC_2_0)
|
||||
|
@ -97,7 +97,7 @@ __rpc_thread_svc_fdset (void)
|
||||
return &svc_fdset;
|
||||
return &tvp->svc_fdset_s;
|
||||
}
|
||||
libc_hidden_def (__rpc_thread_svc_fdset)
|
||||
libc_hidden_nolink (__rpc_thread_svc_fdset, GLIBC_2_2_3)
|
||||
|
||||
struct rpc_createerr *
|
||||
__rpc_thread_createerr (void)
|
||||
@ -109,7 +109,7 @@ __rpc_thread_createerr (void)
|
||||
return &rpc_createerr;
|
||||
return &tvp->rpc_createerr_s;
|
||||
}
|
||||
libc_hidden_def (__rpc_thread_createerr)
|
||||
libc_hidden_nolink (__rpc_thread_createerr, GLIBC_2_2_3)
|
||||
|
||||
struct pollfd **
|
||||
__rpc_thread_svc_pollfd (void)
|
||||
@ -121,7 +121,11 @@ __rpc_thread_svc_pollfd (void)
|
||||
return &svc_pollfd;
|
||||
return &tvp->svc_pollfd_s;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (__rpc_thread_svc_pollfd)
|
||||
#else
|
||||
libc_hidden_nolink (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
|
||||
#endif
|
||||
|
||||
int *
|
||||
__rpc_thread_svc_max_pollfd (void)
|
||||
@ -133,6 +137,10 @@ __rpc_thread_svc_max_pollfd (void)
|
||||
return &svc_max_pollfd;
|
||||
return &tvp->svc_max_pollfd_s;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (__rpc_thread_svc_max_pollfd)
|
||||
#else
|
||||
libc_hidden_nolink (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
|
||||
#endif
|
||||
|
||||
#endif /* _RPC_THREAD_SAFE_ */
|
||||
|
@ -140,4 +140,4 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep,
|
||||
timep->tv_usec = 0;
|
||||
return 0;
|
||||
}
|
||||
libc_hidden_def (rtime)
|
||||
libc_hidden_nolink (rtime, GLIBC_2_1)
|
||||
|
61
sunrpc/svc.c
61
sunrpc/svc.c
@ -115,7 +115,7 @@ xprt_register (SVCXPRT *xprt)
|
||||
POLLRDNORM | POLLRDBAND);
|
||||
}
|
||||
}
|
||||
libc_hidden_def (xprt_register)
|
||||
libc_hidden_nolink (xprt_register, GLIBC_2_0)
|
||||
|
||||
/* De-activate a transport handle. */
|
||||
void
|
||||
@ -136,7 +136,11 @@ xprt_unregister (SVCXPRT *xprt)
|
||||
svc_pollfd[i].fd = -1;
|
||||
}
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xprt_unregister)
|
||||
#else
|
||||
libc_hidden_nolink (xprt_unregister, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
|
||||
/* ********************** CALLOUT list related stuff ************* */
|
||||
@ -211,7 +215,11 @@ pmap_it:
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svc_register)
|
||||
#else
|
||||
libc_hidden_nolink (svc_register, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/* Remove a service program from the callout list. */
|
||||
void
|
||||
@ -234,7 +242,7 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
|
||||
if (! svc_is_mapped (prog, vers))
|
||||
pmap_unset (prog, vers);
|
||||
}
|
||||
libc_hidden_def (svc_unregister)
|
||||
libc_hidden_nolink (svc_unregister, GLIBC_2_0)
|
||||
|
||||
/* ******************* REPLY GENERATION ROUTINES ************ */
|
||||
|
||||
@ -253,7 +261,11 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
|
||||
rply.acpted_rply.ar_results.proc = xdr_results;
|
||||
return SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
INTDEF (svc_sendreply)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svc_sendreply)
|
||||
#else
|
||||
libc_hidden_nolink (svc_sendreply, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/* No procedure error reply */
|
||||
void
|
||||
@ -267,6 +279,11 @@ svcerr_noproc (register SVCXPRT *xprt)
|
||||
rply.acpted_rply.ar_stat = PROC_UNAVAIL;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svcerr_noproc)
|
||||
#else
|
||||
libc_hidden_nolink (svcerr_noproc, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/* Can't decode args error reply */
|
||||
void
|
||||
@ -280,7 +297,11 @@ svcerr_decode (register SVCXPRT *xprt)
|
||||
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
INTDEF (svcerr_decode)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svcerr_decode)
|
||||
#else
|
||||
libc_hidden_nolink (svcerr_decode, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/* Some system error */
|
||||
void
|
||||
@ -294,6 +315,11 @@ svcerr_systemerr (register SVCXPRT *xprt)
|
||||
rply.acpted_rply.ar_stat = SYSTEM_ERR;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svcerr_systemerr)
|
||||
#else
|
||||
libc_hidden_nolink (svcerr_systemerr, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/* Authentication error reply */
|
||||
void
|
||||
@ -307,7 +333,7 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
|
||||
rply.rjcted_rply.rj_why = why;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
libc_hidden_def (svcerr_auth)
|
||||
libc_hidden_nolink (svcerr_auth, GLIBC_2_0)
|
||||
|
||||
/* Auth too weak error reply */
|
||||
void
|
||||
@ -315,6 +341,7 @@ svcerr_weakauth (SVCXPRT *xprt)
|
||||
{
|
||||
svcerr_auth (xprt, AUTH_TOOWEAK);
|
||||
}
|
||||
libc_hidden_nolink (svcerr_weakauth, GLIBC_2_0)
|
||||
|
||||
/* Program unavailable error reply */
|
||||
void
|
||||
@ -328,7 +355,7 @@ svcerr_noprog (register SVCXPRT *xprt)
|
||||
rply.acpted_rply.ar_stat = PROG_UNAVAIL;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
libc_hidden_def (svcerr_noprog)
|
||||
libc_hidden_nolink (svcerr_noprog, GLIBC_2_0)
|
||||
|
||||
/* Program version mismatch error reply */
|
||||
void
|
||||
@ -345,7 +372,7 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
|
||||
rply.acpted_rply.ar_vers.high = high_vers;
|
||||
SVC_REPLY (xprt, &rply);
|
||||
}
|
||||
libc_hidden_def (svcerr_progvers)
|
||||
libc_hidden_nolink (svcerr_progvers, GLIBC_2_0)
|
||||
|
||||
/* ******************* SERVER INPUT STUFF ******************* */
|
||||
|
||||
@ -372,9 +399,9 @@ svc_getreq (int rdfds)
|
||||
|
||||
FD_ZERO (&readfds);
|
||||
readfds.fds_bits[0] = rdfds;
|
||||
INTUSE(svc_getreqset) (&readfds);
|
||||
svc_getreqset (&readfds);
|
||||
}
|
||||
INTDEF (svc_getreq)
|
||||
libc_hidden_nolink (svc_getreq, GLIBC_2_0)
|
||||
|
||||
void
|
||||
svc_getreqset (fd_set *readfds)
|
||||
@ -391,9 +418,9 @@ svc_getreqset (fd_set *readfds)
|
||||
maskp = readfds->fds_bits;
|
||||
for (sock = 0; sock < setsize; sock += NFDBITS)
|
||||
for (mask = *maskp++; (bit = ffsl (mask)); mask ^= (1L << (bit - 1)))
|
||||
INTUSE(svc_getreq_common) (sock + bit - 1);
|
||||
svc_getreq_common (sock + bit - 1);
|
||||
}
|
||||
INTDEF (svc_getreqset)
|
||||
libc_hidden_nolink (svc_getreqset, GLIBC_2_0)
|
||||
|
||||
void
|
||||
svc_getreq_poll (struct pollfd *pfdp, int pollretval)
|
||||
@ -412,14 +439,18 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
|
||||
if (p->revents & POLLNVAL)
|
||||
xprt_unregister (xports[p->fd]);
|
||||
else
|
||||
INTUSE(svc_getreq_common) (p->fd);
|
||||
svc_getreq_common (p->fd);
|
||||
|
||||
if (++fds_found >= pollretval)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
INTDEF (svc_getreq_poll)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svc_getreq_poll)
|
||||
#else
|
||||
libc_hidden_nolink (svc_getreq_poll, GLIBC_2_2)
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
@ -465,7 +496,7 @@ svc_getreq_common (const int fd)
|
||||
r.rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
|
||||
r.rq_xprt->xp_verf.oa_length = 0;
|
||||
}
|
||||
else if ((why = INTUSE(_authenticate) (&r, &msg)) != AUTH_OK)
|
||||
else if ((why = _authenticate (&r, &msg)) != AUTH_OK)
|
||||
{
|
||||
svcerr_auth (xprt, why);
|
||||
goto call_done;
|
||||
@ -511,7 +542,7 @@ svc_getreq_common (const int fd)
|
||||
}
|
||||
while (stat == XPRT_MOREREQS);
|
||||
}
|
||||
INTDEF (svc_getreq_common)
|
||||
libc_hidden_nolink (svc_getreq_common, GLIBC_2_2)
|
||||
|
||||
#ifdef _RPC_THREAD_SAFE_
|
||||
|
||||
|
@ -105,7 +105,7 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
|
||||
|
||||
return AUTH_REJECTEDCRED;
|
||||
}
|
||||
INTDEF(_authenticate)
|
||||
libc_hidden_nolink (_authenticate, GLIBC_2_1)
|
||||
|
||||
static enum auth_stat
|
||||
_svcauth_null (struct svc_req *rqst, struct rpc_msg *msg)
|
||||
|
@ -67,8 +67,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
|
||||
aup->aup_machname = area->area_machname;
|
||||
aup->aup_gids = area->area_gids;
|
||||
auth_len = (u_int) msg->rm_call.cb_cred.oa_length;
|
||||
INTUSE(xdrmem_create) (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len,
|
||||
XDR_DECODE);
|
||||
xdrmem_create (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, XDR_DECODE);
|
||||
buf = XDR_INLINE (&xdrs, auth_len);
|
||||
if (buf != NULL)
|
||||
{
|
||||
@ -106,10 +105,10 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
else if (!INTUSE(xdr_authunix_parms) (&xdrs, aup))
|
||||
else if (!xdr_authunix_parms (&xdrs, aup))
|
||||
{
|
||||
xdrs.x_op = XDR_FREE;
|
||||
(void) INTUSE(xdr_authunix_parms) (&xdrs, aup);
|
||||
(void) xdr_authunix_parms (&xdrs, aup);
|
||||
stat = AUTH_BADCRED;
|
||||
goto done;
|
||||
}
|
||||
|
@ -85,10 +85,10 @@ svcraw_create (void)
|
||||
srp->server.xp_port = 0;
|
||||
srp->server.xp_ops = (struct xp_ops *) &server_ops;
|
||||
srp->server.xp_verf.oa_base = srp->verf_body;
|
||||
INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE,
|
||||
XDR_FREE);
|
||||
xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE);
|
||||
return &srp->server;
|
||||
}
|
||||
libc_hidden_nolink (svcraw_create, GLIBC_2_0)
|
||||
|
||||
static enum xprt_stat
|
||||
svcraw_stat (SVCXPRT *xprt)
|
||||
@ -109,7 +109,7 @@ svcraw_recv (xprt, msg)
|
||||
xdrs = &srp->xdr_stream;
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
XDR_SETPOS (xdrs, 0);
|
||||
if (!INTUSE(xdr_callmsg) (xdrs, msg))
|
||||
if (!xdr_callmsg (xdrs, msg))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@ -125,7 +125,7 @@ svcraw_reply (SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
xdrs = &srp->xdr_stream;
|
||||
xdrs->x_op = XDR_ENCODE;
|
||||
XDR_SETPOS (xdrs, 0);
|
||||
if (!INTUSE(xdr_replymsg) (xdrs, msg))
|
||||
if (!xdr_replymsg (xdrs, msg))
|
||||
return FALSE;
|
||||
(void) XDR_GETPOS (xdrs); /* called just for overhead */
|
||||
return TRUE;
|
||||
|
@ -46,6 +46,7 @@ svc_exit (void)
|
||||
svc_pollfd = NULL;
|
||||
svc_max_pollfd = 0;
|
||||
}
|
||||
libc_hidden_nolink (svc_exit, GLIBC_2_0)
|
||||
|
||||
void
|
||||
svc_run (void)
|
||||
@ -92,7 +93,7 @@ svc_run (void)
|
||||
case 0:
|
||||
continue;
|
||||
default:
|
||||
INTUSE(svc_getreq_poll) (my_pollfd, i);
|
||||
svc_getreq_poll (my_pollfd, i);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@ -100,3 +101,4 @@ svc_run (void)
|
||||
|
||||
free (my_pollfd);
|
||||
}
|
||||
libc_hidden_nolink (svc_run, GLIBC_2_0)
|
||||
|
@ -69,7 +69,7 @@ static SVCXPRT *transp;
|
||||
#endif
|
||||
|
||||
int
|
||||
registerrpc (u_long prognum, u_long versnum, u_long procnum,
|
||||
__registerrpc (u_long prognum, u_long versnum, u_long procnum,
|
||||
char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
|
||||
{
|
||||
struct proglst_ *pl;
|
||||
@ -85,7 +85,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum,
|
||||
}
|
||||
if (transp == 0)
|
||||
{
|
||||
transp = INTUSE(svcudp_create) (RPC_ANYSOCK);
|
||||
transp = svcudp_create (RPC_ANYSOCK);
|
||||
if (transp == NULL)
|
||||
{
|
||||
buf = strdup (_("couldn't create an rpc server\n"));
|
||||
@ -123,6 +123,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum,
|
||||
free (buf);
|
||||
return -1;
|
||||
}
|
||||
compat_symbol (libc, __registerrpc, registerrpc, GLIBC_2_0);
|
||||
|
||||
static void
|
||||
universal (struct svc_req *rqstp, SVCXPRT *transp_l)
|
||||
@ -138,7 +139,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l)
|
||||
*/
|
||||
if (rqstp->rq_proc == NULLPROC)
|
||||
{
|
||||
if (INTUSE(svc_sendreply) (transp_l, (xdrproc_t)INTUSE(xdr_void),
|
||||
if (svc_sendreply (transp_l, (xdrproc_t)xdr_void,
|
||||
(char *) NULL) == FALSE)
|
||||
{
|
||||
__write (STDERR_FILENO, "xxx\n", 4);
|
||||
@ -155,14 +156,14 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l)
|
||||
__bzero (xdrbuf, sizeof (xdrbuf)); /* required ! */
|
||||
if (!svc_getargs (transp_l, pl->p_inproc, xdrbuf))
|
||||
{
|
||||
INTUSE(svcerr_decode) (transp_l);
|
||||
svcerr_decode (transp_l);
|
||||
return;
|
||||
}
|
||||
outdata = (*(pl->p_progname)) (xdrbuf);
|
||||
if (outdata == NULL && pl->p_outproc != (xdrproc_t)INTUSE(xdr_void))
|
||||
if (outdata == NULL && pl->p_outproc != (xdrproc_t)xdr_void)
|
||||
/* there was an error */
|
||||
return;
|
||||
if (!INTUSE(svc_sendreply) (transp_l, pl->p_outproc, outdata))
|
||||
if (!svc_sendreply (transp_l, pl->p_outproc, outdata))
|
||||
{
|
||||
if (__asprintf (&buf, _("trouble replying to prog %d\n"),
|
||||
pl->p_prognum) < 0)
|
||||
|
@ -186,6 +186,11 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
|
||||
xprt_register (xprt);
|
||||
return xprt;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svctcp_create)
|
||||
#else
|
||||
libc_hidden_nolink (svctcp_create, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Like svtcp_create(), except the routine takes any *open* UNIX file
|
||||
@ -196,6 +201,7 @@ svcfd_create (int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
return makefd_xprt (fd, sendsize, recvsize);
|
||||
}
|
||||
libc_hidden_nolink (svcfd_create, GLIBC_2_0)
|
||||
|
||||
static SVCXPRT *
|
||||
internal_function
|
||||
@ -215,7 +221,7 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
|
||||
return NULL;
|
||||
}
|
||||
cd->strm_stat = XPRT_IDLE;
|
||||
INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize,
|
||||
xdrrec_create (&(cd->xdrs), sendsize, recvsize,
|
||||
(caddr_t) xprt, readtcp, writetcp);
|
||||
xprt->xp_p2 = NULL;
|
||||
xprt->xp_p1 = (caddr_t) cd;
|
||||
@ -353,7 +359,7 @@ svctcp_stat (SVCXPRT *xprt)
|
||||
|
||||
if (cd->strm_stat == XPRT_DIED)
|
||||
return XPRT_DIED;
|
||||
if (!INTUSE(xdrrec_eof) (&(cd->xdrs)))
|
||||
if (!xdrrec_eof (&(cd->xdrs)))
|
||||
return XPRT_MOREREQS;
|
||||
return XPRT_IDLE;
|
||||
}
|
||||
@ -365,8 +371,8 @@ svctcp_recv (SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
XDR *xdrs = &(cd->xdrs);
|
||||
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
(void) INTUSE(xdrrec_skiprecord) (xdrs);
|
||||
if (INTUSE(xdr_callmsg) (xdrs, msg))
|
||||
(void) xdrrec_skiprecord (xdrs);
|
||||
if (xdr_callmsg (xdrs, msg))
|
||||
{
|
||||
cd->x_id = msg->rm_xid;
|
||||
return TRUE;
|
||||
@ -400,7 +406,7 @@ svctcp_reply (SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
|
||||
xdrs->x_op = XDR_ENCODE;
|
||||
msg->rm_xid = cd->x_id;
|
||||
stat = INTUSE(xdr_replymsg) (xdrs, msg);
|
||||
(void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
|
||||
stat = xdr_replymsg (xdrs, msg);
|
||||
(void) xdrrec_endofrecord (xdrs, TRUE);
|
||||
return stat;
|
||||
}
|
||||
|
@ -152,8 +152,7 @@ svcudp_bufcreate (sock, sendsz, recvsz)
|
||||
}
|
||||
su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4;
|
||||
rpc_buffer (xprt) = buf;
|
||||
INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz,
|
||||
XDR_DECODE);
|
||||
xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE);
|
||||
su->su_cache = NULL;
|
||||
xprt->xp_p2 = (caddr_t) su;
|
||||
xprt->xp_verf.oa_base = su->su_verfbody;
|
||||
@ -184,15 +183,19 @@ svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
|
||||
xprt_register (xprt);
|
||||
return xprt;
|
||||
}
|
||||
INTDEF (svcudp_bufcreate)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (svcudp_bufcreate)
|
||||
#else
|
||||
libc_hidden_nolink (svcudp_bufcreate, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
SVCXPRT *
|
||||
svcudp_create (sock)
|
||||
int sock;
|
||||
{
|
||||
return INTUSE(svcudp_bufcreate) (sock, UDPMSGSIZE, UDPMSGSIZE);
|
||||
return svcudp_bufcreate (sock, UDPMSGSIZE, UDPMSGSIZE);
|
||||
}
|
||||
INTDEF (svcudp_create)
|
||||
libc_hidden_nolink (svcudp_create, GLIBC_2_0)
|
||||
|
||||
static enum xprt_stat
|
||||
svcudp_stat (xprt)
|
||||
@ -278,7 +281,7 @@ again:
|
||||
return FALSE;
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
XDR_SETPOS (xdrs, 0);
|
||||
if (!INTUSE(xdr_callmsg) (xdrs, msg))
|
||||
if (!xdr_callmsg (xdrs, msg))
|
||||
return FALSE;
|
||||
su->su_xid = msg->rm_xid;
|
||||
if (su->su_cache != NULL)
|
||||
@ -319,7 +322,7 @@ svcudp_reply (xprt, msg)
|
||||
xdrs->x_op = XDR_ENCODE;
|
||||
XDR_SETPOS (xdrs, 0);
|
||||
msg->rm_xid = su->su_xid;
|
||||
if (INTUSE(xdr_replymsg) (xdrs, msg))
|
||||
if (xdr_replymsg (xdrs, msg))
|
||||
{
|
||||
slen = (int) XDR_GETPOS (xdrs);
|
||||
#ifdef IP_PKTINFO
|
||||
@ -495,6 +498,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
|
||||
su->su_cache = (char *) uc;
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_nolink (svcudp_enablecache, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -553,8 +557,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
|
||||
victim->cache_replylen = replylen;
|
||||
victim->cache_reply = rpc_buffer (xprt);
|
||||
rpc_buffer (xprt) = newbuf;
|
||||
INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz,
|
||||
XDR_ENCODE);
|
||||
xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_ENCODE);
|
||||
victim->cache_xid = su->su_xid;
|
||||
victim->cache_proc = uc->uc_proc;
|
||||
victim->cache_vers = uc->uc_vers;
|
||||
|
@ -187,6 +187,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
|
||||
xprt_register (xprt);
|
||||
return xprt;
|
||||
}
|
||||
libc_hidden_nolink (svcunix_create, GLIBC_2_1)
|
||||
|
||||
/*
|
||||
* Like svunix_create(), except the routine takes any *open* UNIX file
|
||||
@ -197,6 +198,7 @@ svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
|
||||
{
|
||||
return makefd_xprt (fd, sendsize, recvsize);
|
||||
}
|
||||
libc_hidden_nolink (svcunixfd_create, GLIBC_2_1)
|
||||
|
||||
static SVCXPRT *
|
||||
internal_function
|
||||
@ -216,7 +218,7 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
|
||||
return NULL;
|
||||
}
|
||||
cd->strm_stat = XPRT_IDLE;
|
||||
INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize,
|
||||
xdrrec_create (&(cd->xdrs), sendsize, recvsize,
|
||||
(caddr_t) xprt, readunix, writeunix);
|
||||
xprt->xp_p2 = NULL;
|
||||
xprt->xp_p1 = (caddr_t) cd;
|
||||
@ -460,7 +462,7 @@ svcunix_stat (SVCXPRT *xprt)
|
||||
|
||||
if (cd->strm_stat == XPRT_DIED)
|
||||
return XPRT_DIED;
|
||||
if (!INTUSE(xdrrec_eof) (&(cd->xdrs)))
|
||||
if (!xdrrec_eof (&(cd->xdrs)))
|
||||
return XPRT_MOREREQS;
|
||||
return XPRT_IDLE;
|
||||
}
|
||||
@ -472,8 +474,8 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
XDR *xdrs = &(cd->xdrs);
|
||||
|
||||
xdrs->x_op = XDR_DECODE;
|
||||
INTUSE(xdrrec_skiprecord) (xdrs);
|
||||
if (INTUSE(xdr_callmsg) (xdrs, msg))
|
||||
xdrrec_skiprecord (xdrs);
|
||||
if (xdr_callmsg (xdrs, msg))
|
||||
{
|
||||
cd->x_id = msg->rm_xid;
|
||||
/* set up verifiers */
|
||||
@ -513,7 +515,7 @@ svcunix_reply (SVCXPRT *xprt, struct rpc_msg *msg)
|
||||
|
||||
xdrs->x_op = XDR_ENCODE;
|
||||
msg->rm_xid = cd->x_id;
|
||||
stat = INTUSE(xdr_replymsg) (xdrs, msg);
|
||||
(void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
|
||||
stat = xdr_replymsg (xdrs, msg);
|
||||
(void) xdrrec_endofrecord (xdrs, TRUE);
|
||||
return stat;
|
||||
}
|
||||
|
@ -583,6 +583,7 @@ authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid,
|
||||
groups[i] = cred->groups[i];
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_nolink (authdes_getucred, GLIBC_2_1)
|
||||
|
||||
static void
|
||||
internal_function
|
||||
|
@ -89,7 +89,7 @@ passwd2des_internal (char *pw, char *key)
|
||||
|
||||
#ifdef _LIBC
|
||||
libc_hidden_def (passwd2des_internal)
|
||||
strong_alias (passwd2des_internal, passwd2des)
|
||||
compat_symbol (libc, passwd2des_internal, passwd2des, GLIBC_2_1);
|
||||
#else
|
||||
void passwd2des (char *pw, char *key)
|
||||
{
|
||||
@ -127,6 +127,7 @@ xencrypt (char *secret, char *passwd)
|
||||
free (buf);
|
||||
return 1;
|
||||
}
|
||||
libc_hidden_nolink (xencrypt, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* Decrypt secret key using passwd
|
||||
@ -159,6 +160,11 @@ xdecrypt (char *secret, char *passwd)
|
||||
free (buf);
|
||||
return 1;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdecrypt)
|
||||
#else
|
||||
libc_hidden_nolink (xdecrypt, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hex to binary conversion
|
||||
|
157
sunrpc/xdr.c
157
sunrpc/xdr.c
@ -71,6 +71,11 @@ xdr_free (xdrproc_t proc, char *objp)
|
||||
x.x_op = XDR_FREE;
|
||||
(*proc) (&x, objp);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_free)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_free, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR nothing
|
||||
@ -80,7 +85,11 @@ xdr_void (void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdr_void)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_void)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_void, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR integers
|
||||
@ -109,14 +118,18 @@ xdr_int (XDR *xdrs, int *ip)
|
||||
}
|
||||
return FALSE;
|
||||
#elif INT_MAX == LONG_MAX
|
||||
return INTUSE(xdr_long) (xdrs, (long *) ip);
|
||||
return xdr_long (xdrs, (long *) ip);
|
||||
#elif INT_MAX == SHRT_MAX
|
||||
return INTUSE(xdr_short) (xdrs, (short *) ip);
|
||||
return xdr_short (xdrs, (short *) ip);
|
||||
#else
|
||||
#error unexpected integer sizes in_xdr_int()
|
||||
#endif
|
||||
}
|
||||
INTDEF(xdr_int)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_int)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_int, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR unsigned integers
|
||||
@ -144,14 +157,18 @@ xdr_u_int (XDR *xdrs, u_int *up)
|
||||
}
|
||||
return FALSE;
|
||||
#elif UINT_MAX == ULONG_MAX
|
||||
return INTUSE(xdr_u_long) (xdrs, (u_long *) up);
|
||||
return xdr_u_long (xdrs, (u_long *) up);
|
||||
#elif UINT_MAX == USHRT_MAX
|
||||
return INTUSE(xdr_short) (xdrs, (short *) up);
|
||||
return xdr_short (xdrs, (short *) up);
|
||||
#else
|
||||
#error unexpected integer sizes in_xdr_u_int()
|
||||
#endif
|
||||
}
|
||||
INTDEF(xdr_u_int)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_int)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_int, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR long integers
|
||||
@ -175,7 +192,11 @@ xdr_long (XDR *xdrs, long *lp)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_long)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_long)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_long, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR unsigned long integers
|
||||
@ -210,7 +231,11 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_u_long)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_long)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_long, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR hyper integers
|
||||
@ -242,8 +267,11 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_hyper)
|
||||
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_hyper)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_hyper, GLIBC_2_1_1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR hyper integers
|
||||
@ -275,19 +303,33 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_u_hyper)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_hyper)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_hyper, GLIBC_2_1_1)
|
||||
#endif
|
||||
|
||||
bool_t
|
||||
xdr_longlong_t (XDR *xdrs, quad_t *llp)
|
||||
{
|
||||
return INTUSE(xdr_hyper) (xdrs, llp);
|
||||
return xdr_hyper (xdrs, llp);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_longlong_t)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_longlong_t, GLIBC_2_1_1)
|
||||
#endif
|
||||
|
||||
bool_t
|
||||
xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
|
||||
{
|
||||
return INTUSE(xdr_u_hyper) (xdrs, ullp);
|
||||
return xdr_u_hyper (xdrs, ullp);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_longlong_t)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_longlong_t, GLIBC_2_1_1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR short integers
|
||||
@ -316,7 +358,11 @@ xdr_short (XDR *xdrs, short *sp)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_short)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_short)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_short, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR unsigned short integers
|
||||
@ -345,7 +391,11 @@ xdr_u_short (XDR *xdrs, u_short *usp)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_u_short)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_short)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_short, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@ -357,13 +407,18 @@ xdr_char (XDR *xdrs, char *cp)
|
||||
int i;
|
||||
|
||||
i = (*cp);
|
||||
if (!INTUSE(xdr_int) (xdrs, &i))
|
||||
if (!xdr_int (xdrs, &i))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
*cp = i;
|
||||
return TRUE;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_char)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_char, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR an unsigned char
|
||||
@ -374,13 +429,18 @@ xdr_u_char (XDR *xdrs, u_char *cp)
|
||||
u_int u;
|
||||
|
||||
u = (*cp);
|
||||
if (!INTUSE(xdr_u_int) (xdrs, &u))
|
||||
if (!xdr_u_int (xdrs, &u))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
*cp = u;
|
||||
return TRUE;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_u_char)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_u_char, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR booleans
|
||||
@ -409,7 +469,11 @@ xdr_bool (XDR *xdrs, bool_t *bp)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_bool)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_bool)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_bool, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR enumerations
|
||||
@ -448,19 +512,23 @@ xdr_enum (XDR *xdrs, enum_t *ep)
|
||||
}
|
||||
return FALSE;
|
||||
#else
|
||||
return INTUSE(xdr_long) (xdrs, (long *) ep);
|
||||
return xdr_long (xdrs, (long *) ep);
|
||||
#endif
|
||||
}
|
||||
else if (sizeof (enum sizecheck) == sizeof (short))
|
||||
{
|
||||
return INTUSE(xdr_short) (xdrs, (short *) ep);
|
||||
return xdr_short (xdrs, (short *) ep);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
INTDEF(xdr_enum)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_enum)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_enum, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR opaque data
|
||||
@ -511,7 +579,11 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_opaque)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_opaque)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_opaque, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR counted bytes
|
||||
@ -531,7 +603,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
|
||||
/*
|
||||
* first deal with the length since xdr bytes are counted
|
||||
*/
|
||||
if (!INTUSE(xdr_u_int) (xdrs, sizep))
|
||||
if (!xdr_u_int (xdrs, sizep))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -563,7 +635,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
|
||||
/* fall into ... */
|
||||
|
||||
case XDR_ENCODE:
|
||||
return INTUSE(xdr_opaque) (xdrs, sp, nodesize);
|
||||
return xdr_opaque (xdrs, sp, nodesize);
|
||||
|
||||
case XDR_FREE:
|
||||
if (sp != NULL)
|
||||
@ -575,7 +647,11 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_bytes)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_bytes)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_bytes, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Implemented here due to commonality of the object.
|
||||
@ -586,9 +662,13 @@ xdr_netobj (xdrs, np)
|
||||
struct netobj *np;
|
||||
{
|
||||
|
||||
return INTUSE(xdr_bytes) (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
|
||||
return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
|
||||
}
|
||||
INTDEF(xdr_netobj)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_netobj)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_netobj, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR a discriminated union
|
||||
@ -614,7 +694,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
|
||||
/*
|
||||
* we deal with the discriminator; it's an enum
|
||||
*/
|
||||
if (!INTUSE(xdr_enum) (xdrs, dscmp))
|
||||
if (!xdr_enum (xdrs, dscmp))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -636,7 +716,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
|
||||
return ((dfault == NULL_xdrproc_t) ? FALSE :
|
||||
(*dfault) (xdrs, unp, LASTUNSIGNED));
|
||||
}
|
||||
INTDEF(xdr_union)
|
||||
libc_hidden_nolink (xdr_union, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -682,7 +762,7 @@ xdr_string (xdrs, cpp, maxsize)
|
||||
case XDR_DECODE:
|
||||
break;
|
||||
}
|
||||
if (!INTUSE(xdr_u_int) (xdrs, &size))
|
||||
if (!xdr_u_int (xdrs, &size))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -716,7 +796,7 @@ xdr_string (xdrs, cpp, maxsize)
|
||||
/* fall into ... */
|
||||
|
||||
case XDR_ENCODE:
|
||||
return INTUSE(xdr_opaque) (xdrs, sp, size);
|
||||
return xdr_opaque (xdrs, sp, size);
|
||||
|
||||
case XDR_FREE:
|
||||
mem_free (sp, nodesize);
|
||||
@ -725,7 +805,11 @@ xdr_string (xdrs, cpp, maxsize)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdr_string)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_string)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_string, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Wrapper for xdr_string that can be called directly from
|
||||
@ -736,9 +820,14 @@ xdr_wrapstring (xdrs, cpp)
|
||||
XDR *xdrs;
|
||||
char **cpp;
|
||||
{
|
||||
if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED))
|
||||
if (xdr_string (xdrs, cpp, LASTUNSIGNED))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_wrapstring)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_wrapstring, GLIBC_2_0)
|
||||
#endif
|
||||
|
@ -70,7 +70,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
|
||||
bool_t stat = TRUE;
|
||||
|
||||
/* like strings, arrays are really counted arrays */
|
||||
if (!INTUSE(xdr_u_int) (xdrs, sizep))
|
||||
if (!xdr_u_int (xdrs, sizep))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -127,7 +127,11 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
INTDEF(xdr_array)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_array)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_array, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xdr_vector():
|
||||
@ -161,3 +165,4 @@ xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
libc_hidden_nolink (xdr_vector, GLIBC_2_0)
|
||||
|
@ -158,6 +158,7 @@ xdr_float(xdrs, fp)
|
||||
}
|
||||
return (FALSE);
|
||||
}
|
||||
libc_hidden_nolink (xdr_float, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* This routine works on Suns (Sky / 68000's) and Vaxen.
|
||||
@ -299,3 +300,4 @@ xdr_double(xdrs, dp)
|
||||
}
|
||||
return (FALSE);
|
||||
}
|
||||
libc_hidden_nolink (xdr_double, GLIBC_2_0)
|
||||
|
@ -20,11 +20,7 @@
|
||||
#include <rpc/types.h>
|
||||
|
||||
/* We play dirty tricks with aliases. */
|
||||
#define xdr_quad_t Xdr_quad_t
|
||||
#define xdr_u_quad_t Xdr_u_quad_t
|
||||
#include <rpc/xdr.h>
|
||||
#undef xdr_quad_t
|
||||
#undef xdr_u_quad_t
|
||||
|
||||
|
||||
/* XDR 64bit integers */
|
||||
@ -51,7 +47,14 @@ xdr_int64_t (XDR *xdrs, int64_t *ip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
strong_alias (xdr_int64_t, xdr_quad_t)
|
||||
libc_hidden_nolink (xdr_int64_t, GLIBC_2_1_1)
|
||||
|
||||
bool_t
|
||||
xdr_quad_t (XDR *xdrs, quad_t *ip)
|
||||
{
|
||||
return xdr_int64_t (xdrs, (int64_t *) ip);
|
||||
}
|
||||
libc_hidden_nolink (xdr_quad_t, GLIBC_2_3_4)
|
||||
|
||||
/* XDR 64bit unsigned integers */
|
||||
bool_t
|
||||
@ -80,7 +83,14 @@ xdr_uint64_t (XDR *xdrs, uint64_t *uip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
strong_alias (xdr_int64_t, xdr_u_quad_t)
|
||||
libc_hidden_nolink (xdr_uint64_t, GLIBC_2_1_1)
|
||||
|
||||
bool_t
|
||||
xdr_u_quad_t (XDR *xdrs, u_quad_t *ip)
|
||||
{
|
||||
return xdr_uint64_t (xdrs, (uint64_t *) ip);
|
||||
}
|
||||
libc_hidden_nolink (xdr_u_quad_t, GLIBC_2_3_4)
|
||||
|
||||
/* XDR 32bit integers */
|
||||
bool_t
|
||||
@ -98,6 +108,7 @@ xdr_int32_t (XDR *xdrs, int32_t *lp)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
libc_hidden_nolink (xdr_int32_t, GLIBC_2_1)
|
||||
|
||||
/* XDR 32bit unsigned integers */
|
||||
bool_t
|
||||
@ -115,6 +126,11 @@ xdr_uint32_t (XDR *xdrs, uint32_t *ulp)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_uint32_t)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_uint32_t, GLIBC_2_1)
|
||||
#endif
|
||||
|
||||
/* XDR 16bit integers */
|
||||
bool_t
|
||||
@ -138,6 +154,7 @@ xdr_int16_t (XDR *xdrs, int16_t *ip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
libc_hidden_nolink (xdr_int16_t, GLIBC_2_1)
|
||||
|
||||
/* XDR 16bit unsigned integers */
|
||||
bool_t
|
||||
@ -161,6 +178,7 @@ xdr_uint16_t (XDR *xdrs, uint16_t *uip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
libc_hidden_nolink (xdr_uint16_t, GLIBC_2_1)
|
||||
|
||||
/* XDR 8bit integers */
|
||||
bool_t
|
||||
@ -184,6 +202,7 @@ xdr_int8_t (XDR *xdrs, int8_t *ip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
libc_hidden_nolink (xdr_int8_t, GLIBC_2_1)
|
||||
|
||||
/* XDR 8bit unsigned integers */
|
||||
bool_t
|
||||
@ -207,3 +226,4 @@ xdr_uint8_t (XDR *xdrs, uint8_t *uip)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
libc_hidden_nolink (xdr_uint8_t, GLIBC_2_1)
|
||||
|
@ -78,7 +78,11 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
|
||||
xdrs->x_private = xdrs->x_base = addr;
|
||||
xdrs->x_handy = size;
|
||||
}
|
||||
INTDEF(xdrmem_create)
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdrmem_create)
|
||||
#else
|
||||
libc_hidden_nolink (xdrmem_create, GLIBC_2_0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Nothing needs to be done for the memory case. The argument is clearly
|
||||
|
@ -192,7 +192,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
|
||||
rstrm->fbtbc = 0;
|
||||
rstrm->last_frag = TRUE;
|
||||
}
|
||||
INTDEF(xdrrec_create)
|
||||
libc_hidden_nolink (xdrrec_create, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -480,7 +480,7 @@ xdrrec_skiprecord (XDR *xdrs)
|
||||
rstrm->last_frag = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdrrec_skiprecord)
|
||||
libc_hidden_nolink (xdrrec_skiprecord, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* Lookahead function.
|
||||
@ -504,7 +504,7 @@ xdrrec_eof (XDR *xdrs)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
INTDEF(xdrrec_eof)
|
||||
libc_hidden_nolink (xdrrec_eof, GLIBC_2_0)
|
||||
|
||||
/*
|
||||
* The client must tell the package when an end-of-record has occurred.
|
||||
@ -531,7 +531,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
|
||||
rstrm->out_finger += BYTES_PER_XDR_UNIT;
|
||||
return TRUE;
|
||||
}
|
||||
INTDEF(xdrrec_endofrecord)
|
||||
libc_hidden_nolink (xdrrec_endofrecord, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
|
@ -93,7 +93,7 @@ xdr_reference (xdrs, pp, size, proc)
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
INTDEF(xdr_reference)
|
||||
libc_hidden_nolink (xdr_reference, GLIBC_2_0)
|
||||
|
||||
|
||||
/*
|
||||
@ -126,7 +126,7 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
|
||||
bool_t more_data;
|
||||
|
||||
more_data = (*objpp != NULL);
|
||||
if (!INTUSE(xdr_bool) (xdrs, &more_data))
|
||||
if (!xdr_bool (xdrs, &more_data))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -135,5 +135,10 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
|
||||
*objpp = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
return INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj);
|
||||
return xdr_reference (xdrs, objpp, obj_size, xdr_obj);
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_pointer)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_pointer, GLIBC_2_0)
|
||||
#endif
|
||||
|
@ -158,3 +158,8 @@ xdr_sizeof (xdrproc_t func, void *data)
|
||||
free (x.x_private);
|
||||
return stat == TRUE ? x.x_handy : 0;
|
||||
}
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdr_sizeof)
|
||||
#else
|
||||
libc_hidden_nolink (xdr_sizeof, GLIBC_2_1)
|
||||
#endif
|
||||
|
@ -190,5 +190,8 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef EXPORT_RPC_SYMBOLS
|
||||
libc_hidden_def (xdrstdio_create)
|
||||
#else
|
||||
libc_hidden_nolink (xdrstdio_create, GLIBC_2_0)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user