mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
selftest: Add test for 'net conf delshare' also removing share ACL
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
cb907fbee8
commit
9dddb28a17
1
selftest/knownfail.d/sharesec
Normal file
1
selftest/knownfail.d/sharesec
Normal file
@ -0,0 +1 @@
|
||||
samba3\.blackbox\.sharesec\.Check\ for\ default\ ACL\(simpleserver:local\)
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
# The test uses well-known SIDs to not require looking up names and SIDs
|
||||
#
|
||||
# Copyright (C) 2015 Christof Schmitt
|
||||
# Copyright (C) 2015, 2019 Christof Schmitt
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
echo Usage: test_sharesec.sh SERVERCONFFILE SHARESEC NET SHARE
|
||||
@ -124,4 +124,17 @@ ACL=$($CMD --view | grep ACL: | sed -e 's/^ACL://')
|
||||
testit "Verify standard ACL" test $ACL = S-1-1-0:ALLOWED/0x0/FULL || \
|
||||
failed=$(expr $failed + 1)
|
||||
|
||||
testit "Create new share" $NET_CMD conf addshare tmp_share /tmp || \
|
||||
failed=$(expr $failed + 1)
|
||||
testit "Change ACL" $SHARESEC $CONF --replace S-1-1-0:DENIED/0x0/FULL tmp_share || \
|
||||
failed=$(expr $failed + 1)
|
||||
testit "Delete share" $NET_CMD conf delshare tmp_share || \
|
||||
failed=$(expr $failed + 1)
|
||||
testit "Create share again" $NET_CMD conf addshare tmp_share /tmp || \
|
||||
failed=$(expr $failed + 1)
|
||||
ACL=$($SHARESEC $CONF --view tmp_share | grep 'ACL:')
|
||||
testit "Check for default ACL" \
|
||||
test "$ACL" = "ACL:S-1-1-0:ALLOWED/0x0/FULL" || \
|
||||
failed=$(expr $failed + 1)
|
||||
|
||||
testok $0 $failed
|
||||
|
Loading…
Reference in New Issue
Block a user