Add Symbols.list and enable version script to hide some local functions.
authoryasuoka <yasuoka@openbsd.org>
Wed, 24 Jul 2024 08:22:26 +0000 (08:22 +0000)
committeryasuoka <yasuoka@openbsd.org>
Wed, 24 Jul 2024 08:22:26 +0000 (08:22 +0000)
lib/libradius/Makefile
lib/libradius/Symbols.list [new file with mode: 0644]
lib/libradius/shlib_version

index a521bdc..9333e70 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.3 2016/03/30 06:38:43 jmc Exp $
+#      $OpenBSD: Makefile,v 1.4 2024/07/24 08:22:26 yasuoka Exp $
 
 LIB=           radius
 SRCS=          radius.c radius_attr.c radius_msgauth.c radius_userpass.c \
@@ -9,7 +9,8 @@ CFLAGS+=        -Wall
 
 MAN=           radius_new_request_packet.3
 
-.include <bsd.lib.mk>
+VERSION_SCRIPT=        Symbols.map
+SYMBOL_LIST=   ${.CURDIR}/Symbols.list
 
 includes:
        @cd ${.CURDIR}; for i in $(INCS); do \
@@ -19,3 +20,10 @@ includes:
                echo $$j; \
                eval "$$j"; \
        done
+
+${VERSION_SCRIPT}: ${SYMBOL_LIST}
+       { printf '{\n\tglobal:\n'; \
+         sed '/^[._a-zA-Z]/s/$$/;/; s/^/               /' ${SYMBOL_LIST}; \
+         printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@
+
+.include <bsd.lib.mk>
diff --git a/lib/libradius/Symbols.list b/lib/libradius/Symbols.list
new file mode 100644 (file)
index 0000000..fdae9b7
--- /dev/null
@@ -0,0 +1,89 @@
+radius_check_accounting_request_authenticator
+radius_check_message_authenticator
+radius_check_response_authenticator
+radius_convert_packet
+radius_decrypt_mppe_key_attr
+radius_decrypt_user_password_attr
+radius_del_attr_all
+radius_del_vs_attr_all
+radius_delete_packet
+radius_encrypt_mppe_key_attr
+radius_encrypt_user_password_attr
+radius_get_authenticator
+radius_get_authenticator_retval
+radius_get_code
+radius_get_data
+radius_get_eap_msk
+radius_get_id
+radius_get_ipv4_attr
+radius_get_ipv6_attr
+radius_get_length
+radius_get_mppe_recv_key_attr
+radius_get_mppe_send_key_attr
+radius_get_raw_attr
+radius_get_raw_attr_cat
+radius_get_raw_attr_ptr
+radius_get_request_authenticator_retval
+radius_get_request_packet
+radius_get_string_attr
+radius_get_uint16_attr
+radius_get_uint32_attr
+radius_get_uint64_attr
+radius_get_user_password_attr
+radius_get_vs_ipv4_attr
+radius_get_vs_ipv6_attr
+radius_get_vs_raw_attr
+radius_get_vs_raw_attr_cat
+radius_get_vs_raw_attr_ptr
+radius_get_vs_string_attr
+radius_get_vs_uint16_attr
+radius_get_vs_uint32_attr
+radius_get_vs_uint64_attr
+radius_has_attr
+radius_has_vs_attr
+radius_new_request_packet
+radius_new_response_packet
+radius_put_ipv4_attr
+radius_put_ipv6_attr
+radius_put_message_authenticator
+radius_put_mppe_recv_key_attr
+radius_put_mppe_send_key_attr
+radius_put_raw_attr
+radius_put_raw_attr_cat
+radius_put_string_attr
+radius_put_uint16_attr
+radius_put_uint32_attr
+radius_put_uint64_attr
+radius_put_user_password_attr
+radius_put_vs_ipv4_attr
+radius_put_vs_ipv6_attr
+radius_put_vs_raw_attr
+radius_put_vs_raw_attr_cat
+radius_put_vs_string_attr
+radius_put_vs_uint16_attr
+radius_put_vs_uint32_attr
+radius_put_vs_uint64_attr
+radius_recv
+radius_recvfrom
+radius_recvmsg
+radius_send
+radius_sendmsg
+radius_sendto
+radius_set_accounting_request_authenticator
+radius_set_id
+radius_set_ipv4_attr
+radius_set_ipv6_attr
+radius_set_message_authenticator
+radius_set_raw_attr
+radius_set_request_packet
+radius_set_response_authenticator
+radius_set_uint16_attr
+radius_set_uint32_attr
+radius_set_uint64_attr
+radius_set_vs_ipv4_attr
+radius_set_vs_ipv6_attr
+radius_set_vs_raw_attr
+radius_set_vs_uint16_attr
+radius_set_vs_uint32_attr
+radius_set_vs_uint64_attr
+radius_update_id