[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Tue Oct 19 04:04:02 MDT 2010


The branch, master has been updated
       via  a9b58f6 s4:samdb.py - remove a pointless comment
       via  8c4f6bc s4:samdb.py - use a more standard way to get to the domain realm/dns name
       via  87fd2fd Addition of userPrincipalName attribute when new account is created
      from  73d6bb7 s4-gensec Don't give more to sasl_encode() than it will permit

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a9b58f6246f9098ec42e0b162e5fb97e50dbd32a
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Tue Oct 19 10:57:12 2010 +0200

    s4:samdb.py - remove a pointless comment
    
    We are only looking for the default DN - but the method name already tells
    us this.
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Tue Oct 19 10:03:12 UTC 2010 on sn-devel-104

commit 8c4f6bcd672d7c4e85f28865ee7602554a187baf
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Tue Oct 19 10:56:07 2010 +0200

    s4:samdb.py - use a more standard way to get to the domain realm/dns name
    
    We do always use the canonical name as a base if we don't have it around yet.

commit 87fd2fd1574d4cb52aef216e632e9899a01b2940
Author: Lukasz Zalewski <lukas at eecs.qmul.ac.uk>
Date:   Sat Oct 16 19:51:09 2010 +0100

    Addition of userPrincipalName attribute when new account is created

-----------------------------------------------------------------------

Summary of changes:
 source4/scripting/python/samba/samdb.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
index a40d10d..c435b7a 100644
--- a/source4/scripting/python/samba/samdb.py
+++ b/source4/scripting/python/samba/samdb.py
@@ -68,7 +68,6 @@ class SamDB(samba.Ldb):
         return dsdb._am_rodc(self)
 
     def domain_dn(self):
-        # find the DNs for the domain
         res = self.search(base="",
                           scope=ldb.SCOPE_BASE,
                           expression="(defaultNamingContext=*)",
@@ -274,10 +273,13 @@ member: %s
 
         user_dn = "CN=%s,%s,%s" % (cn, (userou or "CN=Users"), self.domain_dn())
 
+        dnsdomain = ldb.Dn(self, self.domain_dn()).canonical_str().replace("/", "")
+        user_principal_name = "%s@%s" % (username, dnsdomain)
         # The new user record. Note the reliance on the SAMLDB module which
         # fills in the default informations
         ldbmessage = {"dn": user_dn,
                       "sAMAccountName": username,
+                      "userPrincipalName": user_principal_name,
                       "objectClass": "user"}
 
         if surname is not None:


-- 
Samba Shared Repository


More information about the samba-cvs mailing list