mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
tests: add a simple test for smbcacls -x
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Mar 4 19:11:06 UTC 2019 on sn-devel-144
This commit is contained in:
parent
ec8984f8dd
commit
4a9f7d2456
@ -33,6 +33,22 @@ setup_remote_file() {
|
||||
$SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "lcd $PREFIX; put $fname" || exit 1
|
||||
}
|
||||
|
||||
smbcacls_x() {
|
||||
local share=$1
|
||||
local fname="$share.$$"
|
||||
|
||||
# skip with SMB1
|
||||
echo "$ADDARGS" | grep mNT1 && exit 0
|
||||
|
||||
$SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x || exit 1
|
||||
mxac=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD "$fname" -x | awk '/Maximum access/ {print $3}')
|
||||
|
||||
echo "mxac: $mxac"
|
||||
if test "$mxac" != "0x1f01ff" ; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
nt_affects_posix() {
|
||||
local share=$1
|
||||
local expected=$2
|
||||
@ -122,6 +138,7 @@ nt_affects_chgrp() {
|
||||
|
||||
testit "setup remote file tmp" setup_remote_file tmp
|
||||
testit "setup remote file ign_sysacls" setup_remote_file ign_sysacls
|
||||
testit "smbcacls -x" smbcacls_x tmp
|
||||
testit "nt_affects_posix tmp" nt_affects_posix tmp "true"
|
||||
testit "nt_affects_posix ign_sysacls" nt_affects_posix ign_sysacls "false"
|
||||
testit "setup remote file tmp" setup_remote_file tmp
|
||||
|
Loading…
Reference in New Issue
Block a user