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:06:21 +02:00
committed by Sergey Poznyakoff
parent 6bd463c97e
commit 4a3564fe85
4 changed files with 28 additions and 21 deletions

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 )