s3/utils: when encoding ace string use "FA", "FR", "FW", "FX" string rights
authorNoel Power <noel.power@suse.com>
Thu, 25 Aug 2022 13:29:09 +0000 (14:29 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Apr 2023 02:15:36 +0000 (02:15 +0000)
commitd36bab52d0fd68a8d28238dbba7e7ea35b936e6c
tree3eabb66e06963aefc2a8c6c8cae5d01bbbff9115
parent0a153c1d58d8ae22432e990779afa0bb8fc9f9c9
s3/utils: when encoding ace string use "FA", "FR", "FW", "FX" string rights

prior to this patch rights matching "FA", "FR", "FW", "FX" were
outputted as the hex string representing the bit value.

While outputting the hex string is perfectly fine, it makes it harder
to compare icacls output (which always uses the special string values)

Additionally adjust various tests to deal with use of shortcut access masks
as sddl format now uses FA, FR, FW & FX strings (like icalcs does) instead
of hex representation of the bit mask.

adjust
  samba4.blackbox.samba-tool_ntacl
  samba3.blackbox.large_acl
  samba.tests.samba_tool.ntacl
  samba.tests.ntacls
  samba.tests.posixacl

so various string comparisons of the sddl format now pass

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
[abartlet@samba.org Adapted to new stricter SDDL behaviour around leading zeros in hex
 numbers, eg 0x001]
libcli/security/sddl.c
python/samba/provision/__init__.py
python/samba/tests/ntacls.py
python/samba/tests/posixacl.py
python/samba/tests/samba_tool/ntacl.py
selftest/knownfail.d/sddl
source3/script/tests/test_large_acl.sh
testprogs/blackbox/test_samba-tool_ntacl.sh