sunrpc: Remove internal_function attribute

This commit is contained in:
Florian Weimer 2017-08-31 15:55:36 +02:00
parent 24cffce736
commit ca4ec80396
14 changed files with 42 additions and 50 deletions

View File

@ -1,3 +1,23 @@
2017-08-31 Florian Weimer <fweimer@redhat.com>
* 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 <fweimer@redhat.com> 2017-08-31 Florian Weimer <fweimer@redhat.com>
* malloc/malloc.c (_int_free): Remove locked variable and related * malloc/malloc.c (_int_free): Remove locked variable and related

View File

@ -8,8 +8,7 @@ libc_hidden_proto (pmap_set)
libc_hidden_proto (pmap_unset) libc_hidden_proto (pmap_unset)
/* Defined in pm_getport.c. */ /* Defined in pm_getport.c. */
extern int __get_socket (struct sockaddr_in *saddr) extern int __get_socket (struct sockaddr_in *saddr) attribute_hidden;
attribute_hidden internal_function;
extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program, extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program,
u_long version, u_int protocol, u_long version, u_int protocol,
time_t timeout_sec, time_t tottimeout_sec); time_t timeout_sec, time_t tottimeout_sec);

View File

@ -62,8 +62,7 @@ static bool_t authdes_marshal (AUTH *, XDR *);
static bool_t authdes_validate (AUTH *, struct opaque_auth *); static bool_t authdes_validate (AUTH *, struct opaque_auth *);
static bool_t authdes_refresh (AUTH *); static bool_t authdes_refresh (AUTH *);
static void authdes_destroy (AUTH *); static void authdes_destroy (AUTH *);
static bool_t synchronize (struct sockaddr *, struct rpc_timeval *) static bool_t synchronize (struct sockaddr *, struct rpc_timeval *);
internal_function;
static const struct auth_ops authdes_ops = { static const struct auth_ops authdes_ops = {
authdes_nextverf, authdes_nextverf,
@ -444,7 +443,6 @@ authdes_destroy (AUTH *auth)
* adjust timep to reflect the delta between our clocks * adjust timep to reflect the delta between our clocks
*/ */
static bool_t static bool_t
internal_function
synchronize (struct sockaddr *syncaddr, struct rpc_timeval *timep) synchronize (struct sockaddr *syncaddr, struct rpc_timeval *timep)
{ {
struct timeval mytime; struct timeval mytime;

View File

@ -83,7 +83,7 @@ struct audata {
}; };
#define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private) #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 * sets private data, au_marshed and au_mpos
*/ */
static bool_t static bool_t
internal_function
marshal_new_auth (AUTH *auth) marshal_new_auth (AUTH *auth)
{ {
XDR xdr_stream; XDR xdr_stream;

View File

@ -38,7 +38,7 @@
#include <libio/iolibio.h> #include <libio/iolibio.h>
#include <shlib-compat.h> #include <shlib-compat.h>
static char *auth_errmsg (enum auth_stat stat) internal_function; static char *auth_errmsg (enum auth_stat stat);
#ifdef _RPC_THREAD_SAFE_ #ifdef _RPC_THREAD_SAFE_
/* /*
@ -374,7 +374,6 @@ static const struct auth_errtab auth_errlist[] =
}; };
static char * static char *
internal_function
auth_errmsg (enum auth_stat stat) auth_errmsg (enum auth_stat stat)
{ {
size_t i; size_t i;

View File

@ -370,13 +370,11 @@ static const uint32_t des_skb[8][64] =
static const char shifts2[16] = static const char shifts2[16] =
{0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0}; {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_set_key (unsigned char *, unsigned long *);
static void des_encrypt (unsigned long *, unsigned long *, int) static void des_encrypt (unsigned long *, unsigned long *, int);
internal_function;
int _des_crypt (char *, unsigned, struct desparams *); int _des_crypt (char *, unsigned, struct desparams *);
static void static void
internal_function
des_set_key (unsigned char *key, unsigned long *schedule) des_set_key (unsigned char *key, unsigned long *schedule)
{ {
register unsigned long c, d, t, s; register unsigned long c, d, t, s;
@ -439,7 +437,6 @@ des_set_key (unsigned char *key, unsigned long *schedule)
static void static void
internal_function
des_encrypt (unsigned long *buf, unsigned long *schedule, int encrypt) des_encrypt (unsigned long *buf, unsigned long *schedule, int encrypt)
{ {
register unsigned long l, r, t, u; register unsigned long l, r, t, u;

View File

@ -61,7 +61,7 @@ extern int _openchild (const char *command, FILE **fto, FILE **ffrom);
#endif #endif
static int key_call (u_long, xdrproc_t xdr_arg, char *, 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 trytimeout = {KEY_TIMEOUT, 0};
static const struct timeval tottimeout = {KEY_TIMEOUT *KEY_NRETRY, 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 #ifndef SO_PASSCRED
static int static int
internal_function
key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg, key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrproc_t xdr_rslt, char *rslt) xdrproc_t xdr_rslt, char *rslt)
{ {
@ -481,7 +480,6 @@ getkeyserv_handle (int vers)
/* returns 0 on failure, 1 on success */ /* returns 0 on failure, 1 on success */
static int static int
internal_function
key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg, key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrproc_t xdr_rslt, char *rslt) 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 */ /* returns 0 on failure, 1 on success */
static int static int
internal_function
key_call (u_long proc, xdrproc_t xdr_arg, char *arg, key_call (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrproc_t xdr_rslt, char *rslt) xdrproc_t xdr_rslt, char *rslt)
{ {

View File

@ -46,7 +46,6 @@
* create the socket. * create the socket.
*/ */
int int
internal_function
__get_socket (struct sockaddr_in *saddr) __get_socket (struct sockaddr_in *saddr)
{ {
int so = __socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); int so = __socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);

View File

@ -165,7 +165,6 @@ libc_hidden_nolink_sunrpc (xdr_rmtcallres, GLIBC_2_0)
*/ */
static int static int
internal_function
getbroadcastnets (struct in_addr *addrs, int naddrs) getbroadcastnets (struct in_addr *addrs, int naddrs)
{ {
struct ifaddrs *ifa; struct ifaddrs *ifa;

View File

@ -113,7 +113,7 @@ static const struct xp_ops svctcp_rendezvous_op =
static int readtcp (char*, char *, int); static int readtcp (char*, char *, int);
static int writetcp (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 struct tcp_rendezvous
{ /* kept in xprt->xp_p1 */ { /* 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) libc_hidden_nolink_sunrpc (svcfd_create, GLIBC_2_0)
static SVCXPRT * static SVCXPRT *
internal_function
makefd_xprt (int fd, u_int sendsize, u_int recvsize) makefd_xprt (int fd, u_int sendsize, u_int recvsize)
{ {
SVCXPRT *xprt; SVCXPRT *xprt;

View File

@ -113,7 +113,7 @@ static const struct xp_ops svcunix_rendezvous_op =
static int readunix (char*, char *, int); static int readunix (char*, char *, int);
static int writeunix (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 */ struct unix_rendezvous { /* kept in xprt->xp_p1 */
u_int sendsize; 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) libc_hidden_nolink_sunrpc (svcunixfd_create, GLIBC_2_1)
static SVCXPRT * static SVCXPRT *
internal_function
makefd_xprt (int fd, u_int sendsize, u_int recvsize) makefd_xprt (int fd, u_int sendsize, u_int recvsize)
{ {
SVCXPRT *xprt; SVCXPRT *xprt;

View File

@ -80,14 +80,12 @@ static struct cache_entry *authdes_cache;
static int *authdes_lru; static int *authdes_lru;
#endif #endif
static void cache_init (void) internal_function; /* initialize the cache */ static void cache_init (void); /* initialize the cache */
static short cache_spot (des_block *, char *, struct rpc_timeval *) static short cache_spot (des_block *, char *, struct rpc_timeval *);
internal_function; /* find an entry in the cache */ /* find an entry in the cache */
static void cache_ref (uint32_t sid) internal_function; static void cache_ref (uint32_t sid); /* note that sid was ref'd */
/* note that sid was ref'd */
static void invalidate (char *cred) internal_function; static void invalidate (char *cred); /* invalidate entry in cache */
/* invalidate entry in cache */
/* /*
* cache statistics * cache statistics
@ -390,7 +388,6 @@ _svcauth_des (register struct svc_req *rqst, register struct rpc_msg *msg)
* Initialize the cache * Initialize the cache
*/ */
static void static void
internal_function
cache_init (void) cache_init (void)
{ {
register int i; register int i;
@ -422,7 +419,6 @@ cache_victim (void)
* Note that sid was referenced * Note that sid was referenced
*/ */
static void static void
internal_function
cache_ref (register uint32_t sid) cache_ref (register uint32_t sid)
{ {
register int i; register int i;
@ -445,7 +441,6 @@ cache_ref (register uint32_t sid)
* return the spot in the cache. * return the spot in the cache.
*/ */
static short static short
internal_function
cache_spot (register des_block *key, char *name, cache_spot (register des_block *key, char *name,
struct rpc_timeval *timestamp) 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) libc_hidden_nolink_sunrpc (authdes_getucred, GLIBC_2_1)
static void static void
internal_function
invalidate (char *cred) invalidate (char *cred)
{ {
if (cred == NULL) if (cred == NULL)

View File

@ -63,11 +63,11 @@ static const char hex[16] =
: ({ int upp = toupper (c); \ : ({ int upp = toupper (c); \
upp >= 'A' && upp <= 'Z' ? upp - 'A' + 10 : -1; })) upp >= 'A' && upp <= 'Z' ? upp - 'A' + 10 : -1; }))
#else #else
static char hexval (char) internal_function; static char hexval (char);
#endif #endif
static void hex2bin (int, char *, char *) internal_function; static void hex2bin (int, char *, char *);
static void bin2hex (int, unsigned char *, char *) internal_function; static void bin2hex (int, unsigned char *, char *);
void passwd2des_internal (char *pw, char *key); void passwd2des_internal (char *pw, char *key);
#ifdef _LIBC #ifdef _LIBC
libc_hidden_proto (passwd2des_internal) libc_hidden_proto (passwd2des_internal)
@ -171,7 +171,6 @@ libc_hidden_nolink_sunrpc (xdecrypt, GLIBC_2_1)
* Hex to binary conversion * Hex to binary conversion
*/ */
static void static void
internal_function
hex2bin (int len, char *hexnum, char *binnum) hex2bin (int len, char *hexnum, char *binnum)
{ {
int i; int i;
@ -184,7 +183,6 @@ hex2bin (int len, char *hexnum, char *binnum)
* Binary to hex conversion * Binary to hex conversion
*/ */
static void static void
internal_function
bin2hex (int len, unsigned char *binnum, char *hexnum) bin2hex (int len, unsigned char *binnum, char *hexnum)
{ {
int i; int i;

View File

@ -119,11 +119,11 @@ typedef struct rec_strm
} }
RECSTREAM; RECSTREAM;
static u_int fix_buf_size (u_int) internal_function; static u_int fix_buf_size (u_int);
static bool_t skip_input_bytes (RECSTREAM *, long) internal_function; static bool_t skip_input_bytes (RECSTREAM *, long);
static bool_t flush_out (RECSTREAM *, bool_t) internal_function; static bool_t flush_out (RECSTREAM *, bool_t);
static bool_t set_input_fragment (RECSTREAM *) internal_function; static bool_t set_input_fragment (RECSTREAM *);
static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function; static bool_t get_input_bytes (RECSTREAM *, caddr_t, int);
/* /*
* Create an xdr handle for xdrrec * Create an xdr handle for xdrrec
@ -537,7 +537,6 @@ libc_hidden_nolink_sunrpc (xdrrec_endofrecord, GLIBC_2_0)
* Internal useful routines * Internal useful routines
*/ */
static bool_t static bool_t
internal_function
flush_out (RECSTREAM *rstrm, bool_t eor) flush_out (RECSTREAM *rstrm, bool_t eor)
{ {
u_long eormask = (eor == TRUE) ? LAST_FRAG : 0; 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 */ static bool_t /* knows nothing about records! Only about input buffers */
internal_function
get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len) get_input_bytes (RECSTREAM *rstrm, caddr_t addr, int len)
{ {
int current; 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 */ static bool_t /* next two bytes of the input stream are treated as a header */
internal_function
set_input_fragment (RECSTREAM *rstrm) set_input_fragment (RECSTREAM *rstrm)
{ {
uint32_t header; uint32_t header;
@ -624,7 +621,6 @@ set_input_fragment (RECSTREAM *rstrm)
} }
static bool_t /* consumes input bytes; knows nothing about records! */ static bool_t /* consumes input bytes; knows nothing about records! */
internal_function
skip_input_bytes (RECSTREAM *rstrm, long cnt) skip_input_bytes (RECSTREAM *rstrm, long cnt)
{ {
int current; int current;
@ -646,7 +642,6 @@ skip_input_bytes (RECSTREAM *rstrm, long cnt)
} }
static u_int static u_int
internal_function
fix_buf_size (u_int s) fix_buf_size (u_int s)
{ {
if (s < 100) if (s < 100)