summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-12-08 15:41:55 +1100
committerAmitay Isaacs <amitay@gmail.com>2011-12-14 15:57:32 +1100
commit0cee9b01d9fbea94868a104d7140463923a3b95e (patch)
tree8f25a310076816bd7528858b254c82651ac65a06 /source4/scripting/python
parent8b94a34bacc349d6354a6bfd17cda1a2dd248fee (diff)
downloadsamba-0cee9b01d9fbea94868a104d7140463923a3b95e.tar.gz
samba-0cee9b01d9fbea94868a104d7140463923a3b95e.tar.bz2
samba-0cee9b01d9fbea94868a104d7140463923a3b95e.zip
samba-tool: Fix DN for GPO entries
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/gpo.py10
1 files changed, 2 insertions, 8 deletions
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=<guid>
- 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=<guid>
- 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: