[PATCH v2 5/6] libsemanage: Drop deprecated functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



semanage_module_enable() and semanage_module_disable() were deprecated
by commit 9fbc6d14418f ("libsemanage: add back original module
enable/disable functions for ABI compatability") in 2014 in order to
preserve ABI compatibility. As we the libsemanage ABI is changed by the
previous commit, it makes sense to drop them completely.

Signed-off-by: Petr Lautrbach <plautrba@xxxxxxxxxx>
---
 libsemanage/src/libsemanage.map |  2 --
 libsemanage/src/modules.c       | 56 ---------------------------------
 2 files changed, 58 deletions(-)

diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map
index 4bec06aaae27..3ea7b60f97bb 100644
--- a/libsemanage/src/libsemanage.map
+++ b/libsemanage/src/libsemanage.map
@@ -165,8 +165,6 @@ LIBSEMANAGE_1.0 {
     semanage_is_connected;
     semanage_is_managed;
     semanage_mls_enabled;
-    semanage_module_disable;
-    semanage_module_enable;
     semanage_module_get_name;
     semanage_module_get_version;
     semanage_module_info_datum_destroy;
diff --git a/libsemanage/src/modules.c b/libsemanage/src/modules.c
index 8b36801038df..b6dd456cac32 100644
--- a/libsemanage/src/modules.c
+++ b/libsemanage/src/modules.c
@@ -734,62 +734,6 @@ int semanage_module_set_enabled(semanage_handle_t *sh,
 }
 
 
-/* This function exists only for ABI compatibility. It has been deprecated and
- * should not be used. Instead, use semanage_module_set_enabled() */
-int semanage_module_enable(semanage_handle_t *sh, char *module_name)
-{
-	int rc = -1;
-	semanage_module_key_t *modkey = NULL;
-
-	rc = semanage_module_key_create(sh, &modkey);
-	if (rc != 0)
-		goto exit;
-
-	rc = semanage_module_key_set_name(sh, modkey, module_name);
-	if (rc != 0)
-		goto exit;
-
-	rc = semanage_module_set_enabled(sh, modkey, 1);
-	if (rc != 0)
-		goto exit;
-
-	rc = 0;
-
-exit:
-	semanage_module_key_destroy(sh, modkey);
-	free(modkey);
-
-	return rc;
-}
-
-/* This function exists only for ABI compatibility. It has been deprecated and
- * should not be used. Instead, use semanage_module_set_enabled() */
-int semanage_module_disable(semanage_handle_t *sh, char *module_name)
-{
-	int rc = -1;
-	semanage_module_key_t *modkey = NULL;
-
-	rc = semanage_module_key_create(sh, &modkey);
-	if (rc != 0)
-		goto exit;
-
-	rc = semanage_module_key_set_name(sh, modkey, module_name);
-	if (rc != 0)
-		goto exit;
-
-	rc = semanage_module_set_enabled(sh, modkey, 0);
-	if (rc != 0)
-		goto exit;
-
-	rc = 0;
-
-exit:
-	semanage_module_key_destroy(sh, modkey);
-	free(modkey);
-
-	return rc;
-}
-
 /* Converts a string to a priority
  *
  * returns -1 if str is not a valid priority.
-- 
2.28.0




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux