From c885bf5cf94a12202f849477a845d728cbd12889 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 3 Dec 2005 00:34:49 +0000 Subject: More hiding, including __mempcpy --- libc/inet/rpc/auth_none.c | 2 ++ libc/inet/rpc/auth_unix.c | 1 + libc/inet/rpc/bindresvport.c | 2 +- libc/inet/rpc/clnt_raw.c | 1 + libc/inet/rpc/clnt_tcp.c | 1 + libc/inet/rpc/clnt_udp.c | 1 + libc/inet/rpc/clnt_unix.c | 3 ++- libc/inet/rpc/create_xid.c | 3 +++ libc/inet/rpc/pmap_clnt.c | 5 +++-- libc/inet/rpc/pmap_rmt.c | 1 + libc/inet/rpc/rcmd.c | 3 ++- libc/inet/rpc/rpc_dtablesize.c | 2 ++ libc/inet/rpc/ruserpass.c | 2 +- libc/inet/rpc/svc.c | 2 ++ libc/inet/rpc/svc_auth_unix.c | 2 ++ libc/inet/rpc/svc_raw.c | 2 ++ libc/inet/rpc/svc_udp.c | 1 + libc/inet/rpc/svc_unix.c | 2 +- libc/inet/rpc/xdr_mem.c | 5 +++-- 19 files changed, 32 insertions(+), 9 deletions(-) (limited to 'libc/inet/rpc') diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c index e7b7aba53..9d1d42d03 100644 --- a/libc/inet/rpc/auth_none.c +++ b/libc/inet/rpc/auth_none.c @@ -35,6 +35,8 @@ * credentials and verifiers to remote systems. */ +#define xdrmem_create __xdrmem_create + #define __FORCE_GLIBC #include #include "rpc_private.h" diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index c02cc309b..0ae5fe6a9 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -40,6 +40,7 @@ #define sysconf __sysconf #define getegid __getegid +#define xdrmem_create __xdrmem_create #define __FORCE_GLIBC #include diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c index 98ce691ee..1fb80d701 100644 --- a/libc/inet/rpc/bindresvport.c +++ b/libc/inet/rpc/bindresvport.c @@ -69,7 +69,7 @@ bindresvport (int sd, struct sockaddr_in *sin) if (port == 0) { - port = (getpid () % NPORTS) + STARTPORT; + port = (__getpid () % NPORTS) + STARTPORT; } res = -1; __set_errno (EADDRINUSE); diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c index e21f40252..41143496a 100644 --- a/libc/inet/rpc/clnt_raw.c +++ b/libc/inet/rpc/clnt_raw.c @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro"; */ #define authnone_create __authnone_create +#define xdrmem_create __xdrmem_create #define __FORCE_GLIBC #include diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index ad2797a9e..11f790529 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #define authnone_create __authnone_create #define xdrrec_create __xdrrec_create +#define xdrmem_create __xdrmem_create #define __FORCE_GLIBC #include diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 5a7e35e80..bc032f205 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #define __cmsg_nxthdr __libc_cmsg_nxthdr #define authnone_create __authnone_create +#define xdrmem_create __xdrmem_create #define __FORCE_GLIBC #include diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 93ea42afd..7372e51b9 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -48,6 +48,7 @@ #define authnone_create __authnone_create #define xdrrec_create __xdrrec_create +#define xdrmem_create __xdrmem_create #define getegid __getegid #define __FORCE_GLIBC @@ -506,7 +507,7 @@ __msgwrite (int sock, void *data, size_t cnt) /* XXX I'm not sure, if gete?id() is always correct, or if we should use get?id(). But since keyserv needs geteuid(), we have no other chance. It would be much better, if the kernel could pass both to the server. */ - cred.pid = getpid (); + cred.pid = __getpid (); cred.uid = geteuid (); cred.gid = getegid (); diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c index 8a6dacad3..3ef1850dd 100644 --- a/libc/inet/rpc/create_xid.c +++ b/libc/inet/rpc/create_xid.c @@ -17,6 +17,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define lrand48_r __lrand48_r +#define srand48_r __srand48_r + #define __FORCE_GLIBC #include diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c index 5bbc81564..39d846f3b 100644 --- a/libc/inet/rpc/pmap_clnt.c +++ b/libc/inet/rpc/pmap_clnt.c @@ -112,8 +112,8 @@ static const struct timeval tottimeout = {60, 0}; * Set a mapping between program,version and port. * Calls the pmap service remotely to do the mapping. */ -bool_t -pmap_set (u_long program, u_long version, int protocol, u_short port) +bool_t attribute_hidden +__pmap_set (u_long program, u_long version, int protocol, u_short port) { struct sockaddr_in myaddress; int socket = -1; @@ -142,6 +142,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port) /* (void)__close(socket); CLNT_DESTROY closes it */ return rslt; } +strong_alias(__pmap_set,pmap_set) /* * Remove the mapping between program,version and port. diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index db875e987..5a78ba2c9 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; */ #define authunix_create_default __authunix_create_default +#define xdrmem_create __xdrmem_create #define inet_makeaddr __inet_makeaddr #define __FORCE_GLIBC diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index a51d09fcd..e050480ce 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -37,6 +37,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #define bcopy __bcopy #define sysconf __sysconf +#define getline __getline #define __FORCE_GLIBC #include @@ -88,7 +89,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) int s, lport, timo; char c; - pid = getpid(); + pid = __getpid(); #ifdef __UCLIBC_HAS_REENTRANT_RPC__ hstbuflen = 1024; diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c index b520b1b48..aa6d598ce 100644 --- a/libc/inet/rpc/rpc_dtablesize.c +++ b/libc/inet/rpc/rpc_dtablesize.c @@ -31,6 +31,8 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro"; #endif +#define getdtablesize __getdtablesize + #define __FORCE_GLIBC #define __USE_BSD #include diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 116a34276..ca040ada2 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -105,7 +105,7 @@ int ruserpass(const char *host, const char **aname, const char **apass) /* Give up when running a setuid or setgid app. */ if ((getuid() != geteuid()) || getgid() != getegid()) return -1; - hdir = getenv("HOME"); + hdir = __getenv("HOME"); if (hdir == NULL) { /* If we can't get HOME, fail instead of trying ".", which is no improvement. */ diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index a32c68bbc..5610277ee 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -36,6 +36,8 @@ * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define pmap_set __pmap_set + #define _authenticate __libc__authenticate #define _rpc_dtablesize __libc__rpc_dtablesize diff --git a/libc/inet/rpc/svc_auth_unix.c b/libc/inet/rpc/svc_auth_unix.c index 256a42154..c84c42725 100644 --- a/libc/inet/rpc/svc_auth_unix.c +++ b/libc/inet/rpc/svc_auth_unix.c @@ -38,6 +38,8 @@ * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define xdrmem_create __xdrmem_create + #define __FORCE_GLIBC #define _GNU_SOURCE #include diff --git a/libc/inet/rpc/svc_raw.c b/libc/inet/rpc/svc_raw.c index 05bf3109c..b55f0864f 100644 --- a/libc/inet/rpc/svc_raw.c +++ b/libc/inet/rpc/svc_raw.c @@ -40,6 +40,8 @@ static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#define xdrmem_create __xdrmem_create + #define __FORCE_GLIBC #include #include "rpc_private.h" diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index a37552a4b..ab6f96ee1 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; */ #define xprt_register __xprt_register +#define xdrmem_create __xdrmem_create #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c index d1568e4a7..5d3025876 100644 --- a/libc/inet/rpc/svc_unix.c +++ b/libc/inet/rpc/svc_unix.c @@ -376,7 +376,7 @@ __msgwrite (int sock, void *data, size_t cnt) /* XXX I'm not sure, if gete?id() is always correct, or if we should use get?id(). But since keyserv needs geteuid(), we have no other chance. It would be much better, if the kernel could pass both to the server. */ - cred.pid = getpid (); + cred.pid = __getpid (); cred.uid = geteuid (); cred.gid = getegid (); diff --git a/libc/inet/rpc/xdr_mem.c b/libc/inet/rpc/xdr_mem.c index 568d0e54a..56908c434 100644 --- a/libc/inet/rpc/xdr_mem.c +++ b/libc/inet/rpc/xdr_mem.c @@ -75,8 +75,8 @@ static const struct xdr_ops xdrmem_ops = * The procedure xdrmem_create initializes a stream descriptor for a * memory buffer. */ -void -xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) +void attribute_hidden +__xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) { xdrs->x_op = op; /* We have to add the const since the `struct xdr_ops' in `struct XDR' @@ -85,6 +85,7 @@ 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; } +strong_alias(__xdrmem_create,xdrmem_create) /* * Nothing needs to be done for the memory case. The argument is clearly -- cgit v1.2.3