mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
gpo: Clarify the contents of deleted_gpo_list in process_group_policy
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
David Mulder
parent
bc38d3afe3
commit
0a7e2e3984
@ -35,10 +35,10 @@ class gp_scripts_ext(gp_pol_ext):
|
||||
return 'Unix Settings/Scripts'
|
||||
|
||||
def process_group_policy(self, deleted_gpo_list, changed_gpo_list, cdir=None):
|
||||
for gpo in deleted_gpo_list:
|
||||
self.gp_db.set_guid(gpo[0])
|
||||
if str(self) in gpo[1]:
|
||||
for attribute, script in gpo[1][str(self)].items():
|
||||
for guid, settings in deleted_gpo_list:
|
||||
self.gp_db.set_guid(guid)
|
||||
if str(self) in settings:
|
||||
for attribute, script in settings[str(self)].items():
|
||||
os.unlink(script)
|
||||
self.gp_db.delete(str(self), attribute)
|
||||
self.gp_db.commit()
|
||||
|
@ -34,11 +34,11 @@ class gp_krb_ext(gp_inf_ext):
|
||||
if self.lp.get('server role') != 'active directory domain controller':
|
||||
return
|
||||
inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf'
|
||||
for gpo in deleted_gpo_list:
|
||||
self.gp_db.set_guid(gpo[0])
|
||||
for section in gpo[1].keys():
|
||||
for guid, settings in deleted_gpo_list:
|
||||
self.gp_db.set_guid(guid)
|
||||
for section in settings.keys():
|
||||
if section == str(self):
|
||||
for att, value in gpo[1][section].items():
|
||||
for att, value in settings[section].items():
|
||||
update_samba, _ = self.mapper().get(att)
|
||||
update_samba(att, value)
|
||||
self.gp_db.delete(section, att)
|
||||
@ -127,11 +127,11 @@ class gp_access_ext(gp_inf_ext):
|
||||
if self.lp.get('server role') != 'active directory domain controller':
|
||||
return
|
||||
inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf'
|
||||
for gpo in deleted_gpo_list:
|
||||
self.gp_db.set_guid(gpo[0])
|
||||
for section in gpo[1].keys():
|
||||
for guid, settings in deleted_gpo_list:
|
||||
self.gp_db.set_guid(guid)
|
||||
for section in settings.keys():
|
||||
if section == str(self):
|
||||
for att, value in gpo[1][section].items():
|
||||
for att, value in settings[section].items():
|
||||
update_samba, _ = self.mapper().get(att)
|
||||
update_samba(att, value)
|
||||
self.gp_db.delete(section, att)
|
||||
|
@ -40,10 +40,10 @@ class gp_sudoers_ext(gp_pol_ext):
|
||||
|
||||
def process_group_policy(self, deleted_gpo_list, changed_gpo_list,
|
||||
sdir='/etc/sudoers.d'):
|
||||
for gpo in deleted_gpo_list:
|
||||
self.gp_db.set_guid(gpo[0])
|
||||
if str(self) in gpo[1]:
|
||||
for attribute, sudoers in gpo[1][str(self)].items():
|
||||
for guid, settings in deleted_gpo_list:
|
||||
self.gp_db.set_guid(guid)
|
||||
if str(self) in settings:
|
||||
for attribute, sudoers in settings[str(self)].items():
|
||||
os.unlink(sudoers)
|
||||
self.gp_db.delete(str(self), attribute)
|
||||
self.gp_db.commit()
|
||||
|
Reference in New Issue
Block a user