91 lines
3.8 KiB
Diff
91 lines
3.8 KiB
Diff
|
diff -Naurp coreutils-6.12.orig/tests/cp/cp-a-selinux coreutils-6.12/tests/cp/cp-a-selinux
|
||
|
--- coreutils-6.12.orig/tests/cp/cp-a-selinux 2008-05-27 07:39:18.000000000 -0400
|
||
|
+++ coreutils-6.12/tests/cp/cp-a-selinux 2008-10-06 16:16:38.000000000 -0400
|
||
|
@@ -33,7 +33,8 @@ cleanup_() { cd /; umount "$cwd/mnt"; }
|
||
|
dd if=/dev/zero of=blob bs=8192 count=200 > /dev/null 2>&1 \
|
||
|
|| framework_failure
|
||
|
mkdir mnt || framework_failure
|
||
|
-mkfs -t ext2 -F blob || framework_failure
|
||
|
+mkfs -t ext2 -F blob ||
|
||
|
+ skip_test_ "failed to create an ext2 file system"
|
||
|
|
||
|
# This context is special: it works even when mcstransd isn't running.
|
||
|
ctx=root:object_r:tmp_t:s0
|
||
|
diff -Naurp coreutils-6.12.orig/tests/cp/preserve-gid coreutils-6.12/tests/cp/preserve-gid
|
||
|
--- coreutils-6.12.orig/tests/cp/preserve-gid 2008-05-27 07:39:18.000000000 -0400
|
||
|
+++ coreutils-6.12/tests/cp/preserve-gid 2008-10-06 16:16:41.000000000 -0400
|
||
|
@@ -19,6 +19,10 @@
|
||
|
. $srcdir/test-lib.sh
|
||
|
require_root_
|
||
|
|
||
|
+# Record primary group number, usually 0.
|
||
|
+# This is the group ID used when cp (without -p) creates a new file.
|
||
|
+primary_group_num=$(id -g)
|
||
|
+
|
||
|
create() {
|
||
|
echo "$1" > "$1" || exit 1
|
||
|
chown "+$2:+$3" "$1" || exit 1
|
||
|
@@ -34,7 +38,7 @@ t0() {
|
||
|
if test "x$s" != "x$u $g"; then
|
||
|
# Allow the actual group to match that of the parent directory
|
||
|
# (it was set to 0 above).
|
||
|
- if test "x$s" = "x$u 0"; then
|
||
|
+ if test "x$s" = "x$u $primary_group_num"; then
|
||
|
:
|
||
|
else
|
||
|
echo "$0: $* $f b: $u $g != $s" 1>&2
|
||
|
diff -Naurp coreutils-6.12.orig/tests/misc/runcon-no-reorder coreutils-6.12/tests/misc/runcon-no-reorder
|
||
|
--- coreutils-6.12.orig/tests/misc/runcon-no-reorder 2008-05-27 07:39:18.000000000 -0400
|
||
|
+++ coreutils-6.12/tests/misc/runcon-no-reorder 2008-10-06 16:16:41.000000000 -0400
|
||
|
@@ -23,9 +23,8 @@ fi
|
||
|
|
||
|
. $srcdir/test-lib.sh
|
||
|
|
||
|
-cat <<\EOF > exp || framework_failure
|
||
|
-runcon: runcon may be used only on a SELinux kernel
|
||
|
-EOF
|
||
|
+diag='runcon: runcon may be used only on a SELinux kernel'
|
||
|
+echo "$diag" > exp || framework_failure
|
||
|
|
||
|
fail=0
|
||
|
|
||
|
@@ -35,6 +34,14 @@ fail=0
|
||
|
# about -j being an invalid option.
|
||
|
runcon $(id -Z) true -j 2> out && : > exp
|
||
|
|
||
|
+# When run on a system with no /selinux/context (i.e., in a chroot),
|
||
|
+# it chcon fails with this: "runcon: invalid context: \
|
||
|
+# root:system_r:unconfined_t:s0-s0:c0.c1023: No such file or directory"
|
||
|
+# That diagnostic is ok, too, so map it to the more common one.
|
||
|
+case `cat out` in
|
||
|
+ 'runcon: invalid context: '*) echo "$diag" > out;;
|
||
|
+esac
|
||
|
+
|
||
|
compare out exp || fail=1
|
||
|
|
||
|
(exit $fail); exit $fail
|
||
|
diff -Naurp coreutils-6.12.orig/tests/rm/fail-2eperm coreutils-6.12/tests/rm/fail-2eperm
|
||
|
--- coreutils-6.12.orig/tests/rm/fail-2eperm 2008-05-27 07:39:18.000000000 -0400
|
||
|
+++ coreutils-6.12/tests/rm/fail-2eperm 2008-10-06 16:16:38.000000000 -0400
|
||
|
@@ -39,8 +39,7 @@ fail=0
|
||
|
rm_version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version|sed -n '1s/.* //p'`
|
||
|
case $rm_version in
|
||
|
$PACKAGE_VERSION) ;;
|
||
|
- *) echo "$0: cannot access just-built rm as user $NON_ROOT_USERNAME" 1>&2
|
||
|
- fail=1 ;;
|
||
|
+ *) skip_test_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
|
||
|
esac
|
||
|
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf a 2> out-t && fail=1
|
||
|
|
||
|
diff -Naurp coreutils-6.12.orig/THANKS coreutils-6.12/THANKS
|
||
|
--- coreutils-6.12.orig/THANKS 2008-05-06 05:28:24.000000000 -0400
|
||
|
+++ coreutils-6.12/THANKS 2008-10-06 16:16:38.000000000 -0400
|
||
|
@@ -237,6 +237,7 @@ Jan Moringen jan.
|
||
|
Jan Nieuwenhuizen janneke@gnu.org
|
||
|
Janos Farkas chexum@shadow.banki.hu
|
||
|
Jarkko Hietaniemi jhi@epsilon.hut.fi
|
||
|
+Jarod Wilson jwilson@redhat.com
|
||
|
Jean Charles Delepine delepine@u-picardie.fr
|
||
|
Jeff Moore jbm@mordor.com
|
||
|
Jeff Sheinberg jeff@bsrd.net
|