test_sharesec: Add new test for ACL entry from numerical input
authorChristof Schmitt <cs@samba.org>
Thu, 4 Feb 2016 23:35:08 +0000 (16:35 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 19 Feb 2016 23:46:30 +0000 (00:46 +0100)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/script/tests/test_sharesec.sh

index ef207ff9b556c4a15436c9419cb7faf5e6aed7f2..37814291b63ff4f71001ee05eb140a8d52045898 100755 (executable)
@@ -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 || \