auto-import policycoreutils-1.17.3-3 from policycoreutils-1.17.3-3.src.rpm
This commit is contained in:
parent
e824fc2cd1
commit
60067cac0d
86
policycoreutils-rhat.patch
Normal file
86
policycoreutils-rhat.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
--- policycoreutils-1.17.3/load_policy/load_policy.c.rhat 2004-08-24 09:34:38.000000000 -0400
|
||||||
|
+++ policycoreutils-1.17.3/load_policy/load_policy.c 2004-08-25 14:30:46.343767967 -0400
|
||||||
|
@@ -19,13 +19,13 @@
|
||||||
|
|
||||||
|
void usage(char *progname)
|
||||||
|
{
|
||||||
|
- fprintf(stderr, _("usage: %s [-b] policyfile [booleanfile]\n"), progname);
|
||||||
|
+ fprintf(stderr, _("usage: %s [-q] [-b] policyfile [booleanfile]\n"), progname);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
- int fd, ret, opt, setbools = 0, *values, len = 0, i;
|
||||||
|
+ int fd, ret, opt, quiet=0, setbools = 0, *values, len = 0, i;
|
||||||
|
struct stat sb;
|
||||||
|
void *map;
|
||||||
|
char *polpath, *boolpath = NULL, **names;
|
||||||
|
@@ -34,11 +34,14 @@
|
||||||
|
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||||
|
textdomain (PACKAGE);
|
||||||
|
|
||||||
|
- while ((opt = getopt(argc, argv, "b")) > 0) {
|
||||||
|
+ while ((opt = getopt(argc, argv, "qb")) > 0) {
|
||||||
|
switch (opt) {
|
||||||
|
case 'b':
|
||||||
|
setbools = 1;
|
||||||
|
break;
|
||||||
|
+ case 'q':
|
||||||
|
+ quiet = 1;
|
||||||
|
+ break;
|
||||||
|
default:
|
||||||
|
usage(argv[0]);
|
||||||
|
}
|
||||||
|
@@ -81,9 +84,10 @@
|
||||||
|
if (ret < 0) {
|
||||||
|
if (errno == ENOENT || errno == EINVAL) {
|
||||||
|
/* No booleans file or stale booleans in the file; non-fatal. */
|
||||||
|
- fprintf(stderr, _("%s: Warning! Error while setting booleans: %s\n"), argv[0], strerror(errno));
|
||||||
|
+ if (! quiet)
|
||||||
|
+ fprintf(stderr, _("%s: Warning! Error while setting booleans from %s: %s\n"), argv[0], boolpath, strerror(errno));
|
||||||
|
} else {
|
||||||
|
- fprintf(stderr, _("%s: Error while setting booleans: %s\n"), argv[0], strerror(errno));
|
||||||
|
+ fprintf(stderr, _("%s: Error while setting booleans from %s: %s\n"), argv[0], boolpath, strerror(errno));
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -92,7 +96,8 @@
|
||||||
|
ret = security_get_boolean_names(&names, &len);
|
||||||
|
if (ret) {
|
||||||
|
/* Possibly ok, as there may be no booleans. */
|
||||||
|
- fprintf(stderr, _("%s: Warning! Error while getting boolean names: %s\n"), argv[0], strerror(errno));
|
||||||
|
+ if (! quiet)
|
||||||
|
+ fprintf(stderr, _("%s: Warning! Error while getting boolean names: %s\n"), argv[0], strerror(errno));
|
||||||
|
goto load;
|
||||||
|
}
|
||||||
|
if (!len)
|
||||||
|
@@ -113,7 +118,8 @@
|
||||||
|
if (ret < 0) {
|
||||||
|
if (errno == EINVAL) {
|
||||||
|
/* Stale booleans in the file; non-fatal. */
|
||||||
|
- fprintf(stderr, _("%s: Warning! Error while setting booleans: %s\n"), argv[0], strerror(errno));
|
||||||
|
+ if (! quiet)
|
||||||
|
+ fprintf(stderr, _("%s: Warning! Error while setting booleans: %s\n"), argv[0], strerror(errno));
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, _("%s: Error while setting booleans: %s\n"), argv[0], strerror(errno));
|
||||||
|
exit(2);
|
||||||
|
--- policycoreutils-1.17.3/load_policy/load_policy.8.rhat 2004-08-24 09:34:38.000000000 -0400
|
||||||
|
+++ policycoreutils-1.17.3/load_policy/load_policy.8 2004-08-25 14:26:40.825748466 -0400
|
||||||
|
@@ -4,13 +4,15 @@
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B load_policy
|
||||||
|
-[-b] policyfile [booleanfile]
|
||||||
|
+[-q] [-b] policyfile [booleanfile]
|
||||||
|
.br
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
load_policy is the tool used to load/replace the policy in the kernel.
|
||||||
|
By default, load_policy will maintain the booleans settings from the previous policy.
|
||||||
|
.TP
|
||||||
|
+.B -q
|
||||||
|
+quiet mode. Do not report warning messages.
|
||||||
|
.B -b
|
||||||
|
replace the booleans settings with the ones from the [booleanfile] or the default on the system /etc/selinux/$SELINUXTYPE/booleans. (SELINUXTYPE is defined in /etc/selinux/config).
|
||||||
|
|
@ -1,10 +1,11 @@
|
|||||||
Summary: SELinux policy core utilities.
|
Summary: SELinux policy core utilities.
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 1.17.3
|
Version: 1.17.3
|
||||||
Release: 2
|
Release: 3
|
||||||
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 >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
BuildRequires: libselinux-devel >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
||||||
Requires: libselinux >= 1.15.3 libsepol >= 1.1.1
|
Requires: libselinux >= 1.15.3 libsepol >= 1.1.1
|
||||||
@ -30,6 +31,7 @@ context.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1 -b .rhat
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make all
|
make all
|
||||||
@ -74,8 +76,12 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Aug 24 2004 Dan Walsh <dwalsh@redhat.com> 1.17.3-1
|
* Wed Aug 24 2004 Dan Walsh <dwalsh@redhat.com> 1.17.3-3
|
||||||
|
- Add -q (quiet) qualifier to load_policy to not report warnings
|
||||||
|
|
||||||
|
* Tue Aug 24 2004 Dan Walsh <dwalsh@redhat.com> 1.17.3-2
|
||||||
- Add requires for libsepol >= 1.1.1
|
- Add requires for libsepol >= 1.1.1
|
||||||
|
|
||||||
* Tue Aug 24 2004 Dan Walsh <dwalsh@redhat.com> 1.17.3-1
|
* Tue Aug 24 2004 Dan Walsh <dwalsh@redhat.com> 1.17.3-1
|
||||||
- Update to latest from upstream
|
- Update to latest from upstream
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user