]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sunrpc/svcauth_des.c
support: Expose sbindir as support_sbindir_prefix
[thirdparty/glibc.git] / sunrpc / svcauth_des.c
index 960973496055f97584f53427f29dd7b73279da57..c5a512d6f80ff3908375d6fd7fa92d9184395dff 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <limits.h>
 #include <string.h>
+#include <stdint.h>
 #include <sys/param.h>
 #include <netinet/in.h>
 #include <rpc/rpc.h>
@@ -52,6 +53,7 @@
 #include <rpc/svc_auth.h>
 #include <rpc/svc.h>
 #include <rpc/des_crypt.h>
+#include <shlib-compat.h>
 
 #define debug(msg)             /*printf("svcauth_des: %s\n", msg) */
 
@@ -70,33 +72,31 @@ struct cache_entry
     struct rpc_timeval laststamp;      /* detect replays of creds */
     char *localcred;           /* generic local credential */
   };
-#ifdef _RPC_THREAD_SAFE_
 #define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
 #define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
-#else
-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
- */
+/* Cache statistics.  Accidental historic export without a matching
+   declaration in any header file.  */
+#ifndef SHARED
+static
+#endif
 struct
   {
     u_long ncachehits;         /* times cache hit, and is not replay */
     u_long ncachereplays;      /* times cache hit, and is replay */
     u_long ncachemisses;       /* times cache missed */
   }
-svcauthdes_stats;
+svcauthdes_stats __attribute__ ((nocommon));
+#ifdef SHARED
+compat_symbol (libc, svcauthdes_stats, svcauthdes_stats, GLIBC_2_0);
+#endif
 
 /*
  * Service side authenticator for AUTH_DES
@@ -388,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;
@@ -420,7 +419,6 @@ cache_victim (void)
  * Note that sid was referenced
  */
 static void
-internal_function
 cache_ref (register uint32_t sid)
 {
   register int i;
@@ -443,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)
 {
@@ -586,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)