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

s4:provision Move helper functions back to provision

(These will be added back in a future commit)
This commit is contained in:
Andrew Bartlett
2009-08-13 16:59:49 +10:00
parent a58b4f8cc2
commit 7a9030b7ce

View File

@ -53,27 +53,6 @@ class SamDB(samba.Ldb):
def connect(self, url):
super(SamDB, self).connect(self.lp.private_path(url))
def add_foreign(self, domaindn, sid, desc):
"""Add a foreign security principle."""
add = """
dn: CN=%s,CN=ForeignSecurityPrincipals,%s
objectClass: top
objectClass: foreignSecurityPrincipal
description: %s
""" % (sid, domaindn, desc)
# deliberately ignore errors from this, as the records may
# already exist
for msg in self.parse_ldif(add):
self.add(msg[1])
def add_stock_foreign_sids(self):
domaindn = self.domain_dn()
self.add_foreign(domaindn, "S-1-5-7", "Anonymous")
self.add_foreign(domaindn, "S-1-1-0", "World")
self.add_foreign(domaindn, "S-1-5-2", "Network")
self.add_foreign(domaindn, "S-1-5-18", "System")
self.add_foreign(domaindn, "S-1-5-11", "Authenticated Users")
def enable_account(self, user_dn):
"""Enable an account.