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

pytest: sid_strings: use more reliable well known SID

It seems as if the well-known SID S-1-5-32-579
(DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS) is
not always present -- specifically, it was not there on the
Windows machine used to develop these tests, but it is there on
the one I am now using.

S-1-5-32-545 (DOMAIN_ALIAS_RID_USERS) is surely going to exist,
so we use that instead.

That changes some of the assertions, making some NO_SUCH_OBJECTs
into successes.

For these tests we are only interested in the parsing of the SIDs, not
their meaning, so it's OK to change it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10763

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2024-05-02 14:24:18 +12:00
committed by Andrew Bartlett
parent ae4f095586
commit fb724c6110
2 changed files with 7 additions and 7 deletions

View File

@@ -410,9 +410,9 @@ class SidStringsAsDnInSearchBase(SidStringBase):
"""
skip_local = True
cases = {' S-1-1-1-1-1-1-1': ldb.ERR_INVALID_DN_SYNTAX,
'S-0-5-32-579': ldb.ERR_INVALID_DN_SYNTAX,
'S-0-5-32-545': ldb.ERR_INVALID_DN_SYNTAX,
'S-000000000001-5-20-243': ldb.ERR_INVALID_DN_SYNTAX,
'S-000000001-5-32-579': ldb.ERR_INVALID_DN_SYNTAX,
'S-000000001-5-32-545': ldb.ERR_INVALID_DN_SYNTAX,
'S-01-05-020-0243': ldb.ERR_NO_SUCH_OBJECT,
'S-01-5-32-11579': ldb.ERR_NO_SUCH_OBJECT,
'S-0x1-0-0-579': ldb.ERR_INVALID_DN_SYNTAX,
@@ -423,7 +423,7 @@ class SidStringsAsDnInSearchBase(SidStringBase):
'S-1-0': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0-0-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0x05-32-11579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0x5-0x20-0x243': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0x5-0x20-0x221': None,
'S-1-0x50000000-32-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0x500000000-0x500000000-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-0x500000000-32-579': ldb.ERR_NO_SUCH_OBJECT,
@@ -439,7 +439,7 @@ class SidStringsAsDnInSearchBase(SidStringBase):
'S-1-3-99': ldb.ERR_NO_SUCH_OBJECT,
'S-1-5-0-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-5-040-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-5-0x20-579': ldb.ERR_NO_SUCH_OBJECT,
'S-1-5-0x20-545': None,
'S-1-5-11111111111111111111111111111111111-579': ldb.ERR_INVALID_DN_SYNTAX,
'S-1-5-18446744073709551615-579': ldb.ERR_INVALID_DN_SYNTAX,
'S-1-5-18446744073709551616-579': ldb.ERR_INVALID_DN_SYNTAX,
@@ -488,7 +488,7 @@ class SidStringsAsDnSearchWithDnObject(SidStringBase):
'S-1-0': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-0-0-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-0x05-32-579': (None, None),
'S-1-0x5-0x20-0x243': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-0x5-0x20-0x221': (None, None),
'S-1-0x50000000-32-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-0x500000000-0x500000000-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-0x500000000-32-579': (None, ldb.ERR_NO_SUCH_OBJECT),
@@ -504,7 +504,7 @@ class SidStringsAsDnSearchWithDnObject(SidStringBase):
'S-1-3-99': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-5-0-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-5-040-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-5-0x20-579': (None, ldb.ERR_NO_SUCH_OBJECT),
'S-1-5-0x20-545': (None, None),
'S-1-5-11111111111111111111111111111111111-579': ('parse error', None),
'S-1-5-18446744073709551615-579': ('parse error', None),
'S-1-5-18446744073709551616-579': ('parse error', None),