1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00

pytest/sddl: tests for more invalid or weird cases

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2023-04-28 10:46:27 +12:00
committed by Andrew Bartlett
parent a8a0ae89c5
commit 4a1848a1f5

View File

@@ -604,6 +604,7 @@ class SddlNonCanonical(SddlDecodeEncodeBase):
("D:AI(A;CI;RP LCLO RC;;;AU)", "D:AI(A;CI;LCRPLORC;;;AU)"),
# space before string flags is ignored.
("D:(A;; GA;;;LG)", "D:(A;;GA;;;LG)"),
("D:(A;; 0x75bcd15;;;LG)", "D:(A;;0x75bcd15;;;LG)"),
# from 'samba3.blackbox.large_acl.NT1.able to retrieve a large ACL if VFS supports it'
(("D:(A;;0x001f01ff;;;WD)" +
@@ -722,6 +723,11 @@ class SddlShouldFail(SddlDecodeEncodeBase):
# Windows accepts space before string flags, not after.
"D:(A;;GA ;;;LG)",
"D:(A;;RP ;;;LG)",
# wrong numbers of ';'
"D:(A;;GA;;;LG;)",
"D:(A;;GA;;;LG;;)",
"D:(A;;GA)",
f"D:(A;{';' * 10000})",
# space after SID is bad
# but Windows accepts space before SID, after 2-letter SID
@@ -759,6 +765,11 @@ class SddlShouldFail(SddlDecodeEncodeBase):
"O:",
"O:XX",
"D:("
"D:()"
"D:())"
"D:(A;;0x75bcd15;;;LG))",
]