diff options
author | David Mulder <dmulder@suse.com> | 2020-08-19 11:27:26 -0600 |
---|---|---|
committer | David Mulder <dmulder@samba.org> | 2020-08-27 17:19:48 +0000 |
commit | 811e2f55290dc1af2439954f690b8b3c3749b607 (patch) | |
tree | 581897d0d44a5100dc223761e01275d9f2c7a0d5 | |
parent | 2ef88466f49d9c50f37b6e68e08fcda136050ec1 (diff) | |
download | samba-811e2f55290dc1af2439954f690b8b3c3749b607.tar.gz |
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
-rw-r--r-- | python/samba/gp_msgs_ext.py | 15 | ||||
-rw-r--r-- | selftest/knownfail.d/gpo | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/python/samba/gp_msgs_ext.py b/python/samba/gp_msgs_ext.py index 5d8064072c2..9366cd82685 100644 --- a/python/samba/gp_msgs_ext.py +++ b/python/samba/gp_msgs_ext.py @@ -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 diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo deleted file mode 100644 index b1c8285117f..00000000000 --- a/selftest/knownfail.d/gpo +++ /dev/null @@ -1 +0,0 @@ -samba.tests.gpo.samba.tests.gpo.GPOTests.test_rsop |