"dn": self.ou,
"objectclass": "organizationalUnit"})
- # Add the following OU hierarchy and set otherWellKnownObjects,
- # which has BinaryDN syntax:
- #
- # o1
- # |--> o2
- # | |--> o3
- # | | |-->o4
-
- self.ldb.add({
- "dn": "OU=o1,%s" % self.ou,
+ # Add the following OU hierarchy and set otherWellKnownObjects,
+ # which has BinaryDN syntax:
+ #
+ # o1
+ # |--> o2
+ # | |--> o3
+ # | | |-->o4
+
+ self.ldb.add({
+ "dn": "OU=o1,%s" % self.ou,
"objectclass": "organizationalUnit"})
- self.ldb.add({
- "dn": "OU=o2,OU=o1,%s" % self.ou,
+ self.ldb.add({
+ "dn": "OU=o2,OU=o1,%s" % self.ou,
"objectclass": "organizationalUnit"})
- self.ldb.add({
- "dn": "OU=o3,OU=o2,OU=o1,%s" % self.ou,
+ self.ldb.add({
+ "dn": "OU=o3,OU=o2,OU=o1,%s" % self.ou,
"objectclass": "organizationalUnit"})
- self.ldb.add({
- "dn": "OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou,
+ self.ldb.add({
+ "dn": "OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou,
"objectclass": "organizationalUnit"})
m = Message()
FLAG_MOD_ADD, "otherWellKnownObjects")
self.ldb.modify(m)
- # Create OU for users and groups
+ # Create OU for users and groups
self.ldb.add({
"dn": self.ou_users,
"objectclass": "organizationalUnit"})
self.assertEqual(len(res1), 0)
def test_subtree(self):
- res1 = self.ldb.search(self.ou,
- scope=SCOPE_SUBTREE,
- expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
- self.assertEqual(len(res1), 1)
- self.assertEqual(str(res1[0].dn).lower(), ("OU=o3,OU=o2,OU=o1,%s" % self.ou).lower())
-
- res1 = self.ldb.search(self.ou,
- scope=SCOPE_ONELEVEL,
- expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
- self.assertEqual(len(res1), 0)
-
- res1 = self.ldb.search(self.ou,
- scope=SCOPE_SUBTREE,
- expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
- self.assertEqual(len(res1), 0)
-
- res1 = self.ldb.search(self.ou,
- scope=SCOPE_ONELEVEL,
- expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
- self.assertEqual(len(res1), 0)
+ res1 = self.ldb.search(self.ou,
+ scope=SCOPE_SUBTREE,
+ expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+ self.assertEqual(len(res1), 1)
+ self.assertEqual(str(res1[0].dn).lower(), ("OU=o3,OU=o2,OU=o1,%s" % self.ou).lower())
+
+ res1 = self.ldb.search(self.ou,
+ scope=SCOPE_ONELEVEL,
+ expression="otherWellKnownObjects=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+ self.assertEqual(len(res1), 0)
+
+ res1 = self.ldb.search(self.ou,
+ scope=SCOPE_SUBTREE,
+ expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+ self.assertEqual(len(res1), 0)
+
+ res1 = self.ldb.search(self.ou,
+ scope=SCOPE_ONELEVEL,
+ expression="otherWellKnownObjects:1.2.840.113556.1.4.1941:=B:32:00000000000000000000000000000004:OU=o4,OU=o3,OU=o2,OU=o1,%s" % self.ou)
+ self.assertEqual(len(res1), 0)
def test_unknown_oid(self):
res1 = self.ldb.search("cn=g4,%s" % self.ou_groups,
default_unix_charset=charset
break
- # At this point, we have a libiconv candidate. We know that
- # we have the right headers and libraries, but we don't know
- # whether it does the conversions we want. We can't test this
- # because we are cross-compiling. This is not necessarily a big
- # deal, since we can't guarantee that the results we get now will
- # match the results we get at runtime anyway.
- if crossbuild:
- default_dos_charset="CP850"
- default_unix_charset="UTF-8"
+ # At this point, we have a libiconv candidate. We know that
+ # we have the right headers and libraries, but we don't know
+ # whether it does the conversions we want. We can't test this
+ # because we are cross-compiling. This is not necessarily a big
+ # deal, since we can't guarantee that the results we get now will
+ # match the results we get at runtime anyway.
+ if crossbuild:
+ default_dos_charset="CP850"
+ default_unix_charset="UTF-8"
# TODO: this used to warn about the set charset on cross builds
if default_dos_charset is False or default_unix_charset is False:
"$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration])
plantestsuite("samba3.blackbox.rpcclient_samlogon", "ad_member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
- "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
+ "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration])
plantestsuite("samba3.blackbox.sharesec", "simpleserver:local",
[os.path.join(samba3srcdir, "script/tests/test_sharesec.sh"),
configuration, os.path.join(bindir(), "sharesec"), "tmp"])
planoldpythontestsuite("rodc:local", "replica_sync_rodc",
extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
- name="samba4.drs.replica_sync_rodc.python(rodc)",
- environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ name="samba4.drs.replica_sync_rodc.python(rodc)",
+ environ={'DC1': '$DC_SERVER', 'DC2': '$RODC_DC_SERVER'},
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
planoldpythontestsuite("ad_dc_ntvfs", "password_settings",
extra_path=[os.path.join(samba4srcdir, 'dsdb/tests/python')],
planpythontestsuite("rodc:local", "samba.tests.samba_tool.rodc")
plantestsuite("samba.blackbox.rpcclient_samlogon", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
- "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+ "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
plantestsuite("samba.blackbox.rpcclient_samlogon_testallowed", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
- "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+ "testallowed\ account", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
plantestsuite("samba.blackbox.rpcclient_samlogon_testdenied", "rodc:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"),
- "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
+ "testdenied", "$DC_PASSWORD", "ncacn_np:$SERVER", configuration])
environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
planoldpythontestsuite(env, "link_conflicts",
- extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
- name="samba4.drs.link_conflicts.python(%s)" % env,
- environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
+ name="samba4.drs.link_conflicts.python(%s)" % env,
+ environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
for env in ['vampire_dc', 'promoted_dc', 'vampire_2000_dc']:
planoldpythontestsuite(env, "repl_schema",
# down) the other DRS tests
for env in ['vampire_dc', 'promoted_dc']:
planoldpythontestsuite(env, "getncchanges",
- extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
- name="samba4.drs.getncchanges.python(%s)" % env,
- environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
- extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
+ extra_path=[os.path.join(samba4srcdir, 'torture/drs/python')],
+ name="samba4.drs.getncchanges.python(%s)" % env,
+ environ={'DC1': "$DC_SERVER", 'DC2': '$%s_SERVER' % env.upper()},
+ extra_args=['-U$DOMAIN/$DC_USERNAME%$DC_PASSWORD'])
for env in ['ad_dc_ntvfs']:
planoldpythontestsuite(env, "repl_rodc",
def test_do_single_repl(self):
"""
- Make sure that DRSUAPI_EXOP_REPL_OBJ never replicates more than
+ Make sure that DRSUAPI_EXOP_REPL_OBJ never replicates more than
one object, even when we use DRS_GET_ANC/GET_TGT.
"""