summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--include/rpc/xdr.h2
-rw-r--r--include/sys/sysctl.h1
-rw-r--r--sunrpc/xcrypt.c46
-rw-r--r--sunrpc/xdr_stdio.c2
-rw-r--r--sysdeps/unix/sysv/linux/sysctl.c3
6 files changed, 49 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 74f7fa9c85..26a3dafd70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2002-09-17  Roland McGrath  <roland@redhat.com>
+
+	* sunrpc/xcrypt.c (passwd2des_internal): Renamed fom passwd2des.
+	(passwd2des): Define it as an alias.
+	(xencrypt, xdecrypt): Call passwd2des_internal instead of passwd2des.
+
+2002-09-12  Bruno Haible  <bruno@clisp.org>
+
+	* include/sys/sysctl.h (__sysctl): Add libc_hidden_proto.
+	* sysdeps/unix/sysv/linux/sysctl.c (__sysctl): Add libc_hidden_def.
+
+	* include/rpc/xdr.h (xdrstdio_create): Add libc_hidden_proto.
+	* sunrpc/xdr_stdio.c (xdrstdio_create): Add libc_hidden_def.
+
 2002-09-05  Steven Munroe  <sjmunroe@us.ibm.com>
 
 	* sysdeps/unix/sysv/linux/kernel-features.h [__powerpc64__]
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index 40855c9540..ab43f83dcb 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -32,3 +32,5 @@ extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op);
 extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow);
 extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs);
 extern bool_t xdrrec_eof_internal (XDR *__xdrs);
+
+libc_hidden_proto (xdrstdio_create)
diff --git a/include/sys/sysctl.h b/include/sys/sysctl.h
index 2a11226dd7..4fffb4ff49 100644
--- a/include/sys/sysctl.h
+++ b/include/sys/sysctl.h
@@ -4,6 +4,7 @@
 /* Read or write system parameters (Linux, FreeBSD specific).  */
 extern int __sysctl (int *__name, int __nlen, void *__oldval,
 		     size_t *__oldlenp, void *__newval, size_t __newlen);
+libc_hidden_proto (__sysctl)
 
 
 #endif  /* _SYS_SYSCTL_H */
diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c
index a6b2499708..9f8c142649 100644
--- a/sunrpc/xcrypt.c
+++ b/sunrpc/xcrypt.c
@@ -69,7 +69,32 @@ static char hexval (char) internal_function;
 
 static void hex2bin (int, char *, char *) internal_function;
 static void bin2hex (int, unsigned char *, char *) internal_function;
-void passwd2des (char *pw, char *key);
+static void passwd2des_internal (char *pw, char *key);
+
+
+/*
+ * Turn password into DES key
+ */
+static void
+passwd2des_internal (char *pw, char *key)
+{
+  int i;
+
+  memset (key, 0, 8);
+  for (i = 0; *pw && i < 8; ++i)
+    key[i] ^= *pw++ << 1;
+
+  des_setparity (key);
+}
+
+#ifdef _LIBC
+strong_alias (passwd2des_internal, passwd2des)
+#else
+void passwd2des (char *pw, char *key)
+{
+  return passwd2des_internal (pw, key);
+}
+#endif
 
 /*
  * Encrypt a secret key given passwd
@@ -88,7 +113,7 @@ xencrypt (char *secret, char *passwd)
   len = strlen (secret) / 2;
   buf = malloc ((unsigned) len);
   hex2bin (len, secret, buf);
-  passwd2des (passwd, key);
+  passwd2des_internal (passwd, key);
   memset (ivec, 0, 8);
 
   err = cbc_crypt (key, buf, len, DES_ENCRYPT | DES_HW, ivec);
@@ -120,7 +145,7 @@ xdecrypt (char *secret, char *passwd)
   buf = malloc ((unsigned) len);
 
   hex2bin (len, secret, buf);
-  passwd2des (passwd, key);
+  passwd2des_internal (passwd, key);
   memset (ivec, 0, 8);
 
   err = cbc_crypt (key, buf, len, DES_DECRYPT | DES_HW, ivec);
@@ -135,21 +160,6 @@ xdecrypt (char *secret, char *passwd)
 }
 
 /*
- * Turn password into DES key
- */
-void
-passwd2des (char *pw, char *key)
-{
-  int i;
-
-  memset (key, 0, 8);
-  for (i = 0; *pw && i < 8; ++i)
-    key[i] ^= *pw++ << 1;
-
-  des_setparity (key);
-}
-
-/*
  * Hex to binary conversion
  */
 static void
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index 8a76b75030..264ab3ba09 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -192,3 +192,5 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
     return FALSE;
   return TRUE;
 }
+
+libc_hidden_def (xdrstdio_create)
diff --git a/sysdeps/unix/sysv/linux/sysctl.c b/sysdeps/unix/sysv/linux/sysctl.c
index 74147d85ca..c31eaaebcf 100644
--- a/sysdeps/unix/sysv/linux/sysctl.c
+++ b/sysdeps/unix/sysv/linux/sysctl.c
@@ -1,5 +1,5 @@
 /* Read or write system information.  Linux version.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -46,4 +46,5 @@ __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
 
   return INLINE_SYSCALL (_sysctl, 1, __ptrvalue (&args));
 }
+libc_hidden_def (__sysctl)
 weak_alias (__sysctl, sysctl)