From ca4ec8039628cac6600541472b068be7535d4bb4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 31 Aug 2017 15:55:36 +0200 Subject: [PATCH] sunrpc: Remove internal_function attribute --- ChangeLog | 20 ++++++++++++++++++++ include/rpc/pmap_clnt.h | 3 +-- sunrpc/auth_des.c | 4 +--- sunrpc/auth_unix.c | 3 +-- sunrpc/clnt_perr.c | 3 +-- sunrpc/des_impl.c | 7 ++----- sunrpc/key_call.c | 5 +---- sunrpc/pm_getport.c | 1 - sunrpc/pmap_rmt.c | 1 - sunrpc/svc_tcp.c | 3 +-- sunrpc/svc_unix.c | 3 +-- sunrpc/svcauth_des.c | 16 +++++----------- sunrpc/xcrypt.c | 8 +++----- sunrpc/xdr_rec.c | 15 +++++---------- 14 files changed, 42 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79953a7d07..ae519b12bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2017-08-31 Florian Weimer + + * include/rpc/pmap_clnt.h (__get_socket): Remove + internal_function. + * sunrpc/auth_des.c (synchronize): Likewise. + * sunrpc/auth_unix.c (marshal_new_auth): Likewise. + * sunrpc/clnt_perr.c (auth_errmsg): Likewise. + * sunrpc/des_impl.c (des_encrypt, des_set_key): Likewise. + * sunrpc/key_call.c (key_call_keyenvoy, key_call_socket) + (key_call): Likewise. + * sunrpc/pm_getport.c (__get_socket): Likewise. + * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. + * sunrpc/svc_unix.c (makefd_xprt): Likewise. + * sunrpc/svc_tcp.c (makefd_xprt): Likewise. + * sunrpc/svcauth_des.c (cache_init, cache_spot, cache_ref) + (invalidate): Likewise. + * sunrpc/xcrypt.c (hexval, hex2bin, bin2hex): Likewise. + * sunrpc/xdr_rec.c (fix_buf_size, skip_input_bytes, flush_out) + (set_input_fragment, get_input_bytes): Likewise. + 2017-08-31 Florian Weimer * malloc/malloc.c (_int_free): Remove locked variable and related diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h index 7928f0b368..8368a39f6f 100644 --- a/include/rpc/pmap_clnt.h +++ b/include/rpc/pmap_clnt.h @@ -8,8 +8,7 @@ libc_hidden_proto (pmap_set) libc_hidden_proto (pmap_unset) /* Defined in pm_getport.c. */ -extern int __get_socket (struct sockaddr_in *saddr) - attribute_hidden internal_function; +extern int __get_socket (struct sockaddr_in *saddr) attribute_hidden; extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol, time_t timeout_sec, time_t tottimeout_sec); diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 42d6b552f4..5b6f985bc2 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -62,8 +62,7 @@ static bool_t authdes_marshal (AUTH *, XDR *); static bool_t authdes_validate (AUTH *, struct opaque_auth *); static bool_t authdes_refresh (AUTH *); static void authdes_destroy (AUTH *); -static bool_t synchronize (struct sockaddr *, struct rpc_timeval *) - internal_function; +static bool_t synchronize (struct sockaddr *, struct rpc_timeval *); static const struct auth_ops authdes_ops = { authdes_nextverf, @@ -444,7 +443,6 @@ authdes_destroy (AUTH *auth) * adjust timep to reflect the delta between our clocks */ static bool_t -internal_function synchronize (struct sockaddr *syncaddr, struct rpc_timeval *timep) { struct timeval mytime; diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index b71612cd80..b035fdd870 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -83,7 +83,7 @@ struct audata { }; #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private) -static bool_t marshal_new_auth (AUTH *) internal_function; +static bool_t marshal_new_auth (AUTH *); /* @@ -337,7 +337,6 @@ authunix_destroy (AUTH *auth) * sets private data, au_marshed and au_mpos */ static bool_t -internal_function marshal_new_auth (AUTH *auth) { XDR xdr_stream; diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index f682243eae..cac1dd9913 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -38,7 +38,7 @@ #include #include -static char *auth_errmsg (enum auth_stat stat) internal_function; +static char *auth_errmsg (enum auth_stat stat); #ifdef _RPC_THREAD_SAFE_ /* @@ -374,7 +374,6 @@ static const struct auth_errtab auth_errlist[] = }; static char * -internal_function auth_errmsg (enum auth_stat stat) { size_t i; diff --git a/sunrpc/des_impl.c b/sunrpc/des_impl.c index da0b8cee15..d1d2edfbc8 100644 --- a/sunrpc/des_impl.c +++ b/sunrpc/des_impl.c @@ -370,13 +370,11 @@ static const uint32_t des_skb[8][64] = static const char shifts2[16] = {0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0}; -static void des_set_key (unsigned char *, unsigned long *) internal_function; -static void des_encrypt (unsigned long *, unsigned long *, int) - internal_function; +static void des_set_key (unsigned char *, unsigned long *); +static void des_encrypt (unsigned long *, unsigned long *, int); int _des_crypt (char *, unsigned, struct desparams *); static void -internal_function des_set_key (unsigned char *key, unsigned long *schedule) { register unsigned long c, d, t, s; @@ -439,7 +437,6 @@ des_set_key (unsigned char *key, unsigned long *schedule) static void -internal_function des_encrypt (unsigned long *buf, unsigned long *schedule, int encrypt) { register unsigned long l, r, t, u; diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c index 4bd3d31b19..a599fd9a6b 100644 --- a/sunrpc/key_call.c +++ b/sunrpc/key_call.c @@ -61,7 +61,7 @@ extern int _openchild (const char *command, FILE **fto, FILE **ffrom); #endif static int key_call (u_long, xdrproc_t xdr_arg, char *, - xdrproc_t xdr_rslt, char *) internal_function; + xdrproc_t xdr_rslt, char *); static const struct timeval trytimeout = {KEY_TIMEOUT, 0}; static const struct timeval tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 0}; @@ -296,7 +296,6 @@ des_block *(*__key_gendes_LOCAL) (uid_t, char *); #ifndef SO_PASSCRED static int -internal_function key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt, char *rslt) { @@ -481,7 +480,6 @@ getkeyserv_handle (int vers) /* returns 0 on failure, 1 on success */ static int -internal_function key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt, char *rslt) { @@ -515,7 +513,6 @@ key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg, /* returns 0 on failure, 1 on success */ static int -internal_function key_call (u_long proc, xdrproc_t xdr_arg, char *arg, xdrproc_t xdr_rslt, char *rslt) { diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c index a9992a38ea..3e6dd34e58 100644 --- a/sunrpc/pm_getport.c +++ b/sunrpc/pm_getport.c @@ -46,7 +46,6 @@ * create the socket. */ int -internal_function __get_socket (struct sockaddr_in *saddr) { int so = __socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index 3bdffcecd2..6b142e5441 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -165,7 +165,6 @@ libc_hidden_nolink_sunrpc (xdr_rmtcallres, GLIBC_2_0) */ static int -internal_function getbroadcastnets (struct in_addr *addrs, int naddrs) { struct ifaddrs *ifa; diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index de2d6a9855..0c1ecc3e73 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -113,7 +113,7 @@ static const struct xp_ops svctcp_rendezvous_op = static int readtcp (char*, char *, int); static int writetcp (char *, char *, int); -static SVCXPRT *makefd_xprt (int, u_int, u_int) internal_function; +static SVCXPRT *makefd_xprt (int, u_int, u_int); struct tcp_rendezvous { /* kept in xprt->xp_p1 */ @@ -220,7 +220,6 @@ svcfd_create (int fd, u_int sendsize, u_int recvsize) libc_hidden_nolink_sunrpc (svcfd_create, GLIBC_2_0) static SVCXPRT * -internal_function makefd_xprt (int fd, u_int sendsize, u_int recvsize) { SVCXPRT *xprt; diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index a8da3b2262..317a9e49cb 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -113,7 +113,7 @@ static const struct xp_ops svcunix_rendezvous_op = static int readunix (char*, char *, int); static int writeunix (char *, char *, int); -static SVCXPRT *makefd_xprt (int, u_int, u_int) internal_function; +static SVCXPRT *makefd_xprt (int, u_int, u_int); struct unix_rendezvous { /* kept in xprt->xp_p1 */ u_int sendsize; @@ -216,7 +216,6 @@ svcunixfd_create (int fd, u_int sendsize, u_int recvsize) libc_hidden_nolink_sunrpc (svcunixfd_create, GLIBC_2_1) static SVCXPRT * -internal_function makefd_xprt (int fd, u_int sendsize, u_int recvsize) { SVCXPRT *xprt; diff --git a/sunrpc/svcauth_des.c b/sunrpc/svcauth_des.c index 8e6cb86e39..f99a5a324f 100644 --- a/sunrpc/svcauth_des.c +++ b/sunrpc/svcauth_des.c @@ -80,14 +80,12 @@ static struct cache_entry *authdes_cache; static int *authdes_lru; #endif -static void cache_init (void) internal_function; /* initialize the cache */ -static short cache_spot (des_block *, char *, struct rpc_timeval *) - internal_function; /* find an entry in the cache */ -static void cache_ref (uint32_t sid) internal_function; - /* note that sid was ref'd */ +static void cache_init (void); /* initialize the cache */ +static short cache_spot (des_block *, char *, struct rpc_timeval *); + /* find an entry in the cache */ +static void cache_ref (uint32_t sid); /* note that sid was ref'd */ -static void invalidate (char *cred) internal_function; - /* invalidate entry in cache */ +static void invalidate (char *cred); /* invalidate entry in cache */ /* * cache statistics @@ -390,7 +388,6 @@ _svcauth_des (register struct svc_req *rqst, register struct rpc_msg *msg) * Initialize the cache */ static void -internal_function cache_init (void) { register int i; @@ -422,7 +419,6 @@ cache_victim (void) * Note that sid was referenced */ static void -internal_function cache_ref (register uint32_t sid) { register int i; @@ -445,7 +441,6 @@ cache_ref (register uint32_t sid) * return the spot in the cache. */ static short -internal_function cache_spot (register des_block *key, char *name, struct rpc_timeval *timestamp) { @@ -588,7 +583,6 @@ authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid, libc_hidden_nolink_sunrpc (authdes_getucred, GLIBC_2_1) static void -internal_function invalidate (char *cred) { if (cred == NULL) diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c index da7c4e66b9..cb04a92cd2 100644 --- a/sunrpc/xcrypt.c +++ b/sunrpc/xcrypt.c @@ -63,11 +63,11 @@ static const char hex[16] = : ({ int upp = toupper (c); \ upp >= 'A' && upp <= 'Z' ? upp - 'A' + 10 : -1; })) #else -static char hexval (char) internal_function; +static char hexval (char); #endif -static void hex2bin (int, char *, char *) internal_function; -static void bin2hex (int, unsigned char *, char *) internal_function; +static void hex2bin (int, char *, char *); +static void bin2hex (int, unsigned char *, char *); void passwd2des_internal (char *pw, char *key); #ifdef _LIBC libc_hidden_proto (passwd2des_internal) @@ -171,7 +171,6 @@ libc_hidden_nolink_sunrpc (xdecrypt, GLIBC_2_1) * Hex to binary conversion */ static void -internal_function hex2bin (int len, char *hexnum, char *binnum) { int i; @@ -184,7 +183,6 @@ hex2bin (int len, char *hexnum, char *binnum) * Binary to hex conversion */ static void -internal_function bin2hex (int len, unsigned char *binnum, char *hexnum) { int i; diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 9dee4f040b..c9a1eaad63 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -119,11 +119,11 @@ typedef struct rec_strm } RECSTREAM; -static u_int fix_buf_size (u_int) internal_function; -static bool_t skip_input_bytes (RECSTREAM *, long) internal_function; -static bool_t flush_out (RECSTREAM *, bool_t) internal_function; -static bool_t set_input_fragment (RECSTREAM *) internal_function; -static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function; +static u_int fix_buf_size (u_int); +static bool_t skip_input_bytes (RECSTREAM *, long); +static bool_t flush_out (RECSTREAM *, bool_t); +static bool_t set_input_fragment (RECSTREAM *); +static bool_t get_input_bytes (RECSTREAM *, caddr_t, int); /* * Create an xdr handle for xdrrec @@ -537,7 +537,6 @@ libc_hidden_nolink_sunrpc (xdrrec_endofrecord, GLIBC_2_0) * Internal useful routines */ static bool_t -internal_function flush_out (RECSTREAM *rstrm, bool_t eor) { u_long eormask = (eor == TRUE) ? LAST_FRAG : 0; @@ -574,7 +573,6 @@ fill_input_buf (RECSTREAM *rstrm) } static bool_t /* knows nothing about records! Only about input buffers */ -internal_function get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len) { int current; @@ -598,7 +596,6 @@ get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len) } static bool_t /* next two bytes of the input stream are treated as a header */ -internal_function set_input_fragment (RECSTREAM *rstrm) { uint32_t header; @@ -624,7 +621,6 @@ set_input_fragment (RECSTREAM *rstrm) } static bool_t /* consumes input bytes; knows nothing about records! */ -internal_function skip_input_bytes (RECSTREAM *rstrm, long cnt) { int current; @@ -646,7 +642,6 @@ skip_input_bytes (RECSTREAM *rstrm, long cnt) } static u_int -internal_function fix_buf_size (u_int s) { if (s < 100)