These functions were converted to no-op by commit c3f9492d7ff0 ("selinux: Remove legacy local boolean and user code") and left in libsepol/src/deprecated_functions.c to preserve API/ABI. As we change libsepol ABI dropping duplicate symbols it's time to drop these functions too. Signed-off-by: Petr Lautrbach <plautrba@xxxxxxxxxx> --- libsepol/include/sepol/booleans.h | 5 ---- libsepol/include/sepol/users.h | 6 ---- libsepol/src/deprecated_funcs.c | 50 ------------------------------- libsepol/src/libsepol.map.in | 4 --- 4 files changed, 65 deletions(-) delete mode 100644 libsepol/src/deprecated_funcs.c diff --git a/libsepol/include/sepol/booleans.h b/libsepol/include/sepol/booleans.h index 06d2230c395d..25229057dbd7 100644 --- a/libsepol/include/sepol/booleans.h +++ b/libsepol/include/sepol/booleans.h @@ -10,11 +10,6 @@ extern "C" { #endif -/* These two functions are deprecated. See src/deprecated_funcs.c */ -extern int sepol_genbools(void *data, size_t len, const char *boolpath); -extern int sepol_genbools_array(void *data, size_t len, - char **names, int *values, int nel); - /* Set the specified boolean */ extern int sepol_bool_set(sepol_handle_t * handle, sepol_policydb_t * policydb, diff --git a/libsepol/include/sepol/users.h b/libsepol/include/sepol/users.h index 70158ac41e40..156d1adb2d60 100644 --- a/libsepol/include/sepol/users.h +++ b/libsepol/include/sepol/users.h @@ -10,12 +10,6 @@ extern "C" { #endif -/* These two functions are deprecated. See src/deprecated_funcs.c */ -extern int sepol_genusers(void *data, size_t len, - const char *usersdir, - void **newdata, size_t * newlen); -extern void sepol_set_delusers(int on); - /* Modify the user, or add it, if the key is not found */ extern int sepol_user_modify(sepol_handle_t * handle, sepol_policydb_t * policydb, diff --git a/libsepol/src/deprecated_funcs.c b/libsepol/src/deprecated_funcs.c deleted file mode 100644 index d0dab7dfcb4a..000000000000 --- a/libsepol/src/deprecated_funcs.c +++ /dev/null @@ -1,50 +0,0 @@ -#include <stdio.h> -#include "debug.h" - -/* - * Need to keep these stubs for the libsepol interfaces exported in - * libsepol.map.in, as they are part of the shared library ABI. - */ - -static const char *msg = "Deprecated interface"; - -/* - * These two functions are deprecated and referenced in: - * include/libsepol/users.h - */ -int sepol_genusers(void *data __attribute((unused)), - size_t len __attribute((unused)), - const char *usersdir __attribute((unused)), - void **newdata __attribute((unused)), - size_t *newlen __attribute((unused))) -{ - WARN(NULL, "%s", msg); - return -1; -} - -void sepol_set_delusers(int on __attribute((unused))) -{ - WARN(NULL, "%s", msg); -} - -/* - * These two functions are deprecated and referenced in: - * include/libsepol/booleans.h - */ -int sepol_genbools(void *data __attribute((unused)), - size_t len __attribute((unused)), - const char *booleans __attribute((unused))) -{ - WARN(NULL, "%s", msg); - return -1; -} - -int sepol_genbools_array(void *data __attribute((unused)), - size_t len __attribute((unused)), - char **names __attribute((unused)), - int *values __attribute((unused)), - int nel __attribute((unused))) -{ - WARN(NULL, "%s", msg); - return -1; -} diff --git a/libsepol/src/libsepol.map.in b/libsepol/src/libsepol.map.in index 98da9789b71b..eb5721257638 100644 --- a/libsepol/src/libsepol.map.in +++ b/libsepol/src/libsepol.map.in @@ -45,9 +45,6 @@ LIBSEPOL_1.0 { sepol_context_to_string; sepol_debug; sepol_expand_module; - sepol_genbools; - sepol_genbools_array; - sepol_genusers; sepol_get_disable_dontaudit; sepol_get_preserve_tunables; sepol_handle_create; @@ -213,7 +210,6 @@ LIBSEPOL_1.0 { sepol_port_set_port; sepol_port_set_proto; sepol_port_set_range; - sepol_set_delusers; sepol_set_disable_dontaudit; sepol_set_expand_consume_base; sepol_set_policydb_from_file; -- 2.28.0