From 2b0ed422b9a01ad64f220da52989eb557fe4f897 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Jun 28 2006 19:59:23 +0000 Subject: Remove SELinux context verification (#193488) --- diff --git a/rpm-4.4.2-matchpathcon.patch b/rpm-4.4.2-matchpathcon.patch index 1afa8f6..e044984 100644 --- a/rpm-4.4.2-matchpathcon.patch +++ b/rpm-4.4.2-matchpathcon.patch @@ -56,58 +56,6 @@ } (void) rpmtsSetFlags(ts, ia->transFlags); ---- rpm-4.4.2/lib/verify.c.matchpathcon 2004-10-24 15:36:30.000000000 -0400 -+++ rpm-4.4.2/lib/verify.c 2005-07-21 16:47:11.000000000 -0400 -@@ -128,20 +128,19 @@ - if (rc == -1) - *res |= (RPMVERIFY_LGETFILECONFAIL|RPMVERIFY_CONTEXTS); - else { -- rpmsx sx = rpmtsREContext(ts); -- const char * fcontext; -- -- if (sx != NULL) { -- /* Get file security context from patterns. */ -- fcontext = rpmsxFContext(sx, fn, fmode); -- sx = rpmsxFree(sx); -- } else { -+ security_context_t fcontext; -+ -+ /* Get file security context from patterns. */ -+ if (matchpathcon(fn,fmode,&fcontext) != 0) { - /* Get file security context from package. */ - fcontext = rpmfiFContext(fi); - } -+ - if (fcontext == NULL || strcmp(fcontext, con)) - *res |= RPMVERIFY_CONTEXTS; - freecon(con); -+ freecon(fcontext); -+ - } - } - /*@=branchstate@*/ -@@ -524,16 +523,11 @@ - - /* Initialize security context patterns (if not already done). */ - if (qva->qva_flags & VERIFY_CONTEXTS) { -- rpmsx sx = rpmtsREContext(ts); -- if (sx == NULL) { -- arg = rpmGetPath("%{?_verify_file_context_path}", NULL); -- if (arg != NULL && *arg != '\0') { -- sx = rpmsxNew(arg); -- (void) rpmtsSetREContext(ts, sx); -- } -- arg = _free(arg); -- } -- sx = rpmsxFree(sx); -+ arg = rpmGetPath("%{?_verify_file_context_path}", NULL); -+ if (arg != NULL && *arg != '\0') { -+ matchpathcon_init(arg); -+ } -+ arg = _free(arg); - } - - ovsflags = rpmtsSetVSFlags(ts, vsflags); --- rpm-4.4.2/lib/rpmfi.c.matchpathcon 2005-02-10 03:30:28.000000000 -0500 +++ rpm-4.4.2/lib/rpmfi.c 2005-07-21 16:47:11.000000000 -0400 @@ -16,7 +16,7 @@ diff --git a/rpm.spec b/rpm.spec index fa9e7d1..ed4bd19 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ Name: rpm %define version 4.4.2 Version: %{version} %{expand: %%define rpm_version %{version}} -Release: 24 +Release: 25 Group: System Environment/Base Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz Source1: mono-find-provides @@ -52,6 +52,7 @@ Patch23: rpm-4.4.2-doxy.patch Patch24: rpm-4.4.2-trust.patch Patch25: rpm-4.4.2-devel-autodep.patch Patch26: rpm-4.4.2-rpmfc-skip.patch +Patch27: rpm-4.4.2-noselinux-verify.patch License: GPL Conflicts: patch < 2.5 %ifos linux @@ -167,10 +168,9 @@ shell-like rules. %patch3 -p1 -b .rpmal %patch4 -p1 -b .prepostun %patch5 -p1 -b .ordererase -%patch6 -p1 -b .matchpathcon +# patch 6 moved %patch7 -p1 -b .perlreq %patch8 -p1 -b .param -%patch9 -p1 -b .contextverify %patch10 -p1 -b .charset %patch11 -p1 -b .ghostconflicts #patch12 -p1 -b .exclude @@ -188,6 +188,8 @@ shell-like rules. %patch24 -p1 -b .trust %patch25 -p1 -b .develdeps %patch26 -p1 -b .fcskip +%patch27 -p0 -b .nosever +%patch6 -p1 -b .matchpathcon %build @@ -581,6 +583,9 @@ exit 0 %{__includedir}/popt.h %changelog +* Wed Jun 28 2006 Paul Nasrat - 4.4.2-25 +- Remove SELinux context verification (#193488) + * Thu May 04 2006 Paul Nasrat - 4.4.2-24 - File classification with autoReq off (#190488)