1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-30 17:49:30 +03:00

gpo: Test Group Policy User Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
David Mulder
2021-07-20 11:13:21 -06:00
committed by Jeremy Allison
parent cd63893d4e
commit f04431b1d2
5 changed files with 106 additions and 4 deletions

View File

@ -73,9 +73,9 @@ class gp_scripts_ext(gp_pol_ext):
self.gp_db.store(str(self), attribute, f.name)
self.gp_db.commit()
def rsop(self, gpo):
def rsop(self, gpo, target='MACHINE'):
output = {}
pol_file = 'MACHINE/Registry.pol'
pol_file = '%s/Registry.pol' % target
if gpo.file_sys_path:
path = os.path.join(gpo.file_sys_path, pol_file)
pol_conf = self.parse(path)
@ -88,3 +88,10 @@ class gp_scripts_ext(gp_pol_ext):
output[key] = []
output[key].append(e.data)
return output
class gp_user_scripts_ext(gp_scripts_ext):
def process_group_policy(self, deleted_gpo_list, changed_gpo_list):
pass
def rsop(self, gpo):
return super().rsop(gpo, target='USER')