Bugfixes.

* configure.ac: Avoid linking against -lacl when
--without-posix-acls is given.
* tests/selacl01.at: Call restorecon
* tests/selnx01.at: Likewise.
* tests/testsuite.at (AT_SELINUX_UTILS_PREREQ): Likewise.
(AT_SELINUX_PREREQ,AT_ACLS_PREREQ): Use the right _PREREQ macros.
This commit is contained in:
Pavel Raiskup
2012-11-19 23:08:04 +02:00
committed by Sergey Poznyakoff
parent 6bd463c97e
commit 4a3564fe85
4 changed files with 28 additions and 21 deletions
+1
View File
@@ -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
+1
View File
@@ -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
+3 -2
View File
@@ -132,6 +132,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
])
@@ -158,7 +159,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
@@ -166,7 +167,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 )