1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00

gpo: Add RSOP output for Security Extension

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
David Mulder
2020-07-06 11:16:14 -06:00
committed by David Mulder
parent 5361f25800
commit 1f63103041

View File

@ -204,3 +204,19 @@ class gp_sec_ext(gp_inf_ext):
self.creds, att, value).update_samba()
self.gp_db.commit()
def rsop(self, gpo):
output = {}
inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf'
apply_map = self.apply_map()
if gpo.file_sys_path:
path = os.path.join(gpo.file_sys_path, inf_file)
inf_conf = self.parse(path)
if not inf_conf:
return output
for section in inf_conf.sections():
current_section = apply_map.get(section)
if not current_section:
continue
output[section] = {k: v for k, v in inf_conf.items(section) \
if current_section.get(k)}
return output