1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-14 12:59:07 +03:00

s4-dsdb: Extended samdb.newgroup to set the group's security descriptor.

This commit is contained in:
Nadezhda Ivanova
2010-11-24 17:17:15 +02:00
parent 650c96725e
commit c89ecfc2ad

View File

@ -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):