[PATCH 09/18] gpo: re-enable version check in gpoupdate
David Mulder
dmulder at suse.com
Thu Feb 23 20:22:01 UTC 2017
From: Garming Sam <garming at catalyst.net.nz>
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
---
source4/scripting/bin/samba_gpoupdate | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/source4/scripting/bin/samba_gpoupdate b/source4/scripting/bin/samba_gpoupdate
index 772c071..bf81496 100755
--- a/source4/scripting/bin/samba_gpoupdate
+++ b/source4/scripting/bin/samba_gpoupdate
@@ -116,7 +116,7 @@ for guid_eval in hierarchy_gpos.sorted_full:
guid = guid_eval[0]
gp_extensions = [gp_sec_ext()]
local_path = path + '/' + guid + '/'
- version = gpo.gpo_get_sysvol_gpt_version(local_path)[1]
+ version = gpo.gpo_get_sysvol_gpt_version(lp.get("path", "sysvol") + '/' + local_path)[1]
gpolist = gp_path_list(local_path)
print local_path
@@ -124,9 +124,8 @@ for guid_eval in hierarchy_gpos.sorted_full:
'''If an important GPO parse it. Will not parse if it has not changed, is empty, or is not in the right container'''
if guid_eval[1]:
if gpolist[0][1]:
- #print version, previous_scanned_version.get(guid)
- #if (version != previous_scanned_version.get(guid)) and (version != 0):
- # print ('GPO %s has changed' % guid)
- gpo_parser(gpolist, test_ldb, conn)
+ if (version != previous_scanned_version.get(guid)) and (version != 0):
+ print ('GPO %s has changed' % guid)
+ gpo_parser(gpolist, test_ldb, conn)
sys_log.write('%s %i\n' % (guid,version))
--
2.10.2
More information about the samba-technical
mailing list