* Wed Apr 18 2007 Dan Walsh <dwalsh@redhat.com> 2.0.9-7
- Fix restorecon crash
This commit is contained in:
parent
7f4e5a887b
commit
64fb16ae88
File diff suppressed because it is too large
Load Diff
|
@ -1,27 +1,77 @@
|
|||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/Makefile policycoreutils-2.0.7/audit2allow/Makefile
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/Makefile policycoreutils-2.0.9/audit2allow/Makefile
|
||||
--- nsapolicycoreutils/audit2allow/Makefile 2007-02-07 12:11:49.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/audit2allow/Makefile 2007-03-23 09:03:56.000000000 -0400
|
||||
@@ -1,6 +1,6 @@
|
||||
+++ policycoreutils-2.0.9/audit2allow/Makefile 2007-04-18 14:32:01.000000000 -0400
|
||||
@@ -1,6 +1,7 @@
|
||||
# Installation directories.
|
||||
PREFIX ?= ${DESTDIR}/usr
|
||||
-BINDIR ?= $(PREFIX)/bin
|
||||
+BINDIR ?= $(PREFIX)/sbin
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
+SBINDIR ?= $(PREFIX)/sbin
|
||||
LIBDIR ?= $(PREFIX)/lib
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
LOCALEDIR ?= /usr/share/locale
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.7/Makefile
|
||||
@@ -10,7 +11,7 @@
|
||||
install: all
|
||||
-mkdir -p $(BINDIR)
|
||||
install -m 755 audit2allow $(BINDIR)
|
||||
- install -m 755 sepolgen-ifgen $(BINDIR)
|
||||
+ install -m 755 sepolgen-ifgen $(SBINDIR)
|
||||
-mkdir -p $(MANDIR)/man1
|
||||
install -m 644 audit2allow.1 $(MANDIR)/man1/
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2why/Makefile policycoreutils-2.0.9/audit2why/Makefile
|
||||
--- nsapolicycoreutils/audit2why/Makefile 2006-11-16 17:14:26.000000000 -0500
|
||||
+++ policycoreutils-2.0.9/audit2why/Makefile 2007-04-18 14:28:26.000000000 -0400
|
||||
@@ -1,6 +1,6 @@
|
||||
# Installation directories.
|
||||
PREFIX ?= ${DESTDIR}/usr
|
||||
-BINDIR ?= $(PREFIX)/sbin
|
||||
+BINDIR ?= $(PREFIX)/bin
|
||||
LIBDIR ?= ${PREFIX}/lib
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
LOCALEDIR ?= /usr/share/locale
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.9/Makefile
|
||||
--- nsapolicycoreutils/Makefile 2006-11-16 17:15:00.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/Makefile 2007-03-23 09:03:56.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/Makefile 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
|
||||
+SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
|
||||
|
||||
all install relabel clean indent:
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-2.0.7/restorecon/restorecon.c
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-2.0.9/restorecon/restorecon.c
|
||||
--- nsapolicycoreutils/restorecon/restorecon.c 2006-11-16 17:14:26.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/restorecon/restorecon.c 2007-03-23 09:03:56.000000000 -0400
|
||||
@@ -336,8 +336,8 @@
|
||||
+++ policycoreutils-2.0.9/restorecon/restorecon.c 2007-04-18 14:26:39.000000000 -0400
|
||||
@@ -16,6 +16,7 @@
|
||||
* -v Show changes in file labels.
|
||||
* -o filename save list of files with incorrect context
|
||||
* -F Force reset of context to match file_context for customizable files
|
||||
+ * -l Limit directory tree walk to a single filesystem
|
||||
*
|
||||
* pathname... The file(s) to label
|
||||
*
|
||||
@@ -50,6 +51,7 @@
|
||||
static int recurse = 0;
|
||||
static int file_exist = 1;
|
||||
static int force = 0;
|
||||
+static int onefs = 0;
|
||||
#define STAT_BLOCK_SIZE 1
|
||||
static int pipe_fds[2] = { -1, -1 };
|
||||
static unsigned long long count = 0;
|
||||
@@ -326,18 +328,20 @@
|
||||
rc = fork();
|
||||
if (rc == 0) {
|
||||
close(pipe_fds[0]);
|
||||
- nftw(buf, pre_stat, 1024, FTW_PHYS);
|
||||
+ nftw(buf, pre_stat, 1024,
|
||||
+ FTW_PHYS | (onefs ? FTW_MOUNT : 0));
|
||||
exit(1);
|
||||
}
|
||||
if (rc > 0)
|
||||
close(pipe_fds[1]);
|
||||
if (rc == -1 || rc > 0) {
|
||||
- if (nftw(buf, apply_spec, 1024, FTW_PHYS)) {
|
||||
+ if (nftw(buf, apply_spec, 1024,
|
||||
+ FTW_PHYS | (onefs ? FTW_MOUNT : 0))) {
|
||||
if (!file_exist && errno == ENOENT)
|
||||
return;
|
||||
fprintf(stderr,
|
||||
|
@ -32,9 +82,25 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
errors++;
|
||||
}
|
||||
}
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.7/restorecond/restorecond.c
|
||||
@@ -367,11 +371,14 @@
|
||||
|
||||
set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
|
||||
|
||||
- while ((opt = getopt(argc, argv, "ipFrRnvf:o:e:")) > 0) {
|
||||
+ while ((opt = getopt(argc, argv, "ipFrRnvf:lo:e:")) > 0) {
|
||||
switch (opt) {
|
||||
case 'n':
|
||||
change = 0;
|
||||
break;
|
||||
+ case 'l':
|
||||
+ onefs = 1;
|
||||
+ break;
|
||||
case 'i':
|
||||
file_exist = 0;
|
||||
break;
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.9/restorecond/restorecond.c
|
||||
--- nsapolicycoreutils/restorecond/restorecond.c 2007-02-22 08:53:22.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/restorecond/restorecond.c 2007-03-23 09:03:56.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/restorecond/restorecond.c 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -210,9 +210,10 @@
|
||||
}
|
||||
|
||||
|
@ -61,9 +127,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
}
|
||||
free(scontext);
|
||||
close(fd);
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.7/restorecond/restorecond.conf
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.9/restorecond/restorecond.conf
|
||||
--- nsapolicycoreutils/restorecond/restorecond.conf 2006-11-20 12:19:55.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/restorecond/restorecond.conf 2007-03-23 09:03:56.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/restorecond/restorecond.conf 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -1,7 +1,10 @@
|
||||
/etc/resolv.conf
|
||||
+/etc/localtime
|
||||
|
@ -75,9 +141,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
+/etc/lvm/.cache
|
||||
~/public_html
|
||||
~/.mozilla/plugins/libflashplayer.so
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.7/restorecond/restorecond.init
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.9/restorecond/restorecond.init
|
||||
--- nsapolicycoreutils/restorecond/restorecond.init 2007-03-01 17:23:40.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/restorecond/restorecond.init 2007-03-23 09:03:56.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/restorecond/restorecond.init 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -73,6 +73,7 @@
|
||||
;;
|
||||
status)
|
||||
|
@ -86,9 +152,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.7/scripts/chcat
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.9/scripts/chcat
|
||||
--- nsapolicycoreutils/scripts/chcat 2007-02-22 08:53:22.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/scripts/chcat 2007-03-23 09:03:56.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/scripts/chcat 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -74,9 +74,11 @@
|
||||
if i not in cats:
|
||||
cats.append(i)
|
||||
|
@ -120,9 +186,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
if add_ind:
|
||||
cmd = "semanage login -a -r %s -s %s %s" % (new_serange, user[0], u)
|
||||
else:
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.7/scripts/fixfiles
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.9/scripts/fixfiles
|
||||
--- nsapolicycoreutils/scripts/fixfiles 2007-01-11 08:56:30.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/scripts/fixfiles 2007-03-23 14:24:15.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/scripts/fixfiles 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -138,7 +138,7 @@
|
||||
exit $?
|
||||
fi
|
||||
|
@ -132,9 +198,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
exit $?
|
||||
}
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-2.0.7/scripts/genhomedircon
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-2.0.9/scripts/genhomedircon
|
||||
--- nsapolicycoreutils/scripts/genhomedircon 2006-11-28 09:24:33.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/scripts/genhomedircon 2007-04-09 15:44:47.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/scripts/genhomedircon 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
import sys, os, pwd, string, getopt, re
|
||||
|
@ -155,10 +221,10 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
fd.close()
|
||||
return ret
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.7/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2007-02-22 08:53:22.000000000 -0500
|
||||
+++ policycoreutils-2.0.7/semanage/seobject.py 2007-03-23 09:03:56.000000000 -0400
|
||||
@@ -209,6 +209,7 @@
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.9/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2007-04-12 12:43:06.000000000 -0400
|
||||
+++ policycoreutils-2.0.9/semanage/seobject.py 2007-04-16 13:26:34.000000000 -0400
|
||||
@@ -210,6 +210,7 @@
|
||||
os.write(fd, self.out())
|
||||
os.close(fd)
|
||||
os.rename(newfilename, self.filename)
|
||||
|
@ -166,7 +232,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
|
||||
class semanageRecords:
|
||||
def __init__(self):
|
||||
@@ -1282,9 +1283,12 @@
|
||||
@@ -1283,9 +1284,12 @@
|
||||
raise ValueError(_("Could not list booleans"))
|
||||
|
||||
for boolean in self.blist:
|
||||
|
@ -182,55 +248,3 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.7 --exclude=gui --exclude=po
|
|||
|
||||
return ddict
|
||||
|
||||
--- policycoreutils-2.0.7/restorecon/restorecon.c.onefs 2007-04-02 14:35:37.000000000 -0400
|
||||
+++ policycoreutils-2.0.7/restorecon/restorecon.c 2007-04-02 14:48:05.000000000 -0400
|
||||
@@ -16,6 +16,7 @@
|
||||
* -v Show changes in file labels.
|
||||
* -o filename save list of files with incorrect context
|
||||
* -F Force reset of context to match file_context for customizable files
|
||||
+ * -l Limit directory tree walk to a single filesystem
|
||||
*
|
||||
* pathname... The file(s) to label
|
||||
*
|
||||
@@ -50,6 +51,7 @@
|
||||
static int recurse = 0;
|
||||
static int file_exist = 1;
|
||||
static int force = 0;
|
||||
+static int onefs = 0;
|
||||
#define STAT_BLOCK_SIZE 1
|
||||
static int pipe_fds[2] = { -1, -1 };
|
||||
static unsigned long long count = 0;
|
||||
@@ -326,13 +328,15 @@
|
||||
rc = fork();
|
||||
if (rc == 0) {
|
||||
close(pipe_fds[0]);
|
||||
- nftw(buf, pre_stat, 1024, FTW_PHYS);
|
||||
+ nftw(buf, pre_stat, 1024,
|
||||
+ FTW_PHYS | (onefs ? FTW_MOUNT : 0));
|
||||
exit(1);
|
||||
}
|
||||
if (rc > 0)
|
||||
close(pipe_fds[1]);
|
||||
if (rc == -1 || rc > 0) {
|
||||
- if (nftw(buf, apply_spec, 1024, FTW_PHYS)) {
|
||||
+ if (nftw(buf, apply_spec, 1024,
|
||||
+ FTW_PHYS | (onefs ? FTW_MOUNT : 0))) {
|
||||
if (!file_exist && errno == ENOENT)
|
||||
return;
|
||||
fprintf(stderr,
|
||||
@@ -367,11 +371,14 @@
|
||||
|
||||
set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
|
||||
|
||||
- while ((opt = getopt(argc, argv, "ipFrRnvf:o:e:")) > 0) {
|
||||
+ while ((opt = getopt(argc, argv, "ipFrRnvfl:o:e:")) > 0) {
|
||||
switch (opt) {
|
||||
case 'n':
|
||||
change = 0;
|
||||
break;
|
||||
+ case 'l':
|
||||
+ onefs = 1;
|
||||
+ break;
|
||||
case 'i':
|
||||
file_exist = 0;
|
||||
break;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
Summary: SELinux policy core utilities.
|
||||
Name: policycoreutils
|
||||
Version: 2.0.9
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
|
@ -16,12 +16,12 @@ Source3: system-config-selinux.desktop
|
|||
Source4: system-config-selinux.pam
|
||||
Source5: system-config-selinux.console
|
||||
Patch: policycoreutils-rhat.patch
|
||||
#Patch1: policycoreutils-po.patch
|
||||
Patch1: policycoreutils-po.patch
|
||||
#Patch2: policycoreutils-sepolgen.patch
|
||||
Patch3: policycoreutils-gui.patch
|
||||
|
||||
BuildRequires: pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} libselinux-devel >= %{libselinuxver} libcap-devel audit-libs-devel >= %{libauditver} gettext
|
||||
Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff /bin/rpm
|
||||
Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff /bin/rpm /bin/sed
|
||||
Requires: libsepol >= %{libsepolver} libsemanage >= %{libsemanagever} libselinux-python coreutils audit-libs-python >= %{libauditver}
|
||||
Requires(post): /sbin/service /sbin/chkconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
@ -46,7 +46,7 @@ context.
|
|||
%prep
|
||||
%setup -q -a 1
|
||||
%patch -p1 -b .rhat
|
||||
#%patch1 -p1 -b .rhatpo
|
||||
%patch1 -p1 -b .rhatpo
|
||||
#%patch2 -p1 -b .sepolgen
|
||||
%patch3 -p1 -b .gui
|
||||
|
||||
|
@ -131,13 +131,13 @@ rm -rf %{buildroot}
|
|||
%{_sbindir}/semodule
|
||||
%{_sbindir}/semanage
|
||||
%{_sbindir}/load_policy
|
||||
%{_sbindir}/audit2allow
|
||||
%{_sbindir}/audit2why
|
||||
%{_sbindir}/genhomedircon
|
||||
%{_sbindir}/sepolgen-ifgen
|
||||
%{_sbindir}/sestatus
|
||||
%{_sbindir}/run_init
|
||||
%{_sbindir}/open_init_pty
|
||||
%{_bindir}/audit2allow
|
||||
%{_bindir}/audit2why
|
||||
%{_bindir}/chcat
|
||||
%{_bindir}/secon
|
||||
%{_bindir}/semodule_deps
|
||||
|
@ -192,6 +192,9 @@ if [ "$1" -ge "1" ]; then
|
|||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Apr 18 2007 Dan Walsh <dwalsh@redhat.com> 2.0.9-7
|
||||
- Fix restorecon crash
|
||||
|
||||
* Wed Apr 18 2007 Dan Walsh <dwalsh@redhat.com> 2.0.9-6
|
||||
- Change polgengui to a druid
|
||||
|
||||
|
|
Loading…
Reference in New Issue