summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-10-11 15:14:04 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-10-11 15:14:48 +0300
commitd763c09e285c004ac85f17b537f23f7cac85ff3b (patch)
treef9890a6874dcbe72dc92fc3850fdcf582fee517d /plugins
parentf9ff6e7234d4f77b5f53f5481ba7cab0efabe707 (diff)
downloadrpm-d763c09e285c004ac85f17b537f23f7cac85ff3b.tar.gz
rpm-d763c09e285c004ac85f17b537f23f7cac85ff3b.tar.bz2
rpm-d763c09e285c004ac85f17b537f23f7cac85ff3b.zip
Eliminate now unnecessary WITH_SELINUX conditionals in sepolicy plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sepolicy.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/plugins/sepolicy.c b/plugins/sepolicy.c
index 52674c1dd..86bf1981a 100644
--- a/plugins/sepolicy.c
+++ b/plugins/sepolicy.c
@@ -1,7 +1,5 @@
#include "plugin.h"
-#if WITH_SELINUX
-
#include <errno.h>
#include <selinux/selinux.h>
#include <semanage/semanage.h>
@@ -623,52 +621,35 @@ static rpmRC sepolAddTE(rpmte te)
return RPMRC_OK;
}
-#endif /* WITH_SELINUX */
rpmRC PLUGINHOOK_INIT_FUNC(rpmts _ts, const char *_name, const char *_opts)
{
-#if WITH_SELINUX
ts = _ts;
name = strdup(_name);
policiesHead = policiesTail = NULL;
-#endif
return RPMRC_OK;
}
rpmRC PLUGINHOOK_CLEANUP_FUNC(void)
{
-#if WITH_SELINUX
_free(name);
ts = NULL;
policiesHead = policiesTail = sepolFree(policiesHead);
-#endif
return RPMRC_OK;
}
rpmRC PLUGINHOOK_OPENTE_FUNC(rpmte te)
{
- rpmRC rc = RPMRC_OK;
-#if WITH_SELINUX
- rc = sepolAddTE(te);
-#endif
- return rc;
+ return sepolAddTE(te);
}
rpmRC PLUGINHOOK_COLL_POST_ADD_FUNC(void)
{
- rpmRC rc = RPMRC_OK;
-#if WITH_SELINUX
- rc = sepolGo();
-#endif
- return rc;
+ return sepolGo();
}
rpmRC PLUGINHOOK_COLL_PRE_REMOVE_FUNC(void)
{
- rpmRC rc = RPMRC_OK;
-#if WITH_SELINUX
- rc = sepolGo();
-#endif
- return rc;
+ return sepolGo();
}