1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

s4/dsdb: fix unnecessary backslash

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Rob van der Linde 2023-02-24 12:57:57 +13:00 committed by Andrew Bartlett
parent 8c19775a27
commit 3eccaf5d1e
3 changed files with 9 additions and 9 deletions

View File

@ -329,11 +329,11 @@ class PrivAttrsTests(samba.tests.TestCase):
except LdbError as e5:
(enum, estr) = e5.args
if "unpriv-add-error" in attrs[test_name]:
self.assertGotLdbError(attrs[test_name]["unpriv-add-error"], \
enum)
self.assertGotLdbError(attrs[test_name]["unpriv-add-error"],
enum)
else:
self.assertGotLdbError(attrs[test_name]["unpriv-error"], \
enum)
self.assertGotLdbError(attrs[test_name]["unpriv-error"],
enum)
elif "only-2" in attrs[test_name] and \
attrs[test_name]["only-2"] != objectclass:
try:

View File

@ -96,7 +96,7 @@ class UserAccountControlTests(samba.tests.TestCase):
UF_SERVER_TRUST_ACCOUNT]:
account_type_str = dsdb.user_account_control_flag_bit_to_string(account_type)
for objectclass in ["computer", "user"]:
for name in [("oc_uac_lock$", "withdollar"), \
for name in [("oc_uac_lock$", "withdollar"),
("oc_uac_lock", "plain")]:
test_name = f"{account_type_str}_{objectclass}_{priv[1]}_{name[1]}"
cls.generate_dynamic_test("test_objectclass_uac_dollar_lock",
@ -1282,7 +1282,7 @@ class UserAccountControlTests(samba.tests.TestCase):
try:
self.admin_samdb.add(msg_dict)
if (objectclass == "user" \
if (objectclass == "user"
and account_type != UF_NORMAL_ACCOUNT):
self.fail("Able to create {account_type_str} on {objectclass}")
except LdbError as e:

View File

@ -311,9 +311,9 @@ def sanitychecks(samdb, names):
print("No DC found. Your provision is most probably broken!")
return False
elif len(res) != 1:
print("Found %d domain controllers. For the moment " \
"upgradeprovision is not able to handle an upgrade on a " \
"domain with more than one DC. Please demote the other " \
print("Found %d domain controllers. For the moment "
"upgradeprovision is not able to handle an upgrade on a "
"domain with more than one DC. Please demote the other "
"DC(s) before upgrading") % len(res)
return False
else: