libsepol/0010-libsepol-Drop-deprecated-functions.patch
DistroBaker 1d4c1811b8 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/libsepol.git#459a123b94fc6faafea7ec93b0e9cb004219cd44
2020-11-05 13:31:03 +00:00

135 lines
4.1 KiB
Diff

From 506c7b95b802ab157fe9ae1dae22fab12c515306 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <plautrba@redhat.com>
Date: Fri, 9 Oct 2020 15:00:48 +0200
Subject: [PATCH] libsepol: Drop deprecated functions
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@redhat.com>
---
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.29.0.rc2