summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/samdb.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-11-28 14:09:30 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-11-28 17:23:28 +0100
commiteb5a8e29cf362ea382da7bb9dd8c9eb175b9ebe3 (patch)
tree783d797c3203634dae90a9b6f67409c766488e76 /source4/scripting/python/samba/samdb.py
parent20516df27574ad999073b7eb9620e70833e3170d (diff)
downloadsamba-eb5a8e29cf362ea382da7bb9dd8c9eb175b9ebe3.tar.gz
samba-eb5a8e29cf362ea382da7bb9dd8c9eb175b9ebe3.tar.bz2
samba-eb5a8e29cf362ea382da7bb9dd8c9eb175b9ebe3.zip
s4-python: Some reformatting for the purpose of pydoctor.
Diffstat (limited to 'source4/scripting/python/samba/samdb.py')
-rw-r--r--source4/scripting/python/samba/samdb.py31
1 files changed, 18 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index a86302a514..43b1938a0e 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -83,10 +83,12 @@ class SamDB(samba.Ldb):
user_dn = res[0].dn
userAccountControl = int(res[0]["userAccountControl"][0])
- if (userAccountControl & 0x2):
- userAccountControl = userAccountControl & ~0x2 # remove disabled bit
- if (userAccountControl & 0x20):
- userAccountControl = userAccountControl & ~0x20 # remove 'no password required' bit
+ if userAccountControl & 0x2:
+ # remove disabled bit
+ userAccountControl = userAccountControl & ~0x2
+ if userAccountControl & 0x20:
+ # remove 'no password required' bit
+ userAccountControl = userAccountControl & ~0x20
mod = """
dn: %s
@@ -179,7 +181,8 @@ pwdLastSet: 0
:param groupname: Name of the target group
:param listofmembers: Comma-separated list of group members
- :param add_members_operation: Defines if its an add or remove operation
+ :param add_members_operation: Defines if its an add or remove
+ operation
"""
groupfilter = "(&(sAMAccountName=%s)(objectCategory=%s,%s))" % (groupname, "CN=Group,CN=Schema,CN=Configuration", self.domain_dn())
@@ -444,6 +447,9 @@ accountExpires: %u
"""Read the domain SID used by this LDB. """
return dsdb._samdb_get_domain_sid(self)
+ domain_sid = property(get_domain_sid, set_domain_sid,
+ "SID for the domain")
+
def set_invocation_id(self, invocation_id):
"""Set the invocation id for this SamDB handle.
@@ -451,6 +457,13 @@ accountExpires: %u
"""
dsdb._dsdb_set_ntds_invocation_id(self, invocation_id)
+ def get_invocation_id(self):
+ """Get the invocation_id id"""
+ return dsdb._samdb_ntds_invocation_id(self)
+
+ invocation_id = property(get_invocation_id, set_invocation_id,
+ "Invocation ID GUID")
+
def get_oid_from_attid(self, attid):
return dsdb._dsdb_get_oid_from_attid(self, attid)
@@ -459,10 +472,6 @@ accountExpires: %u
return dsdb._dsdb_get_attid_from_lDAPDisplayName(self,
ldap_display_name, is_schema_nc)
- def get_invocation_id(self):
- """Get the invocation_id id"""
- return dsdb._samdb_ntds_invocation_id(self)
-
def set_ntds_settings_dn(self, ntds_settings_dn):
"""Set the NTDS Settings DN, as would be returned on the dsServiceName
rootDSE attribute.
@@ -473,10 +482,6 @@ accountExpires: %u
"""
dsdb._samdb_set_ntds_settings_dn(self, ntds_settings_dn)
- invocation_id = property(get_invocation_id, set_invocation_id)
-
- domain_sid = property(get_domain_sid, set_domain_sid)
-
def get_ntds_GUID(self):
"""Get the NTDS objectGUID"""
return dsdb._samdb_ntds_objectGUID(self)