21bee1bb5a
* Tue Jul 20 2004 Dan Walsh <dwalsh@redhat.com> 1.15.2-3 - Fix restorecon getopt call to stop hang on IBM Arches
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
--- policycoreutils-1.15.2/scripts/fixfiles.cron.rhat 2004-07-16 14:52:18.000000000 -0400
|
|
+++ policycoreutils-1.15.2/scripts/fixfiles.cron 2004-07-19 12:05:45.000000000 -0400
|
|
@@ -16,7 +16,14 @@
|
|
OUTFILE=`mktemp ${INVALIDFILE}.XXXXXXXXXX` || exit 1
|
|
/sbin/fixfiles -l /dev/null -o $OUTFILE $CRONTYPE
|
|
if [ -s $OUTFILE ]; then
|
|
- mail ${MAILTO} -s "Invalid File Contexts" < $OUTFILE
|
|
+ size=`wc -l $OUTFILE | cut -d' ' -f1`
|
|
+ if [ $size -lt 100 ]; then
|
|
+ mail ${MAILTO} -s "Invalid File Contexts" < $OUTFILE
|
|
+ rm -f $OUTFILE
|
|
+ else
|
|
+ mail ${MAILTO} -s "Invalid File Contexts listed in $OUTFILE" < /dev/null
|
|
+ fi
|
|
+ else
|
|
+ rm -f $OUTFILE
|
|
fi
|
|
- rm -f $OUTFILE
|
|
fi
|
|
--- policycoreutils-1.15.2/scripts/genhomedircon.rhat 2004-07-16 14:52:18.000000000 -0400
|
|
+++ policycoreutils-1.15.2/scripts/genhomedircon 2004-07-19 11:59:05.000000000 -0400
|
|
@@ -25,7 +25,6 @@
|
|
import commands, sys, os, pwd, string
|
|
|
|
EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"]
|
|
-STARTING_UID=100
|
|
|
|
def getPrefixes():
|
|
ulist = pwd.getpwall()
|
|
@@ -92,6 +91,12 @@
|
|
print len(sys.argv)
|
|
usage("Incorrect parameters")
|
|
|
|
+ rc=commands.getstatusoutput("grep -h '^UID_MIN' /etc/login.defs | sed -e 's/^UID_MIN[^0-9]*//'")
|
|
+ if rc[0] == 0:
|
|
+ STARTING_UID=rc[1]
|
|
+ else:
|
|
+ STARTING_UID=500
|
|
+
|
|
FILECONTEXTDIR=sys.argv[1]
|
|
prefixes = getPrefixes()
|
|
|
|
--- policycoreutils-1.15.2/restorecon/restorecon.c.rhat 2004-07-16 14:52:18.000000000 -0400
|
|
+++ policycoreutils-1.15.2/restorecon/restorecon.c 2004-07-20 08:14:14.761612849 -0400
|
|
@@ -109,7 +109,7 @@
|
|
int change=1;
|
|
int verbose=0;
|
|
int file=0;
|
|
- char opt;
|
|
+ int opt;
|
|
FILE *outfile=NULL;
|
|
char buf[PATH_MAX];
|
|
|