sunrpc: Remove internal_function attribute
authorFlorian Weimer <fweimer@redhat.com>
Thu, 31 Aug 2017 13:55:36 +0000 (15:55 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 31 Aug 2017 13:59:02 +0000 (15:59 +0200)
14 files changed:
ChangeLog
include/rpc/pmap_clnt.h
sunrpc/auth_des.c
sunrpc/auth_unix.c
sunrpc/clnt_perr.c
sunrpc/des_impl.c
sunrpc/key_call.c
sunrpc/pm_getport.c
sunrpc/pmap_rmt.c
sunrpc/svc_tcp.c
sunrpc/svc_unix.c
sunrpc/svcauth_des.c
sunrpc/xcrypt.c
sunrpc/xdr_rec.c

index 79953a7..ae519b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 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>
+
        * malloc/malloc.c (_int_free): Remove locked variable and related
        asserts.
 
index 7928f0b..8368a39 100644 (file)
@@ -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);
index 42d6b55..5b6f985 100644 (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_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;
index b71612c..b035fdd 100644 (file)
@@ -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;
index f682243..cac1dd9 100644 (file)
@@ -38,7 +38,7 @@
 #include <libio/iolibio.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_
 /*
@@ -374,7 +374,6 @@ static const struct auth_errtab auth_errlist[] =
 };
 
 static char *
-internal_function
 auth_errmsg (enum auth_stat stat)
 {
   size_t i;
index da0b8ce..d1d2edf 100644 (file)
@@ -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;
index 4bd3d31..a599fd9 100644 (file)
@@ -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)
 {
index a9992a3..3e6dd34 100644 (file)
@@ -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);
index 3bdffce..6b142e5 100644 (file)
@@ -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;
index de2d6a9..0c1ecc3 100644 (file)
@@ -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;
index a8da3b2..317a9e4 100644 (file)
@@ -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;
index 8e6cb86..f99a5a3 100644 (file)
@@ -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)
index da7c4e6..cb04a92 100644 (file)
@@ -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;
index 9dee4f0..c9a1eaa 100644 (file)
@@ -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)