From 1b0184a9562689a658e75a0cfc69bdd23277cff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Wed, 12 Jun 2019 21:00:01 +0200 Subject: selftest: add test for samba-tool ntacl get/set --use-ntvfs --xattr-backend=tdb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Baumbach Reviewed-by: Stefan Metzmacher --- testprogs/blackbox/test_samba-tool_ntacl.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'testprogs') diff --git a/testprogs/blackbox/test_samba-tool_ntacl.sh b/testprogs/blackbox/test_samba-tool_ntacl.sh index b00d4f29ac2..64a7e6b55d3 100755 --- a/testprogs/blackbox/test_samba-tool_ntacl.sh +++ b/testprogs/blackbox/test_samba-tool_ntacl.sh @@ -44,6 +44,24 @@ test_set_acl() $PYTHON $samba_tool ntacl set "$acl" "$testfile" } +test_get_acl_ntvfs() +{ + testfile="$1" + exptextedacl="$2" + + retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf) || return $? + + test "$retacl" = "$exptextedacl" +} + +test_set_acl_ntvfs() +{ + testfile="$1" + acl="$2" + + $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf +} + # work around include error - s4-loadparm does not allow missing include files # # Unable to load file /home/bbaumba/src/git/samba/st/ad_member/lib/server.conf @@ -63,6 +81,9 @@ testit "set_ntacl" test_set_acl "$testfile" "$acl" || failed=`expr $failed + 1` testit "get_ntacl" test_get_acl "$testfile" "$acl" || failed=`expr $failed + 1` +testit "set_ntacl_ntvfs" test_set_acl_ntvfs "$testfile" "$acl" || failed=`expr $failed + 1` +testit "get_ntacl_ntvfs" test_get_acl_ntvfs "$testfile" "$acl" || failed=`expr $failed + 1` + rm -f "$testfile" exit $failed -- cgit v1.2.1