[SCM] Samba Shared Repository - branch master updated
Anatoliy Atanasov
anatoliy at samba.org
Thu Nov 18 09:17:02 MST 2010
The branch, master has been updated
via b388951 s4/ldap: ldap_syntaxes.py cleanup
from 92e8fd0 s3: Call sid_check_is_domain instead of dom_sid_equal
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b388951eea2bb8f609e3a5eae5092e4c0fefc30b
Author: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
Date: Thu Nov 18 17:11:55 2010 +0200
s4/ldap: ldap_syntaxes.py cleanup
Autobuild-User: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
Autobuild-Date: Thu Nov 18 16:16:27 UTC 2010 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/tests/python/ldap_syntaxes.py | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/tests/python/ldap_syntaxes.py b/source4/dsdb/tests/python/ldap_syntaxes.py
index abec467..f5d2dcb 100644
--- a/source4/dsdb/tests/python/ldap_syntaxes.py
+++ b/source4/dsdb/tests/python/ldap_syntaxes.py
@@ -19,13 +19,9 @@ import samba.getopt as options
from samba.auth import system_session
from ldb import SCOPE_ONELEVEL, SCOPE_BASE, SCOPE_SUBTREE, LdbError
from ldb import ERR_NO_SUCH_OBJECT
-from ldb import ERR_UNWILLING_TO_PERFORM
from ldb import ERR_CONSTRAINT_VIOLATION
from ldb import ERR_INVALID_ATTRIBUTE_SYNTAX
from ldb import ERR_ENTRY_ALREADY_EXISTS
-from ldb import Message, MessageElement, Dn
-from ldb import FLAG_MOD_REPLACE
-from samba import Ldb
from samba.ndr import ndr_pack, ndr_unpack
from samba.dcerpc import security
@@ -33,6 +29,8 @@ from samba.dcerpc import security
from subunit.run import SubunitTestRunner
import unittest
+import samba.tests
+
parser = optparse.OptionParser("ldap [options] <host>")
sambaopts = options.SambaOptions(parser)
parser.add_option_group(sambaopts)
@@ -399,19 +397,7 @@ name: """ + object_name + """
self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
pass
-if not "://" in host:
- if os.path.isfile(host):
- host = "tdb://%s" % host
- else:
- host = "ldap://%s" % host
-
-ldb_options = []
-if host.startswith("ldap://"):
- # user 'paged_search' module when connecting remotely
- ldb_options = ["modules:paged_searches"]
-
-ldb = Ldb(host, credentials=creds, session_info=system_session(), lp=lp, options=ldb_options)
-
+ldb = samba.tests.connect_samdb(host, credentials=creds, session_info=system_session(), lp=lp)
runner = SubunitTestRunner()
rc = 0
if not runner.run(unittest.makeSuite(SyntaxTests)).wasSuccessful():
--
Samba Shared Repository
More information about the samba-cvs
mailing list