diff options
author | Björn Baumbach <bb@sernet.de> | 2019-06-12 21:00:01 +0200 |
---|---|---|
committer | Björn Baumbach <bb@sernet.de> | 2019-06-18 14:48:18 +0000 |
commit | 1b0184a9562689a658e75a0cfc69bdd23277cff6 (patch) | |
tree | 08201ffbec1fce59eb68d41a9912dbf8a2fe5919 /testprogs | |
parent | 80f648b1695b1e3ef3c6e97f3def2694d219a5ff (diff) | |
download | samba-1b0184a9562689a658e75a0cfc69bdd23277cff6.tar.gz |
selftest: add test for samba-tool ntacl get/set --use-ntvfs --xattr-backend=tdb
Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-x | testprogs/blackbox/test_samba-tool_ntacl.sh | 21 |
1 files changed, 21 insertions, 0 deletions
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 |