* Wed Mar 9 2005 Dan Walsh <dwalsh@redhat.com> 1.21.22-2
- Fix genhomedircon to not put bad userad error in file_contexts.homedir
This commit is contained in:
parent
c4c67d25f1
commit
c40c765680
@ -1,27 +1,29 @@
|
||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.21.20/restorecon/restorecon.c
|
||||
--- nsapolicycoreutils/restorecon/restorecon.c 2005-02-22 16:37:17.000000000 -0500
|
||||
+++ policycoreutils-1.21.20/restorecon/restorecon.c 2005-02-28 17:13:13.000000000 -0500
|
||||
@@ -191,9 +191,9 @@
|
||||
if (retcontext >= 0 || errno == ENODATA) {
|
||||
int customizable=0;
|
||||
if (retcontext < 0) prev_context=NULL;
|
||||
- if (retcontext < 0 ||
|
||||
+ if (retcontext < 0 || force ||
|
||||
(strcmp(prev_context,scontext) != 0 &&
|
||||
- !(customizable=(force ? 0: (is_context_customizable(prev_context) > 0))))) {
|
||||
+ !(customizable=is_context_customizable(prev_context) > 0))) {
|
||||
if (outfile) {
|
||||
fprintf(outfile, "%s\n", filename);
|
||||
}
|
||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.20/scripts/genhomedircon
|
||||
--- nsapolicycoreutils/scripts/genhomedircon 2005-03-01 22:58:52.000000000 -0500
|
||||
+++ policycoreutils-1.21.20/scripts/genhomedircon 2005-02-28 14:48:19.000000000 -0500
|
||||
@@ -222,7 +222,7 @@
|
||||
users=""
|
||||
rc = commands.getstatusoutput('grep "^user" %s' % self.getSystemUsersFile())
|
||||
if rc[0] == 0:
|
||||
- users+=rc[1]
|
||||
+ users+=rc[1]+"\n"
|
||||
rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile())
|
||||
if rc[0] == 0:
|
||||
users+=rc[1]
|
||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.22/scripts/genhomedircon
|
||||
--- nsapolicycoreutils/scripts/genhomedircon 2005-03-08 14:03:05.000000000 -0500
|
||||
+++ policycoreutils-1.21.22/scripts/genhomedircon 2005-03-09 10:35:37.000000000 -0500
|
||||
@@ -45,7 +45,7 @@
|
||||
EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"]
|
||||
|
||||
def getStartingUID():
|
||||
- rc=commands.getstatusoutput("grep ^UID_MIN /etc/login.defs | tail -1")
|
||||
+ rc=commands.getstatusoutput("grep ^UID_MIN /etc/login.defs")
|
||||
if rc[0]==0:
|
||||
return int(rc[1].split()[-1])
|
||||
return 500
|
||||
@@ -152,13 +152,13 @@
|
||||
#############################################################################
|
||||
|
||||
def getDefaultHomeDir():
|
||||
- rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd | tail -1")
|
||||
- if rc[0]==0:
|
||||
+ rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd")
|
||||
+ if rc[0] == 0:
|
||||
return rc[1].split("=")[-1].strip()
|
||||
return "/home"
|
||||
|
||||
def getSELinuxType(directory):
|
||||
- rc=commands.getstatusoutput("grep ^SELINUXTYPE= %s/config | tail -1" % directory)
|
||||
+ rc=commands.getstatusoutput("grep ^SELINUXTYPE= %s/config" % directory)
|
||||
if rc[0]==0:
|
||||
return rc[1].split("=")[-1].strip()
|
||||
return "targeted"
|
||||
|
@ -3,10 +3,11 @@
|
||||
Summary: SELinux policy core utilities.
|
||||
Name: policycoreutils
|
||||
Version: 1.21.22
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
Patch: policycoreutils-rhat.patch
|
||||
|
||||
Prefix: %{_prefix}
|
||||
BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver}
|
||||
@ -33,7 +34,7 @@ context.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch -p1 -b .rhat
|
||||
%build
|
||||
make CFLAGS="%{optflags}" all
|
||||
|
||||
@ -80,6 +81,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%config(noreplace) %{_sysconfdir}/sestatus.conf
|
||||
|
||||
%changelog
|
||||
* Wed Mar 9 2005 Dan Walsh <dwalsh@redhat.com> 1.21.22-2
|
||||
- Fix genhomedircon to not put bad userad error in file_contexts.homedir
|
||||
|
||||
* Tue Mar 8 2005 Dan Walsh <dwalsh@redhat.com> 1.21.22-1
|
||||
- Cleanup error reporting
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user