* 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:
Daniel J Walsh 2005-03-09 15:40:39 +00:00
parent c4c67d25f1
commit c40c765680
2 changed files with 35 additions and 29 deletions

View File

@ -1,27 +1,29 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.21.20/restorecon/restorecon.c diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.22/scripts/genhomedircon
--- nsapolicycoreutils/restorecon/restorecon.c 2005-02-22 16:37:17.000000000 -0500 --- nsapolicycoreutils/scripts/genhomedircon 2005-03-08 14:03:05.000000000 -0500
+++ policycoreutils-1.21.20/restorecon/restorecon.c 2005-02-28 17:13:13.000000000 -0500 +++ policycoreutils-1.21.22/scripts/genhomedircon 2005-03-09 10:35:37.000000000 -0500
@@ -191,9 +191,9 @@ @@ -45,7 +45,7 @@
if (retcontext >= 0 || errno == ENODATA) { EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"]
int customizable=0;
if (retcontext < 0) prev_context=NULL; def getStartingUID():
- if (retcontext < 0 || - rc=commands.getstatusoutput("grep ^UID_MIN /etc/login.defs | tail -1")
+ if (retcontext < 0 || force || + rc=commands.getstatusoutput("grep ^UID_MIN /etc/login.defs")
(strcmp(prev_context,scontext) != 0 && if rc[0]==0:
- !(customizable=(force ? 0: (is_context_customizable(prev_context) > 0))))) { return int(rc[1].split()[-1])
+ !(customizable=is_context_customizable(prev_context) > 0))) { return 500
if (outfile) { @@ -152,13 +152,13 @@
fprintf(outfile, "%s\n", filename); #############################################################################
}
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.20/scripts/genhomedircon def getDefaultHomeDir():
--- nsapolicycoreutils/scripts/genhomedircon 2005-03-01 22:58:52.000000000 -0500 - rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd | tail -1")
+++ policycoreutils-1.21.20/scripts/genhomedircon 2005-02-28 14:48:19.000000000 -0500 - if rc[0]==0:
@@ -222,7 +222,7 @@ + rc=commands.getstatusoutput("grep ^HOME= /etc/default/useradd")
users="" + if rc[0] == 0:
rc = commands.getstatusoutput('grep "^user" %s' % self.getSystemUsersFile()) return rc[1].split("=")[-1].strip()
if rc[0] == 0: return "/home"
- users+=rc[1]
+ users+=rc[1]+"\n" def getSELinuxType(directory):
rc = commands.getstatusoutput("grep ^user %s" % self.getUsersFile()) - rc=commands.getstatusoutput("grep ^SELINUXTYPE= %s/config | tail -1" % directory)
if rc[0] == 0: + rc=commands.getstatusoutput("grep ^SELINUXTYPE= %s/config" % directory)
users+=rc[1] if rc[0]==0:
return rc[1].split("=")[-1].strip()
return "targeted"

View File

@ -3,10 +3,11 @@
Summary: SELinux policy core utilities. Summary: SELinux policy core utilities.
Name: policycoreutils Name: policycoreutils
Version: 1.21.22 Version: 1.21.22
Release: 1 Release: 2
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
Patch: policycoreutils-rhat.patch
Prefix: %{_prefix} Prefix: %{_prefix}
BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver} BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver}
@ -33,7 +34,7 @@ context.
%prep %prep
%setup -q %setup -q
%patch -p1 -b .rhat
%build %build
make CFLAGS="%{optflags}" all make CFLAGS="%{optflags}" all
@ -80,6 +81,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog %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 * Tue Mar 8 2005 Dan Walsh <dwalsh@redhat.com> 1.21.22-1
- Cleanup error reporting - Cleanup error reporting