diff mbox series

[2/4] sunrpc: Do not export key handling hooks by default

Message ID d072dc2dda44815446c529c82218e5dc7844cb42.1594062056.git.fweimer@redhat.com
State Committed
Headers show
Series sunrpc symbol cleanups | expand

Commit Message

Florian Weimer July 6, 2020, 7:03 p.m. UTC
__key_encryptsession_pk_LOCAL, __key_decryptsession_pk_LOCAL,
__key_gendes_LOCAL had a default version symbol even without
--enable-obsolete-rpc.
---
 sunrpc/key_call.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

Comments

H.J. Lu July 6, 2020, 8:36 p.m. UTC | #1
On Mon, Jul 6, 2020 at 12:05 PM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> __key_encryptsession_pk_LOCAL, __key_decryptsession_pk_LOCAL,
> __key_gendes_LOCAL had a default version symbol even without
> --enable-obsolete-rpc.
> ---
>  sunrpc/key_call.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
> index 9b8f9819c9..f13b0a7e4c 100644
> --- a/sunrpc/key_call.c
> +++ b/sunrpc/key_call.c
> @@ -290,9 +290,20 @@ libc_hidden_nolink_sunrpc (key_get_conv, GLIBC_2_1)
>   * implementations of these functions, and to call those in key_call().
>   */
>
> -cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *);
> -cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *);
> -des_block *(*__key_gendes_LOCAL) (uid_t, char *);
> +cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *)
> +  __attribute__ ((nocommon));
> +cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *)
> +  __attribute__ ((nocommon));
> +des_block *(*__key_gendes_LOCAL) (uid_t, char *) __attribute__ ((nocommon));
> +#ifdef SHARED
> +# ifndef EXPORT_RPC_SYMBOLS
> +compat_symbol (libc, __key_encryptsession_pk_LOCAL,
> +              __key_encryptsession_pk_LOCAL, GLIBC_2_1);
> +compat_symbol (libc, __key_decryptsession_pk_LOCAL,
> +              __key_decryptsession_pk_LOCAL, GLIBC_2_1);
> +compat_symbol (libc, __key_gendes_LOCAL, __key_gendes_LOCAL, GLIBC_2_1);
> +# endif
> +#endif
>
>  #ifndef SO_PASSCRED
>  static int
> --
> 2.25.4
>
>

LGTM.

Thanks.
diff mbox series

Patch

diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 9b8f9819c9..f13b0a7e4c 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -290,9 +290,20 @@  libc_hidden_nolink_sunrpc (key_get_conv, GLIBC_2_1)
  * implementations of these functions, and to call those in key_call().
  */
 
-cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *);
-cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *);
-des_block *(*__key_gendes_LOCAL) (uid_t, char *);
+cryptkeyres *(*__key_encryptsession_pk_LOCAL) (uid_t, char *)
+  __attribute__ ((nocommon));
+cryptkeyres *(*__key_decryptsession_pk_LOCAL) (uid_t, char *)
+  __attribute__ ((nocommon));
+des_block *(*__key_gendes_LOCAL) (uid_t, char *) __attribute__ ((nocommon));
+#ifdef SHARED
+# ifndef EXPORT_RPC_SYMBOLS
+compat_symbol (libc, __key_encryptsession_pk_LOCAL,
+	       __key_encryptsession_pk_LOCAL, GLIBC_2_1);
+compat_symbol (libc, __key_decryptsession_pk_LOCAL,
+	       __key_decryptsession_pk_LOCAL, GLIBC_2_1);
+compat_symbol (libc, __key_gendes_LOCAL, __key_gendes_LOCAL, GLIBC_2_1);
+# endif
+#endif
 
 #ifndef SO_PASSCRED
 static int