[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Sun Feb 19 16:50:03 MST 2012


The branch, master has been updated
       via  b596b9c s4-selftest: Avoid running kinit for each new connection
      from  7af3dfd s3: Remove a pointless else branch

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


- Log -----------------------------------------------------------------
commit b596b9c045cdce59a54cd688d26f1b55949ce5ad
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun Feb 19 21:24:59 2012 +1100

    s4-selftest: Avoid running kinit for each new connection
    
    Kerberos is efficient when the credentials cache is set up once and
    then reused.
    
    Sadly this test creates a user, does a test and deletes the user, over
    and over.
    
    For this, using NTLM saves a little time, but we also stress the rest
    of the DB, and should rework the test.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Mon Feb 20 00:49:56 CET 2012 on sn-devel-104

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

Summary of changes:
 source4/dsdb/tests/python/acl.py            |    3 ++-
 source4/dsdb/tests/python/dirsync.py        |    3 ++-
 source4/dsdb/tests/python/sec_descriptor.py |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index 238889a..a624614 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -26,7 +26,7 @@ from samba.dcerpc import security, drsuapi, misc
 from samba.auth import system_session
 from samba import gensec, sd_utils
 from samba.samdb import SamDB
-from samba.credentials import Credentials
+from samba.credentials import Credentials, DONT_USE_KERBEROS
 import samba.tests
 from samba.tests import delete_force
 from subunit.run import SubunitTestRunner
@@ -94,6 +94,7 @@ class AclTests(samba.tests.TestCase):
         creds_tmp.set_workstation(creds.get_workstation())
         creds_tmp.set_gensec_features(creds_tmp.get_gensec_features()
                                       | gensec.FEATURE_SEAL)
+        creds_tmp.set_kerberos_state(DONT_USE_KERBEROS) # kinit is too expensive to use in a tight loop
         ldb_target = SamDB(url=ldaphost, credentials=creds_tmp, lp=lp)
         return ldb_target
 
diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index 64b847f..c8027fc 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -37,7 +37,7 @@ from samba.ndr import ndr_unpack, ndr_pack
 from samba.auth import system_session
 from samba import gensec, sd_utils
 from samba.samdb import SamDB
-from samba.credentials import Credentials
+from samba.credentials import Credentials, DONT_USE_KERBEROS
 import samba.tests
 from samba.tests import delete_force
 from subunit.run import SubunitTestRunner
@@ -98,6 +98,7 @@ class DirsyncBaseTests(samba.tests.TestCase):
         creds_tmp.set_workstation(creds.get_workstation())
         creds_tmp.set_gensec_features(creds_tmp.get_gensec_features()
                                       | gensec.FEATURE_SEAL)
+        creds_tmp.set_kerberos_state(DONT_USE_KERBEROS) # kinit is too expensive to use in a tight loop
         ldb_target = SamDB(url=ldaphost, credentials=creds_tmp, lp=lp)
         return ldb_target
 
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index b3e6207..80212a1 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -24,7 +24,7 @@ from samba.dcerpc import security
 
 from samba import gensec, sd_utils
 from samba.samdb import SamDB
-from samba.credentials import Credentials
+from samba.credentials import Credentials, DONT_USE_KERBEROS
 from samba.auth import system_session
 from samba.dsdb import DS_DOMAIN_FUNCTION_2008
 from samba.dcerpc.security import (
@@ -136,6 +136,7 @@ showInAdvancedViewOnly: TRUE
         creds_tmp.set_workstation(creds.get_workstation())
         creds_tmp.set_gensec_features(creds_tmp.get_gensec_features()
                                       | gensec.FEATURE_SEAL)
+        creds_tmp.set_kerberos_state(DONT_USE_KERBEROS) # kinit is too expensive to use in a tight loop
         ldb_target = SamDB(url=host, credentials=creds_tmp, lp=lp)
         return ldb_target
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list