mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
GPO: Add rsop output for Messages policy
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): David Mulder <dmulder@samba.org> Autobuild-Date(master): Thu Aug 27 17:19:48 UTC 2020 on sn-devel-184
This commit is contained in:
committed by
David Mulder
parent
2ef88466f4
commit
811e2f5529
@ -66,3 +66,18 @@ class gp_msgs_ext(gp_pol_ext):
|
||||
w.write(e.data)
|
||||
self.gp_db.store(str(self), e.valuename, old_val)
|
||||
self.gp_db.commit()
|
||||
|
||||
def rsop(self, gpo):
|
||||
output = {}
|
||||
if gpo.file_sys_path:
|
||||
section_name = 'Software\\Policies\\Samba\\Unix Settings\\Messages'
|
||||
pol_file = 'MACHINE/Registry.pol'
|
||||
path = os.path.join(gpo.file_sys_path, pol_file)
|
||||
pol_conf = self.parse(path)
|
||||
if not pol_conf:
|
||||
return output
|
||||
for e in pol_conf.entries:
|
||||
if e.keyname == section_name and e.data.strip():
|
||||
mfile = os.path.join('/etc', e.valuename)
|
||||
output[mfile] = e.data
|
||||
return output
|
||||
|
Reference in New Issue
Block a user