From: David Mulder Date: Wed, 24 Feb 2021 19:35:10 +0000 (-0700) Subject: gpo: Ensure that samba-gpupdate doesn't require ad-dc X-Git-Tag: tevent-0.11.0~1665 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5928566a0e93eec5e3420cd03536d32c7c7c779;p=thirdparty%2Fsamba.git gpo: Ensure that samba-gpupdate doesn't require ad-dc Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/gp_sec_ext.py b/python/samba/gp_sec_ext.py index a9f5bbe5a6c..45a7884df3b 100644 --- a/python/samba/gp_sec_ext.py +++ b/python/samba/gp_sec_ext.py @@ -115,8 +115,7 @@ class gp_access_ext(gp_inf_ext): object to update the parameter to Samba4. Not registry oriented whatsoever. ''' - def __init__(self, *args): - super().__init__(*args) + def load_ldb(self): try: self.ldb = SamDB(self.lp.samdb_url(), session_info=system_session(), @@ -132,6 +131,7 @@ class gp_access_ext(gp_inf_ext): def process_group_policy(self, deleted_gpo_list, changed_gpo_list): if self.lp.get('server role') != 'active directory domain controller': return + self.load_ldb() inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf' for guid, settings in deleted_gpo_list: self.gp_db.set_guid(guid) diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo deleted file mode 100644 index e415e42f3b7..00000000000 --- a/selftest/knownfail.d/gpo +++ /dev/null @@ -1 +0,0 @@ -^samba.tests.gpo_member