summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-12-21 11:01:22 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-12-21 11:01:22 +0200
commit00463e2fe0d115d873f141995e7d8b3041de7d36 (patch)
tree1fa56e147d7251ae0b9071382f26d39ab95c0805
parent247c5431776299196cf32e0a3980a4b9516379ea (diff)
downloadrpm-00463e2fe0d115d873f141995e7d8b3041de7d36.tar.gz
rpm-00463e2fe0d115d873f141995e7d8b3041de7d36.tar.bz2
rpm-00463e2fe0d115d873f141995e7d8b3041de7d36.zip
Move rpmtsSELabelFoo() functions to an internal-only header
- The sepolicy plugin needs them so the symbols can't be hidden, but these are not something external API-users should be messing with. - Ultimately we'll want to push the actual labeling from FSM to the plugin, insulating rpm from all SELinux specifics, this is just a band-aid temporary "solution" to keep this out of the API.
-rw-r--r--lib/fsm.c1
-rw-r--r--lib/rpmts.h21
-rw-r--r--lib/rpmts_internal.h21
-rw-r--r--plugins/sepolicy.c1
4 files changed, 23 insertions, 21 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index 18ec6baa2..3c3cfa298 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -25,6 +25,7 @@
#define fsmUNSAFE fsmStage
#include "lib/rpmfi_internal.h" /* XXX fi->apath, ... */
#include "lib/rpmte_internal.h" /* XXX rpmfs */
+#include "lib/rpmts_internal.h" /* rpmtsSELabelFoo() only */
#include "lib/rpmug.h"
#include "debug.h"
diff --git a/lib/rpmts.h b/lib/rpmts.h
index 2e5ed3045..0b8d970e7 100644
--- a/lib/rpmts.h
+++ b/lib/rpmts.h
@@ -390,27 +390,6 @@ FD_t rpmtsScriptFd(rpmts ts);
void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd);
/** \ingroup rpmts
- * Get the selabel handle from the transaction set
- * @param ts transaction set
- * @return rpm selabel handle, or NULL if it hasn't been initialized yet
- */
-struct selabel_handle * rpmtsSELabelHandle(rpmts ts);
-
-/** \ingroup rpmts
- * Initialize selabel
- * @param ts transaction set
- * @param path path to contexts file
- * @return RPMRC_OK on success, RPMRC_FAIL otherwise
- */
-rpmRC rpmtsSELabelInit(rpmts ts, const char * path);
-
-/** \ingroup rpmts
- * Clean up selabel
- * @param ts transaction set
- */
-void rpmtsSELabelFini(rpmts ts);
-
-/** \ingroup rpmts
* Get transaction id, i.e. transaction time stamp.
* @param ts transaction set
* @return transaction id
diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h
index 7ed6eb6ed..438fd46a4 100644
--- a/lib/rpmts_internal.h
+++ b/lib/rpmts_internal.h
@@ -81,6 +81,27 @@ int rpmtsSolve(rpmts ts, rpmds key);
RPM_GNUC_INTERNAL
rpmlock rpmtsAcquireLock(rpmts ts);
+/** \ingroup rpmts
+ * Get the selabel handle from the transaction set
+ * @param ts transaction set
+ * @return rpm selabel handle, or NULL if it hasn't been initialized yet
+ */
+struct selabel_handle * rpmtsSELabelHandle(rpmts ts);
+
+/** \ingroup rpmts
+ * Initialize selabel
+ * @param ts transaction set
+ * @param path path to contexts file
+ * @return RPMRC_OK on success, RPMRC_FAIL otherwise
+ */
+rpmRC rpmtsSELabelInit(rpmts ts, const char * path);
+
+/** \ingroup rpmts
+ * Clean up selabel
+ * @param ts transaction set
+ */
+void rpmtsSELabelFini(rpmts ts);
+
#ifdef __cplusplus
}
#endif
diff --git a/plugins/sepolicy.c b/plugins/sepolicy.c
index 101187fe4..7f8ba5dc7 100644
--- a/plugins/sepolicy.c
+++ b/plugins/sepolicy.c
@@ -14,6 +14,7 @@
#include "rpmio/base64.h"
#include "lib/rpmte_internal.h"
+#include "lib/rpmts_internal.h" /* rpmtsSELabelFoo() */
rpmPluginHook PLUGIN_HOOKS = \
PLUGINHOOK_INIT | \