* Thu Sep 14 2006 Dan Walsh <dwalsh@redhat.com> 1.30.29-1
- Update to upstream - Change -o to take "-" for stdout
This commit is contained in:
parent
72a1c64a8f
commit
6918f70153
@ -112,3 +112,4 @@ policycoreutils-1.30.25.tgz
|
||||
policycoreutils-1.30.26.tgz
|
||||
policycoreutils-1.30.27.tgz
|
||||
policycoreutils-1.30.28.tgz
|
||||
policycoreutils-1.30.29.tgz
|
||||
|
@ -1,48 +1,6 @@
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-1.30.28/audit2allow/audit2allow
|
||||
--- nsapolicycoreutils/audit2allow/audit2allow 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/audit2allow/audit2allow 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2005 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/audit2allow/avc.py policycoreutils-1.30.28/audit2allow/avc.py
|
||||
--- nsapolicycoreutils/audit2allow/avc.py 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/audit2allow/avc.py 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2006 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-1.30.28/newrole/newrole.c
|
||||
--- nsapolicycoreutils/newrole/newrole.c 2006-08-28 16:58:20.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/newrole/newrole.c 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -445,6 +445,7 @@
|
||||
|
||||
/* Terminate on SIGHUP. */
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
+ signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
#ifdef USE_NLS
|
||||
setlocale(LC_ALL, "");
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.8 policycoreutils-1.30.28/restorecon/restorecon.8
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.8 policycoreutils-1.30.29/restorecon/restorecon.8
|
||||
--- nsapolicycoreutils/restorecon/restorecon.8 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/restorecon/restorecon.8 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
.SH "SYNOPSIS"
|
||||
.B restorecon
|
||||
-.I [\-o outfilename ] [\-R] [\-n] [\-v] [\-e directory ] pathname...
|
||||
+.I [-i] [\-o] [\-R] [\-n] [\-v] [\-e directory ] pathname...
|
||||
.P
|
||||
.B restorecon
|
||||
-.I \-f infilename [\-o outfilename ] [\-e directory ] [\-R] [\-n] [\-v] [\-F]
|
||||
+.I [-i] \-f infilename [\-o] [\-e directory ] [\-R] [\-n] [\-v] [\-F]
|
||||
|
||||
.SH "DESCRIPTION"
|
||||
This manual page describes the
|
||||
+++ policycoreutils-1.30.29/restorecon/restorecon.8 2006-09-14 08:12:16.000000000 -0400
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
.SH "OPTIONS"
|
||||
@ -53,20 +11,9 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
.B \-f infilename
|
||||
infilename contains a list of files to be processed by application. Use \- for stdin.
|
||||
.TP
|
||||
@@ -35,8 +38,8 @@
|
||||
.B \-n
|
||||
don't change any file labels.
|
||||
.TP
|
||||
-.B \-o outfilename
|
||||
-save list of files with incorrect context in outfilename.
|
||||
+.B \-o
|
||||
+print list of files with incorrect context.
|
||||
.TP
|
||||
.B \-v
|
||||
show changes in file labels.
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.30.28/restorecon/restorecon.c
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.30.29/restorecon/restorecon.c
|
||||
--- nsapolicycoreutils/restorecon/restorecon.c 2006-09-01 22:32:11.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/restorecon/restorecon.c 2006-09-11 09:53:08.000000000 -0400
|
||||
+++ policycoreutils-1.30.29/restorecon/restorecon.c 2006-09-14 08:17:23.000000000 -0400
|
||||
@@ -11,9 +11,10 @@
|
||||
* restorecon [-Rnv] pathname...
|
||||
*
|
||||
@ -75,7 +22,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
* -n Do not change any file labels.
|
||||
* -v Show changes in file labels.
|
||||
- * -o filename save list of files with incorrect context
|
||||
+ * -o Print list of files with incorrect context
|
||||
+ * -o filename save list of files with incorrect context
|
||||
* -F Force reset of context to match file_context for customizable files
|
||||
*
|
||||
* pathname... The file(s) to label
|
||||
@ -86,8 +33,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
+static int change_ctr = 0;
|
||||
static int verbose = 0;
|
||||
static int progress = 0;
|
||||
-static FILE *outfile = NULL;
|
||||
+static int outfile = 0;
|
||||
static FILE *outfile = NULL;
|
||||
static char *progname;
|
||||
static int errors = 0;
|
||||
static int recurse = 0;
|
||||
@ -100,42 +46,21 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
{
|
||||
fprintf(stderr,
|
||||
- "usage: %s [-FnrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n",
|
||||
+ "usage: %s [-iFonrRv] [-e excludedir ] [-f filename | pathname... ]\n",
|
||||
+ "usage: %s [-iFonrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n",
|
||||
name);
|
||||
exit(1);
|
||||
}
|
||||
@@ -160,6 +163,8 @@
|
||||
@@ -160,7 +163,9 @@
|
||||
}
|
||||
|
||||
if (lstat(filename, &st) != 0) {
|
||||
- fprintf(stderr, "lstat(%s) failed: %s\n", filename,
|
||||
+ if (!file_exist && errno == ENOENT)
|
||||
+ return 0;
|
||||
fprintf(stderr, "lstat(%s) failed: %s\n", filename,
|
||||
+ fprintf(outfile, "lstat(%s) failed: %s\n", filename,
|
||||
strerror(errno));
|
||||
return 1;
|
||||
@@ -197,11 +202,8 @@
|
||||
return 1;
|
||||
}
|
||||
p += len;
|
||||
- /* ensure trailing slash of directory name */
|
||||
- if (len == 0 || *(p - 1) != '/') {
|
||||
- *p = '/';
|
||||
- p++;
|
||||
- }
|
||||
+ *p = '/';
|
||||
+ p++;
|
||||
strcpy(p, file_sep);
|
||||
filename = path;
|
||||
} else {
|
||||
@@ -236,7 +238,7 @@
|
||||
is_context_customizable(prev_context) > 0))) {
|
||||
if (only_changed_user(scontext, prev_context) == 0) {
|
||||
if (outfile)
|
||||
- fprintf(outfile, "%s\n", filename);
|
||||
+ fprintf(stdout, "%s\n", filename);
|
||||
if (change) {
|
||||
if (lsetfilecon(filename, scontext) < 0) {
|
||||
fprintf(stderr,
|
||||
}
|
||||
@@ -249,9 +251,12 @@
|
||||
freecon(scontext);
|
||||
return 1;
|
||||
@ -174,7 +99,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
|
||||
|
||||
- while ((opt = getopt(argc, argv, "pFrRnvf:o:e:")) > 0) {
|
||||
+ while ((opt = getopt(argc, argv, "ipFrRnvf:oe:")) > 0) {
|
||||
+ while ((opt = getopt(argc, argv, "ipFrRnvf:o:e:")) > 0) {
|
||||
switch (opt) {
|
||||
case 'n':
|
||||
change = 0;
|
||||
@ -185,7 +110,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
case 'r':
|
||||
case 'R':
|
||||
recurse = 1;
|
||||
@@ -370,13 +380,7 @@
|
||||
@@ -370,13 +380,17 @@
|
||||
exit(1);
|
||||
break;
|
||||
case 'o':
|
||||
@ -194,51 +119,36 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore
|
||||
- fprintf(stderr, "Error opening %s: %s\n",
|
||||
- optarg, strerror(errno));
|
||||
- usage(argv[0]);
|
||||
- }
|
||||
+ if (strcmp(optarg,"-") == 0)
|
||||
+ outfile=stdout;
|
||||
+ else {
|
||||
+ outfile = fopen(optarg, "w");
|
||||
+ if (!outfile) {
|
||||
+ fprintf(stderr, "Error opening %s: %s\n",
|
||||
+ optarg, strerror(errno));
|
||||
+ usage(argv[0]);
|
||||
+ }
|
||||
+ __fsetlocking(outfile, FSETLOCKING_BYCALLER);
|
||||
}
|
||||
- __fsetlocking(outfile, FSETLOCKING_BYCALLER);
|
||||
+ outfile = 1;
|
||||
break;
|
||||
case 'v':
|
||||
if (progress) {
|
||||
@@ -425,8 +429,8 @@
|
||||
@@ -425,8 +439,11 @@
|
||||
process(argv[i]);
|
||||
}
|
||||
}
|
||||
- if (outfile)
|
||||
- fclose(outfile);
|
||||
+
|
||||
+ if (change) return change_ctr;
|
||||
if (outfile)
|
||||
fclose(outfile);
|
||||
|
||||
+ if (change) return change_ctr;
|
||||
+
|
||||
return errors;
|
||||
}
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-1.30.28/restorecond/restorecond.init
|
||||
--- nsapolicycoreutils/restorecond/restorecond.init 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/restorecond/restorecond.init 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -3,9 +3,9 @@
|
||||
# restorecond: Daemo used to maintain path file context
|
||||
#
|
||||
# chkconfig: 2345 10 90
|
||||
-# description: restorecond uses inotify to look for creation of new files listed in the
|
||||
-# /etc/selinux/POLICYTYPE/restorefiles.conf file, and sets the correct security
|
||||
-# context.
|
||||
+# description: restorecond uses inotify to look for creation of new files \
|
||||
+# listed in the /etc/selinux/restorecond.conf file, and restores the \
|
||||
+# correct security context.
|
||||
#
|
||||
|
||||
# Source function library.
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-1.30.28/scripts/chcat
|
||||
--- nsapolicycoreutils/scripts/chcat 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/scripts/chcat 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2005 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.30.28/scripts/fixfiles
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.30.29/scripts/fixfiles
|
||||
--- nsapolicycoreutils/scripts/fixfiles 2006-09-01 22:32:11.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/scripts/fixfiles 2006-09-13 06:32:03.000000000 -0400
|
||||
+++ policycoreutils-1.30.29/scripts/fixfiles 2006-09-14 08:12:16.000000000 -0400
|
||||
@@ -117,8 +117,8 @@
|
||||
exit $?
|
||||
fi
|
||||
@ -263,36 +173,6 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts
|
||||
fi
|
||||
|
||||
exit $?
|
||||
@@ -170,9 +170,9 @@
|
||||
}
|
||||
|
||||
usage() {
|
||||
- echo $"Usage: $0 [-l logfile ] [-o outputfile ] { check | restore|[-F] relabel } [[dir] ... ] "
|
||||
+ echo $"Usage: $0 [-l logfile ] [-o] { check | restore|[-F] relabel } [[dir] ... ] "
|
||||
echo or
|
||||
- echo $"Usage: $0 -R rpmpackage[,rpmpackage...] -C PREVIOUS_FILECONTEXT [-l logfile ] [-o outputfile ] { check | restore }"
|
||||
+ echo $"Usage: $0 -R rpmpackage[,rpmpackage...] -C PREVIOUS_FILECONTEXT [-l logfile ] [-o] { check | restore }"
|
||||
}
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
@@ -181,7 +181,7 @@
|
||||
fi
|
||||
|
||||
# See how we were called.
|
||||
-while getopts "C:Ffo:R:l:" i; do
|
||||
+while getopts "C:FfoR:l:" i; do
|
||||
case "$i" in
|
||||
f)
|
||||
fullFlag=1
|
||||
@@ -190,7 +190,7 @@
|
||||
RPMFILES=$OPTARG
|
||||
;;
|
||||
o)
|
||||
- OUTFILES=$OPTARG
|
||||
+ OUTFILES="-o"
|
||||
;;
|
||||
l)
|
||||
LOGFILE=$OPTARG
|
||||
@@ -219,7 +219,7 @@
|
||||
# check if they specified both DIRS and RPMFILES
|
||||
#
|
||||
@ -302,204 +182,3 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts
|
||||
if [ $OPTIND -le $# ]; then
|
||||
usage
|
||||
fi
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/fixfiles.8 policycoreutils-1.30.28/scripts/fixfiles.8
|
||||
--- nsapolicycoreutils/scripts/fixfiles.8 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/scripts/fixfiles.8 2006-09-13 06:31:17.000000000 -0400
|
||||
@@ -3,9 +3,9 @@
|
||||
fixfiles \- fix file security contexts.
|
||||
|
||||
.SH "SYNOPSIS"
|
||||
-.B fixfiles [-F] [ -R rpmpackagename[,rpmpackagename...] ] [ -C PREVIOUS_FILECONTEXT ] [-l logfile ] [-o outputfile ] { check | restore | [-F] relabel }"
|
||||
+.B fixfiles [-F] [ -R rpmpackagename[,rpmpackagename...] ] [ -C PREVIOUS_FILECONTEXT ] [-l logfile ] [-o] { check | restore | [-F] relabel }"
|
||||
|
||||
-.B fixfiles [-F] [-l logfile ] [-o outputfile ] { check | restore|[-f] relabel } [[dir/file] ... ]
|
||||
+.B fixfiles [-F] [-l logfile ] [-o] { check | restore|[-f] relabel } [[dir/file] ... ]
|
||||
|
||||
.SH "DESCRIPTION"
|
||||
This manual page describes the
|
||||
@@ -26,8 +26,8 @@
|
||||
.B -l logfile
|
||||
Save the output to the specified logfile
|
||||
.TP
|
||||
-.B -o outputfile
|
||||
-Save all files that have file_context that differs from the default, in outputfile.
|
||||
+.B -o
|
||||
+Print all files that have file_context that differs from the default.
|
||||
|
||||
.TP
|
||||
.B -F
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.30.28/scripts/genhomedircon
|
||||
--- nsapolicycoreutils/scripts/genhomedircon 2006-08-28 16:58:19.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/scripts/genhomedircon 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2004 Tresys Technology, LLC
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/secon/Makefile policycoreutils-1.30.28/secon/Makefile
|
||||
--- nsapolicycoreutils/secon/Makefile 2006-08-28 16:58:20.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/secon/Makefile 2006-09-08 09:16:28.000000000 -0400
|
||||
@@ -20,8 +20,8 @@
|
||||
install: all
|
||||
install -m 755 secon $(BINDIR);
|
||||
|
||||
-# test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
|
||||
-# install -m 644 ../man/secon.1 $(MANDIR)/man1
|
||||
+ test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
|
||||
+ install -m 644 secon.1 $(MANDIR)/man1
|
||||
|
||||
relabel:
|
||||
/sbin/restorecon $(BINDIR)/secon
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-1.30.28/semanage/semanage
|
||||
--- nsapolicycoreutils/semanage/semanage 2006-08-28 16:58:18.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/semanage/semanage 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2005 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-1.30.28/semanage/semanage.8
|
||||
--- nsapolicycoreutils/semanage/semanage.8 2006-08-28 16:58:18.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/semanage/semanage.8 2006-09-11 16:02:25.000000000 -0400
|
||||
@@ -88,9 +88,9 @@
|
||||
# View SELinux user mappings
|
||||
$ semanage user -l
|
||||
# Allow joe to login as staff_u
|
||||
-$ semanage login -a -s staff_u
|
||||
+$ semanage login -a -s staff_u joe
|
||||
# Add file-context for everything under /web (used by restorecon)
|
||||
-$ semanage fcontext -a -t httpd_sys_content_t '/web(/.*)?'
|
||||
+$ semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
|
||||
# Allow Apache to listen on port 81
|
||||
$ semanage port -a -t http_port_t -p tcp 81
|
||||
.fi
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-1.30.28/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2006-08-28 16:58:18.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/semanage/seobject.py 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python -E
|
||||
# Copyright (C) 2005 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/setfiles/setfiles.8 policycoreutils-1.30.28/setfiles/setfiles.8
|
||||
--- nsapolicycoreutils/setfiles/setfiles.8 2006-08-28 16:58:22.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/setfiles/setfiles.8 2006-09-08 09:12:12.000000000 -0400
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
.SH "SYNOPSIS"
|
||||
.B setfiles
|
||||
-.I [\-c policy ] [\-d] [\-l] [\-n] [\-e directory ] [\-o filename ] [\-q] [\-s] [\-v] [\-vv] [\-W] [\-F] spec_file pathname...
|
||||
+.I [\-c policy ] [\-d] [\-l] [\-n] [\-e directory ] [\-o ] [\-q] [\-s] [\-v] [\-vv] [\-W] [\-F] spec_file pathname...
|
||||
.SH "DESCRIPTION"
|
||||
This manual page describes the
|
||||
.BR setfiles
|
||||
@@ -44,8 +44,8 @@
|
||||
.B \-F
|
||||
Force reset of context to match file_context for customizable files
|
||||
.TP
|
||||
-.B \-o filename
|
||||
-save list of files with incorrect context in filename.
|
||||
+.B \-o
|
||||
+Print list of files with incorrect context.
|
||||
.TP
|
||||
.B \-s
|
||||
take a list of files from standard input instead of using a pathname on the
|
||||
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/setfiles/setfiles.c policycoreutils-1.30.28/setfiles/setfiles.c
|
||||
--- nsapolicycoreutils/setfiles/setfiles.c 2006-08-28 16:58:22.000000000 -0400
|
||||
+++ policycoreutils-1.30.28/setfiles/setfiles.c 2006-09-08 09:12:51.000000000 -0400
|
||||
@@ -12,7 +12,7 @@
|
||||
* the user. The program does not cross file system boundaries.
|
||||
*
|
||||
* USAGE:
|
||||
- * setfiles [-dnpqsvW] [-e directory ] [-c policy] [-o filename ] spec_file pathname...
|
||||
+ * setfiles [-odnpqsvW] [-e directory ] [-c policy] spec_file pathname...
|
||||
*
|
||||
* -e Specify directory to exclude
|
||||
* -F Force reset of context to match file_context for customizable files
|
||||
@@ -26,7 +26,7 @@
|
||||
* -s Use stdin for a list of files instead of searching a partition.
|
||||
* -v Show changes in file labels.
|
||||
* -W Warn about entries that have no matching file.
|
||||
- * -o filename write out file names with wrong context.
|
||||
+ * -o print out file names with wrong context.
|
||||
*
|
||||
* spec_file The specification file.
|
||||
* pathname... The file systems to label (omit if using -s).
|
||||
@@ -85,7 +85,7 @@
|
||||
#endif
|
||||
|
||||
static int add_assoc = 1;
|
||||
-static FILE *outfile = NULL;
|
||||
+static int outfile = 0;
|
||||
static int force = 0;
|
||||
#define STAT_BLOCK_SIZE 1
|
||||
static int pipe_fds[2] = { -1, -1 };
|
||||
@@ -321,7 +321,7 @@
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
- printf("%s: %s matched by %s\n", progname, my_file, newcon);
|
||||
+ fprintf(stderr, "%s: %s matched by %s\n", progname, my_file, newcon);
|
||||
}
|
||||
|
||||
/* Get the current context of the file. */
|
||||
@@ -366,10 +366,10 @@
|
||||
* same. For "-vv", emit everything. */
|
||||
if (verbose > 1 || !user_only_changed) {
|
||||
if (context)
|
||||
- printf("%s: relabeling %s from %s to %s\n",
|
||||
+ fprintf(stderr,"%s: relabeling %s from %s to %s\n",
|
||||
progname, my_file, context, newcon);
|
||||
else
|
||||
- printf("%s: labeling %s to %s\n", progname,
|
||||
+ fprintf(stderr, "%s: labeling %s to %s\n", progname,
|
||||
my_file, newcon);
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@
|
||||
}
|
||||
|
||||
if (outfile && !user_only_changed)
|
||||
- fprintf(outfile, "%s\n", my_file);
|
||||
+ fprintf(stdout, "%s\n", my_file);
|
||||
|
||||
if (context)
|
||||
freecon(context);
|
||||
@@ -516,7 +516,7 @@
|
||||
set_matchpathcon_flags(MATCHPATHCON_VALIDATE | MATCHPATHCON_NOTRANS);
|
||||
|
||||
/* Process any options. */
|
||||
- while ((opt = getopt(argc, argv, "Fc:dlnpqrsvWe:o:")) > 0) {
|
||||
+ while ((opt = getopt(argc, argv, "Fc:dlnpqrsvWe:o")) > 0) {
|
||||
switch (opt) {
|
||||
case 'c':
|
||||
{
|
||||
@@ -570,14 +570,7 @@
|
||||
change = 0;
|
||||
break;
|
||||
case 'o':
|
||||
- outfile = fopen(optarg, "w");
|
||||
- if (!outfile) {
|
||||
- fprintf(stderr, "Error opening %s: %s\n",
|
||||
- optarg, strerror(errno));
|
||||
-
|
||||
- usage(argv[0]);
|
||||
- }
|
||||
- __fsetlocking(outfile, FSETLOCKING_BYCALLER);
|
||||
+ outfile = 1;
|
||||
break;
|
||||
case 'q':
|
||||
quiet = 1;
|
||||
@@ -750,9 +743,6 @@
|
||||
if (warn_no_match)
|
||||
matchpathcon_checkmatches(argv[0]);
|
||||
|
||||
- if (outfile)
|
||||
- fclose(outfile);
|
||||
-
|
||||
for (i = 0; i < excludeCtr; i++) {
|
||||
free(excludeArray[i].directory);
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
%define libselinuxver 1.30.27-1
|
||||
Summary: SELinux policy core utilities.
|
||||
Name: policycoreutils
|
||||
Version: 1.30.28
|
||||
Release: 8
|
||||
Version: 1.30.29
|
||||
Release: 1
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
@ -122,6 +122,13 @@ fi
|
||||
[ -x /sbin/service ] && /sbin/service restorecond condrestart
|
||||
|
||||
%changelog
|
||||
* Thu Sep 14 2006 Dan Walsh <dwalsh@redhat.com> 1.30.29-1
|
||||
- Update to upstream
|
||||
- Change -o to take "-" for stdout
|
||||
|
||||
* Wed Sep 13 2006 Dan Walsh <dwalsh@redhat.com> 1.30.28-9
|
||||
- Add -h support for genhomedircon
|
||||
|
||||
* Wed Sep 13 2006 Dan Walsh <dwalsh@redhat.com> 1.30.28-8
|
||||
- Fix fixfiles handling of -o
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user