Remove SELinux context verification (#193488)

This commit is contained in:
Paul Nasrat 2006-06-28 19:59:23 +00:00
parent 088b460e39
commit 2b0ed422b9
2 changed files with 8 additions and 55 deletions

View File

@ -56,58 +56,6 @@
} }
(void) rpmtsSetFlags(ts, ia->transFlags); (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.matchpathcon 2005-02-10 03:30:28.000000000 -0500
+++ rpm-4.4.2/lib/rpmfi.c 2005-07-21 16:47:11.000000000 -0400 +++ rpm-4.4.2/lib/rpmfi.c 2005-07-21 16:47:11.000000000 -0400
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@

View File

@ -20,7 +20,7 @@ Name: rpm
%define version 4.4.2 %define version 4.4.2
Version: %{version} Version: %{version}
%{expand: %%define rpm_version %{version}} %{expand: %%define rpm_version %{version}}
Release: 24 Release: 25
Group: System Environment/Base Group: System Environment/Base
Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz
Source1: mono-find-provides Source1: mono-find-provides
@ -52,6 +52,7 @@ Patch23: rpm-4.4.2-doxy.patch
Patch24: rpm-4.4.2-trust.patch Patch24: rpm-4.4.2-trust.patch
Patch25: rpm-4.4.2-devel-autodep.patch Patch25: rpm-4.4.2-devel-autodep.patch
Patch26: rpm-4.4.2-rpmfc-skip.patch Patch26: rpm-4.4.2-rpmfc-skip.patch
Patch27: rpm-4.4.2-noselinux-verify.patch
License: GPL License: GPL
Conflicts: patch < 2.5 Conflicts: patch < 2.5
%ifos linux %ifos linux
@ -167,10 +168,9 @@ shell-like rules.
%patch3 -p1 -b .rpmal %patch3 -p1 -b .rpmal
%patch4 -p1 -b .prepostun %patch4 -p1 -b .prepostun
%patch5 -p1 -b .ordererase %patch5 -p1 -b .ordererase
%patch6 -p1 -b .matchpathcon # patch 6 moved
%patch7 -p1 -b .perlreq %patch7 -p1 -b .perlreq
%patch8 -p1 -b .param %patch8 -p1 -b .param
%patch9 -p1 -b .contextverify
%patch10 -p1 -b .charset %patch10 -p1 -b .charset
%patch11 -p1 -b .ghostconflicts %patch11 -p1 -b .ghostconflicts
#patch12 -p1 -b .exclude #patch12 -p1 -b .exclude
@ -188,6 +188,8 @@ shell-like rules.
%patch24 -p1 -b .trust %patch24 -p1 -b .trust
%patch25 -p1 -b .develdeps %patch25 -p1 -b .develdeps
%patch26 -p1 -b .fcskip %patch26 -p1 -b .fcskip
%patch27 -p0 -b .nosever
%patch6 -p1 -b .matchpathcon
%build %build
@ -581,6 +583,9 @@ exit 0
%{__includedir}/popt.h %{__includedir}/popt.h
%changelog %changelog
* Wed Jun 28 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-25
- Remove SELinux context verification (#193488)
* Thu May 04 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-24 * Thu May 04 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-24
- File classification with autoReq off (#190488) - File classification with autoReq off (#190488)