summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-09-03 12:23:42 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-09-03 12:23:42 +0300
commit7a50a54390a976104deaf29d32b426db719bc5b7 (patch)
tree0e5e9873273b4264166404053eca1251894f1094 /python
parent408d3df3f1cb5ddc7b111da7147e679dd0278635 (diff)
downloadrpm-7a50a54390a976104deaf29d32b426db719bc5b7.tar.gz
rpm-7a50a54390a976104deaf29d32b426db719bc5b7.tar.bz2
rpm-7a50a54390a976104deaf29d32b426db719bc5b7.zip
Sanitize SELinux file context initialization.
- do it in a single spot inside tsRun() - automatically set RPMTRANS_FLAG_NOCONTEXTS if selinux is disabled
Diffstat (limited to 'python')
-rw-r--r--python/rpmts-py.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index 5c73faf41..d38573d9e 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -1186,20 +1186,6 @@ rpmts_Run(rpmtsObject * s, PyObject * args, PyObject * kwds)
(void) rpmtsSetNotifyCallback(s->ts, rpmtsCallback, (void *) &cbInfo);
}
- /* Initialize security context patterns (if not already done). */
- if (!(s->ts->transFlags & RPMTRANS_FLAG_NOCONTEXTS)) {
- rpmsx sx = rpmtsREContext(s->ts);
- if (sx == NULL) {
- const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
- if (fn != NULL && *fn != '\0') {
- sx = rpmsxNew(fn);
- (void) rpmtsSetREContext(s->ts, sx);
- }
- fn = _free(fn);
- }
- sx = rpmsxFree(sx);
- }
-
if (_rpmts_debug)
fprintf(stderr, "*** rpmts_Run(%p) ts %p ignore %x\n", s, s->ts, s->ignoreSet);