summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-11-24 17:17:15 +0200
committerNadezhda Ivanova <nivanova@samba.org>2010-11-24 16:54:18 +0100
commitc89ecfc2adee20d8f77af45fe2a45985be0fe3ae (patch)
treed0f38e9f3e8f73e47f746aa2275b94ab40e7dc81 /source4/scripting
parent650c96725e5648397a15c806ca28c5733b749968 (diff)
downloadsamba-c89ecfc2adee20d8f77af45fe2a45985be0fe3ae.tar.gz
samba-c89ecfc2adee20d8f77af45fe2a45985be0fe3ae.tar.bz2
samba-c89ecfc2adee20d8f77af45fe2a45985be0fe3ae.zip
s4-dsdb: Extended samdb.newgroup to set the group's security descriptor.
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/samdb.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index 668c6003d6..a59494f953 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -113,7 +113,7 @@ pwdLastSet: 0
self.modify_ldif(mod)
def newgroup(self, groupname, groupou=None, grouptype=None,
- description=None, mailaddress=None, notes=None):
+ description=None, mailaddress=None, notes=None, sd=None):
"""Adds a new group with additional parameters
:param groupname: Name of the new group
@@ -121,6 +121,7 @@ pwdLastSet: 0
:param description: Description of the new group
:param mailaddress: Email address of the new group
:param notes: Notes of the new group
+ :param sd: security descriptor of the object
"""
group_dn = "CN=%s,%s,%s" % (groupname, (groupou or "CN=Users"), self.domain_dn())
@@ -143,6 +144,9 @@ pwdLastSet: 0
if notes is not None:
ldbmessage["info"] = notes
+ if sd is not None:
+ ldbmessage["nTSecurityDescriptor"] = ndr_pack(sd)
+
self.add(ldbmessage)
def deletegroup(self, groupname):