From: Christof Schmitt Date: Thu, 4 Feb 2016 23:35:08 +0000 (-0700) Subject: test_sharesec: Add new test for ACL entry from numerical input X-Git-Tag: talloc-2.1.6~247 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a80114a0e48d129cfd8a02ff97a2d5f17784a25;p=thirdparty%2Fsamba.git test_sharesec: Add new test for ACL entry from numerical input Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/script/tests/test_sharesec.sh b/source3/script/tests/test_sharesec.sh index ef207ff9b55..37814291b63 100755 --- a/source3/script/tests/test_sharesec.sh +++ b/source3/script/tests/test_sharesec.sh @@ -97,6 +97,20 @@ testit "Verify ACL count after removal" test $COUNT -eq 3 || \ ACL="$($CMD --view | grep S-1-5-32-546')" testit "Verify removal" test -e "$ACL" || failed=$(expr $failed + 1) +testit "Set ACL as hex value" $CMD --add S-1-5-32-547:0x1/0x0/0x001F01FF || \ + failed=$(expr $failed + 1) +ACL="$($CMD --view | grep S-1-5-32-547 | sed -e 's/^ACL://')" +testit "Verify numerically set entry" \ + test "$ACL" = S-1-5-32-547:DENIED/0x0/FULL || \ + failed=$(expr $failed + 1) + +testit "Set ACL as dec value" $CMD --add S-1-5-32-548:1/0/0x001F01FF || \ + failed=$(expr $failed + 1) +ACL="$($CMD --view | grep S-1-5-32-548 | sed -e 's/^ACL://')" +testit "Verify numerically set entry" \ + test "$ACL" = S-1-5-32-548:DENIED/0x0/FULL || \ + failed=$(expr $failed + 1) + testit "Set back to default ACL " $CMD --replace S-1-1-0:ALLOWED/0x0/FULL || \ failed=$(expr $failed + 1) testit "Query standard ACL" $CMD --view || \