From 0cee9b01d9fbea94868a104d7140463923a3b95e Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 8 Dec 2011 15:41:55 +1100 Subject: samba-tool: Fix DN for GPO entries --- source4/scripting/python/samba/netcmd/gpo.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/netcmd/gpo.py b/source4/scripting/python/samba/netcmd/gpo.py index 1a0086c322..ede28ccb83 100644 --- a/source4/scripting/python/samba/netcmd/gpo.py +++ b/source4/scripting/python/samba/netcmd/gpo.py @@ -873,11 +873,8 @@ class cmd_create(Command): raise CommandError("Error adding GPO in AD", e) # Add cn=User,cn= - child_dn = gpo_dn - child_dn.add_child(ldb.Dn(self.samdb, "CN=User")) - m = ldb.Message() - m.dn = ldb.Dn(self.samdb, child_dn.get_linearized()) + m.dn = ldb.Dn(self.samdb, "CN=User,%s" % str(gpo_dn)) m['a01'] = ldb.MessageElement("container", ldb.FLAG_MOD_ADD, "objectClass") m['a02'] = ldb.MessageElement("TRUE", ldb.FLAG_MOD_ADD, "showInAdvancedViewOnly") try: @@ -886,11 +883,8 @@ class cmd_create(Command): raise CommandError("Error adding GPO in AD", e) # Add cn=Machine,cn= - child_dn = gpo_dn - child_dn.add_child(ldb.Dn(self.samdb, "CN=Machine")) - m = ldb.Message() - m.dn = ldb.Dn(self.samdb, child_dn.get_linearized()) + m.dn = ldb.Dn(self.samdb, "CN=Machine,%s" % str(gpo_dn)) m['a01'] = ldb.MessageElement("container", ldb.FLAG_MOD_ADD, "objectClass") m['a02'] = ldb.MessageElement("TRUE", ldb.FLAG_MOD_ADD, "showInAdvancedViewOnly") try: -- cgit