I forgot to attach one patch containing fix for testsuite. Attaching now. Sorry for that, Pavel
* Note that I changed the temporary patch 0001-* for gnulib also in gnulib-mailing list.
>From ea08ea37712022411226e821c4f7cc429bd64724 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup <[email protected]> Date: Tue, 14 Aug 2012 19:48:12 +0200 Subject: [PATCH] Bug in selinux testsuite --- tests/testsuite.at | 5 +++-- tests/xattr/selacl01.at | 1 + tests/xattr/selnx01.at | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/testsuite.at b/tests/testsuite.at index 270a5f9..63be9f0 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -116,6 +116,7 @@ m4_define([AT_XATTRS_UTILS_PREREQ],[ ]) m4_define([AT_SELINUX_UTILS_PREREQ],[ file=$( mktemp -p . ) + AT_CHECK_UTIL(restorecon $file, 0) AT_CHECK_UTIL(chcon -h --user=unconfined_u $file,0) rm -rf $file ]) @@ -142,7 +143,7 @@ m4_define([AT_XATTRS_PREREQ],[ fi ]) m4_define([AT_SELINUX_PREREQ],[ - AT_XATTRS_UTILS_PREREQ + AT_SELINUX_UTILS_PREREQ file=$( mktemp -p . ) err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then @@ -150,7 +151,7 @@ m4_define([AT_SELINUX_PREREQ],[ fi ]) m4_define([AT_ACLS_PREREQ],[ - AT_XATTRS_UTILS_PREREQ + AT_ACLS_UTILS_PREREQ file=$( mktemp -p . ) setfacl -m u:$UID:rwx $file err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) diff --git a/tests/xattr/selacl01.at b/tests/xattr/selacl01.at index 60f106b..90d0c5b 100644 --- a/tests/xattr/selacl01.at +++ b/tests/xattr/selacl01.at @@ -36,6 +36,7 @@ MINOR=$( stat /dev/urandom --printf="%T" ) mknod dir/chartype c $MAJOR $MINOR # setup attributes +restorecon -R dir chcon -h --user=system_u dir/fifo chcon -h --user=system_u dir/chartype setfacl -m u:$UID:--- dir/fifo diff --git a/tests/xattr/selnx01.at b/tests/xattr/selnx01.at index 13a208a..79f7267 100644 --- a/tests/xattr/selnx01.at +++ b/tests/xattr/selnx01.at @@ -33,6 +33,7 @@ ln -s file dir/link getfattr -h -d -msecurity.selinux dir dir/file dir/link > start +restorecon -R dir chcon -h --user=system_u dir chcon -h --user=unconfined_u dir/file chcon -h --user=system_u dir/link -- 1.7.11.2
