1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

452 Commits

Author SHA1 Message Date
Andrew Bartlett
c79c1e405d dbcheck: Check for and remove duplicate values in attributes
This can happen with three DCs and custom schema, but we test
it by just forcing the values directly into the backing tdb.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:30 +01:00
Andrew Bartlett
5fb98a3534 dbcheck: Fix incorrect/duplicate attrid in replPropertMetaData
If custom schema is used in a replicated DC environment, these are created as soon as
an attribute is modified on more than one DC.  We have to remove these.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11443
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:28 +01:00
Christof Schmitt
4164111f55 testprogs/blackbox/subunit: Fix testok
The fail count is always in the second parameter. Omit the shift
operations, so that the value can be read correctly from $2.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 20 03:58:01 CET 2016 on sn-devel-144
2016-02-20 03:58:01 +01:00
Andreas Schneider
30419f2966 tests: Rename heimdal blackbox tests
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2016-01-22 11:07:31 +01:00
Uri Simchoni
3e1b26bd6d selftest: more dfree command and smbclient disk usage tests
Add tests that cover disk usage printing by smbclient, as well
as passing directory info to the "dfree command" script.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11662

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  6 03:58:59 CET 2016 on sn-devel-144
2016-01-06 03:58:59 +01:00
Garming Sam
576b92abc3 pdb: add a blackbox test for setting password with hash
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-11-30 03:49:25 +01:00
Andreas Schneider
c474173a83 tests: Add tests for net ads (join|leave)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Nov  4 15:35:57 CET 2015 on sn-devel-104
2015-11-04 15:35:56 +01:00
Andrew Bartlett
0d962e010e selftest: Confirm a demote of a real network works
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Oct 26 08:17:47 CET 2015 on sn-devel-104
2015-10-26 08:17:47 +01:00
Andrew Bartlett
dcc657a221 selftest: Add assertion that we actually fix the replPropertyMetaData sort order
This ensures that the dbcheck rule fixes the sort order (and only fixes the sort order).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 25 02:45:58 CEST 2015 on sn-devel-104
2015-08-25 02:45:58 +02:00
Andrew Bartlett
06f378fa65 lib/tls: Change default supported TLS versions.
The new default is to disable SSLv3, as this is no longer considered
secure after CVE-2014-3566.  Newer GnuTLS versions already disable SSLv3.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
2015-07-20 03:08:26 +02:00
Andreas Schneider
1f90bb6049 selftest: Add test for the dfree command
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 17 22:09:34 CEST 2015 on sn-devel-104
2015-07-17 22:09:33 +02:00
Stefan Metzmacher
80be365e62 testprogs/blackbox: add test_trust_utils.sh
This tests 'samba-tool domain trust *' commands.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-07-08 18:38:22 +02:00
Stefan Metzmacher
03fc85e39b testprogs/blackbox: let test_kinit_trusts.sh verify that setpassword (via LDAP) is rejected
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-07-08 18:38:22 +02:00
Stefan Metzmacher
b2ad31ac0d testprogs/blackbox: let test_kinit_trusts.sh test a enterprise upn from the other foreset
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-07-08 18:38:22 +02:00
Stefan Metzmacher
7ee4f23821 testprogs/blackbox: add test_kinit_trusts.sh
That verifies kinit and smbclient work across trusts.

It also tests a trust password change and a following
access.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-07-08 18:38:22 +02:00
Michael Adam
64738c3206 selftest: make blackbox.pkinit test independent of test environment.
This lets the test not clutter the main selftest prefix directory
with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
32206b045b selftest: make blackbox.ktpass test independent of test environment.
This also prevents the test from cluttering the main
selftest prefix directory with temporary data.

Note: this test is currently skipped but it should
be adapted because of the environment renames anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
7293767a8b selftest: make blackbox.passwords test independent of test environment.
This also prevents the test from cluttering the main
selftest directort with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
0bcea51507 selftest:test_kinit: remove commented out line with outdated content.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Andrew Bartlett
6fe8cd2fdf selftest: Improve renamedcs test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-06 17:39:58 +01:00
Andrew Bartlett
fb250d1328 testprogs-test_chgdcpass.sh: Improve comments to explain why we check about changing the password twice
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-02-25 01:08:12 +01:00
Andrew Bartlett
e189e9ed4b selftest: Improve renamedc tests to confirm more than just the exit code
This now confirms that the DC has been renamed

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-02-25 01:08:12 +01:00
Andrew Bartlett
c1280569a9 sefltest: Add test for enterprise UPN in a different domain
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2015-01-23 05:42:08 +01:00
Garming Sam
64f5984273 test: improve kinit kerberos tests
For enterprise and windows style kinit, a UPN is now configured.

There are now additional smbclient calls and added cache removals
to make the tests more robust.

Change-Id: I7c58ae4c9f303ca74a52878aa5dce2cc5f7d6742
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2014-12-18 00:25:06 +01:00
Stefan Metzmacher
7e81fe2825 testprogs/test_ldb: check rootdse search with extended-dn control
Verifies BUG: https://bugzilla.samba.org/show_bug.cgi?id=10949

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Dec 12 20:15:46 CET 2014 on sn-devel-104
2014-12-12 20:15:46 +01:00
Andreas Schneider
9cde3aec48 testprogs: Set functional domain level to 2003.
The default changed to 2008r2 recently.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-12-05 23:32:06 +01:00
Andrew Bartlett
b9701a0a79 provision: Change the default functional level of new Samba domains to 2008R2.
Windows 2003 is going out of support shortly, and we want users to have AES by default

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-30 12:32:05 +02:00
Günther Deschner
c4e15e0f6d testprogs: use texpect instead of rkpty.
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2014-09-01 15:47:33 +02:00
Günther Deschner
a78a87ac53 testprogs: test kpasswd via "net ads password".
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2014-09-01 15:47:33 +02:00
Günther Deschner
fa39e025ff testprogs: use texpect in passwords test file instead of rkpty.
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2014-09-01 15:47:33 +02:00
Günther Deschner
af7613fa25 testprogs: allow to run passwords test with MIT and Heimdal kinit.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2014-09-01 15:47:33 +02:00
Andreas Schneider
7982c373b0 testprogs: Use the system binaries for KRB5 if we don't build in-tree heimdal.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2014-09-01 15:47:33 +02:00
Andrew Bartlett
9bfbff6543 dbcheck: Add check and test for various invalid userParameters values
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
Change-Id: I6f2f4169856ce78c62e3a7e74b48520cca9cb9ae
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-07-09 08:42:08 +02:00
Andrew Bartlett
c664859a12 selftest: Test auth_wbc, the auth4 winbind and winbind_wbclient modules using pdbtest
This ensures these authentication modules continue to operate correctly, and that the results are consistent.

Andrew Bartlett

Change-Id: I7f63cd93e55c6f73ceeafb14f1dc265291791803
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 16 12:50:44 CEST 2014 on sn-devel-104
2014-05-16 12:50:44 +02:00
Andrew Bartlett
66c099cc58 selftest: Run pdbtest under valgrind if specified
Change-Id: I21e169ba563551e13c46f07f86205625ad166c64
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-05-16 10:23:26 +02:00
Andrew Bartlett
7c2bf8d2bc selftest: Add tests for dbcheck detection and removal of partial objects
To avoid listing all the provision snapshots, we use a broader blacklist for waf dist
and a whitelist for dbcheck-oldrelease.sh

Andrew Bartlett

Change-Id: Iab0ff4be0b4287dc128a49302836a6f0f7b39678
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-05-03 07:57:13 +02:00
Andreas Schneider
363f76c305 testprogs: Fix tests calling smbpasswd.
smbpasswd has a check that it is root so make sure we start with
uid_wrapper being root!

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Andrew Bartlett
f596dc94e1 dbcheck: Ensure dbcheck can operate with --attrs set
This also includes a test to ensure we do not regress on this point.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-21 08:03:07 +01:00
Andreas Schneider
293aac0508 testprogs: Fix pkinit test with system ldb.
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Feb 21 17:58:24 CET 2014 on sn-devel-104
2014-02-21 17:58:24 +01:00
Andreas Schneider
069015bee9 testprogs: Fix kinit test with system ldb.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2014-02-21 15:59:28 +01:00
Andreas Schneider
e2b0d25b70 testprogs: Use system binary if we did not build ldbdel.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 18 12:45:41 CET 2014 on sn-devel-104
2014-02-18 12:45:41 +01:00
Andrew Bartlett
a3f25f2511 selftst: add tests based on 4.1.0rc3 to check for zero invocationID in replPropertyMetaData
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep 23 01:29:10 CEST 2013 on sn-devel-104
2013-09-23 01:29:10 +02:00
Andrew Bartlett
9c11ad25b2 selftest: Only run referenceprovision and ldapcmp for the 4.0.0 test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-22 14:39:50 -07:00
Andrew Bartlett
16b26eafa7 selftest: Add a basic test of samba_upgradedns
This does not check that the command runs correctly, but does at least check
that the command runs to completion without errors.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-04 07:08:16 +02:00
Andrew Bartlett
1589e46d11 selftest: Add tests for samba-tool dbcheck --reset-well-known-acls
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25 11:35:03 +01:00
Andrew Bartlett
b9b6375699 selftest: Remove output directories to save disk space
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:35:05 +01:00
Andrew Bartlett
787a6aacc3 samba_upgradeprovision: Remove auto-detection of pre-alpha9 databases
These are incredibly rare, and administrators running such databases
not only ask the Samba Team for help personally, they can read --help.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:33:04 +01:00
Andrew Bartlett
08f0562240 selftest: Run dbcheck and improved upgrdeprovision tests against release-4-0-0
The improved upgradeprovision tests now call ldapcmp to verify the
changes made do actually bring the database in line with a fresh
provision.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:32:25 +01:00
Andrew Bartlett
72f73ebaff selftest: Do an ldapcmp run against the upgraded domain
This checks (with a set of known issues marked in the --filter attribute) that the upgraded
domain matches a fresh provision.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:32:06 +01:00
Andrew Bartlett
0180a027cb subunit: Add a sh macro for skipping a test
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04 08:18:07 +01:00
Andrew Bartlett
0f8ef5a2c8 selftest: Add test of upgradeprovision using the old alpha13 tree
This ensures that upgradeprovision works as expected on a known good old database.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jan 27 11:55:54 CET 2013 on sn-devel-104
2013-01-27 11:55:54 +01:00
Andrew Bartlett
99d872ee92 s4-dbcheck: Allow forcing an override of an old @MODULES record
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 14:52:45 +01:00
Andrew Tridgell
dd60dcf343 test-chgdcpass: test the ldap case for server password change
use samba-tool drs options which does both RPC and LDAP connections

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Tridgell <tridge@samba.org>
Autobuild-Date(master): Thu Nov  1 07:21:17 CET 2012 on sn-devel-104
2012-11-01 07:21:17 +01:00
Andrew Tridgell
e48099516e test_chgdpass: use drs bind to test password change on RPC
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:40 +11:00
Andrew Tridgell
fce66b22ea test_chgdpass: added test for kerberos retry
this tests that we correctly retry with a new ccache entry when a
server changes its password while we have a valid ticket

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01 15:40:40 +11:00
Stefan Metzmacher
52ba3c8e6a testprogs/blackbox: make use of samba-tool domain provision
metze
2012-09-11 08:35:57 +02:00
Andrew Bartlett
3ad9c52b14 selftest: skip tests if the tarball did not include the alpha13 provision 2012-09-03 19:24:10 +10:00
Andrew Bartlett
2b404462f5 selftest: Pass --use-ntvfs to provison in renamedc test
Also fix test prefix to match the test

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
a29bf4acf5 selftest: run pdbtest against s3dc as well
This validates the password expiry, account disable in the s3 auth code
and the save/restore of values in tdbsam.

It also provides the first test of some net sam set subcommands.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 28 20:39:38 CEST 2012 on sn-devel-104
2012-06-28 20:39:38 +02:00
Andrew Bartlett
471a6b3992 s4-selftest: expand passdb testing
This tests pdb_samba4 in the first instance
2012-06-27 11:29:17 +02:00
Andrew Bartlett
207984464f s4-selftest: Test login with a password expired user
This uses rkpty to test changing an expired password.

Andrew Bartlett
2012-06-27 11:29:17 +02:00
Björn Jacke
94afad20b5 tests: make test_ldb portable, eliminate "local" keyword
this is BASH only, don't use it.
2012-06-27 00:19:19 +02:00
Andrew Bartlett
d1d36d2563 s4-selftest: Add tests for dbcheck on an old database that needs repair
We changed a lot since alpha13, so there are lots of legitimate errors to fix.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun 16 05:44:15 CEST 2012 on sn-devel-104
2012-06-16 05:44:15 +02:00
Michael Adam
72fbbdb9b3 s4:selftest: change the blackbox.passwords test to use a binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Michael Adam
e7281b450a s4:selftest: change the blackbox.pkinit test to use a binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Michael Adam
d86ae30bb8 s4:selftest: change the blackbox.kinit test to use a binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Michael Adam
104135faa9 s4:selftest: change the blackbox.export.keytab test to use a binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Michael Adam
00f5473de8 s4:selftest: change the blackbox.chgdcpass test to use a binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Michael Adam
da82c07e13 s4:selftets: change the blackbox.bogusdomain test to use binary mapping for smbclient 2012-05-31 04:46:06 +02:00
Andrew Bartlett
ca2b6259b7 s4-selftest: Demonstrate the correct behaviour between specified usernames and kerberos ccache
This shows that a username/password on the command line must always
override any credentials cache in the environment.

Andrew Bartlett
2012-05-24 16:21:26 +02:00
Alexander Bokovoy
dc3f74a953 auth/credentials: 'workgroup' set via command line will not drop existing ccache
The root cause for existing ccache being invalidated was use of global loadparm with
'workgroup' value set as if from command line. However, we don't really need to take
'workgroup' parameter value's nature into account when invalidating existing ccache.
When -U is used on the command line, one can specify a password to force ccache
invalidation.

The commit also reverts previous fix now that root cause is clear.
2012-05-24 16:21:26 +02:00
Andrew Bartlett
22cd4bcc9e s4-selftest: Always delete the user at the end of test_passwords.sh
If this test is run in the "dc" environment (rather than "dc:local") is would not delete the
test user.

Andrew Bartlett
2012-05-24 09:59:04 +02:00
Alexander Bokovoy
dcfb34fbb4 blackbox: fix samba4.blackbox.kinit test
This deserves some explanation.

With commit 518232d457 samba4.blackbox.kinit test set
was wrapped with password settings reset before and after the tests with an idea to
maintain reliable state for the tests. As result, the resetting of the password
settings was done after the test that tried to use smbclient with a Kerberos ticket
obtained with machine account credentials.

However, the code in credentials_krb5.c, function cli_credentials_get_client_gss_creds(),
never worked correctly when credentials were already in ccache. Instead, gensec_gssapi module
always re-kinited even if existing credentials were available in the ccache. This had an effect
on 'samba4.blackbox.kinit(dc:local).reset password policies(dc:local)' test equal to
never having initialized ccache at all, as if 'rm -f $KRB5CCNAME' was run before the test.

When the issue of not using already initialized credentials from ccache was fixed with
d0aae88f1290e6a7a6d4bfc24aa62795e4892a31 'auth-credentials: Support using pre-fetched ccache
when obtaining kerberos credentials' commit, Samba 4 credentials library started to correctly
re-used already obtained credentials from ccaches. This caused failure of the test
'samba4.blackbox.kinit(dc:local).reset password policies(dc:local)' because machine account
has no permissions to modify password settings.

Thus, the correct fix is to reset ccache state before performing the test.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Wed May 23 18:46:12 CEST 2012 on sn-devel-104
2012-05-23 18:46:12 +02:00
Andrew Bartlett
95976d4ec2 selftest: Rework samba4.blackbox.bogusdomain to use a temporary user
This avoids leaving an account in the test environment after the test is run
and therefore avoids issues with interations with other tests.

Also, we now use the local administrator account in the member server to
add the test account.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar  2 14:44:36 CET 2012 on sn-devel-104
2012-03-02 14:44:36 +01:00
Andrew Bartlett
eecf2ac4c8 selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
Matthieu Patou
7350d99409 s3: check that a user in a bogus domain name is mapped to the localnetbios name of a domain member
This means that if we authentify for BOGUS\administrator in AD domain
FOREST with samba being domain member with the netbiosname MEMBER then
BOGUS\administrator will be mapped to MEMBER\administrator if the
password match.
2012-01-30 08:23:11 -08:00
Andrew Bartlett
bbacd901cd selftest: Add test for smbpasswd against pdb_samba4
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jan 24 11:05:09 CET 2012 on sn-devel-104
2012-01-24 11:05:09 +01:00
Andrew Bartlett
2da506ee66 s4-selftest re-enable nsstest on libnss_winbind.so 2011-12-07 03:09:08 +01:00
Andrew Bartlett
2bff209128 s4-samba-tool: Add --principal argument to samba-tool domain exportkeytab
This allows only a particular principal to be exported to the keytab.
This is useful when setting up unix servers in a Samba controlled
domain.

Based on a request by Gémes Géza <geza@kzsdabas.hu>

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov 29 09:20:55 CET 2011 on sn-devel-104
2011-11-29 09:20:54 +01:00
Theresa Halloran
b26a4f6232 s4: samba-tool subcommand rename - change samba-tool user add to samba-tool user create
Signed-off-by: Theresa Halloran <thallora@linux.vnet.ibm.com>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2011-10-23 15:23:28 -07:00
Andrew Bartlett
f8c6219188 s4-selftest When testing for a credentials cache, do not specify a domain
If we specify a domain, then we indicate that we must use that domain
which overrides the credentials cache we found in the environment.

Andrew Bartlett
2011-10-18 13:13:30 +11:00
Amitay Isaacs
6c1cbfb232 tests-blackbox: Revert the test to use user-level change password command
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Amitay Isaacs
fca7062d2a test-blackbox: use python version of change password command
Replace the "samba-tool user setpassword" command with user level
"samba-tool user password" command.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Amitay Isaacs
db151ee3c0 test-blackbox: Rearrange arguments for samba-tool user setpassword command
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Amitay Isaacs
c876993901 test-blackbox: Remove 'domain\' from username for samba-tool user setpassword
Python version of samba-tool does not require 'domain\' prefix for username.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Amitay Isaacs
94976ee2ef test-blackbox: Rearrange the arguments in required order for samba-tool time
Python version of samba-tool requires the command and the subcommand to
be specified before the options.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Giampaolo Lauria
901959d9ca samba-tool: updated test suite to account for newuser change
Updated test suite invocations of newuser to "user add" as
the newuser functionality is now being moved to "user add"

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:51 +10:00
Giampaolo Lauria
2e082853fb samba-tool: update test suite to reflect the move from password to "user setpassword"
This is part of the work to reflect the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:51 +10:00
Andrew Tridgell
88df1da2b2 s4-test: don't fix broken objects during dbcheck test
this leaves the database as-is, which makes it easier to examine the
problem
2011-07-21 11:44:33 +10:00
Andrew Tridgell
bba7dc5092 dbcheck: test the --reindex option
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
190ec87964 s4-test: added dbcheck run to test suite
This should catch corruption that happens during a test run

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:32 +10:00
Andrew Tridgell
7d399376b8 samba-tool: use 'exportkeytab' instead of 'dumpkeys'
a 'keytab' is a particular format known to administrators, whereas
'keys' is a bit too vague

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:31 +10:00
Giampaolo Lauria
9f32f86018 samba-tool: updated test suite for the new domain dumpkeys option
The test suite has been changed to reflect the move from export to "domain dumpkeys" to reflect the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
8c7718ac16 samba-tool: update test suite for the new domain object
Changed test suite to reflect the changes from setpassword to "domain setpassword" to fit the object-action model

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:23 +10:00
Giampaolo Lauria
c4a92292c1 samba-tool: update test suite for add setpassword
The test suite needs to change from setpassword to "user setpassword" to reflect the new cmd syntax

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21 10:32:22 +10:00
Andrew Tridgell
1ee67df307 s4-test: fixed usage message on renamedc.sh 2011-07-13 12:51:05 +02:00
Andrew Tridgell
9bd695c83f samba-tool: update tests for new 'user enable' syntax
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun  1 10:37:50 CEST 2011 on sn-devel-104
2011-06-01 10:37:50 +02:00
Matthieu Patou
49c99d0515 s4: add blackbox test for rename
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat May 21 09:50:34 CEST 2011 on sn-devel-104
2011-05-21 09:50:34 +02:00
Andrew Bartlett
4fd6ebf544 selftest: Remove duplication between BUILDIR and BINDIR
Just have BINDIR, and have it default to ./bin

Andrew Bartlett
2011-04-16 11:43:04 +02:00
Michael Adam
7c72ce9f48 testprogs/blackbox/subunit: add testok() for easier integration of s3 tests. 2011-02-16 12:56:40 +01:00
Andrew Tridgell
b49973404c blackbox: removed assumption of build directory
this fixes the blackbox tests for a top level build

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:00 +11:00
Stefan Metzmacher
769425662e testprogs:test_kinit: create tmp files under $PREFIX
metze
2010-12-24 17:31:06 +01:00
Jelmer Vernooij
d237698850 blackbox.ldb: Support using system ldbsearch.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Nov 27 04:32:11 CET 2010 on sn-devel-104
2010-11-27 04:32:11 +01:00
Andrew Bartlett
b8631597f5 s4-test_kinit Add tests for lowercase realm combinations
This tests that the handling of lowercase realms works in our KDC and
libraries.

Andrew Bartlett
2010-11-16 16:01:19 +11:00
Kai Blin
b73a05e4e1 s4 net: rename to samba-tool in order to not clash with s3 net
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Thu Oct 28 07:25:16 UTC 2010 on sn-devel-104
2010-10-28 07:25:16 +00:00
Andrew Tridgell
006111646c s4-test: fixed a typo in test_kinit.sh
too many Ts

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Oct 15 10:14:27 UTC 2010 on sn-devel-104
2010-10-15 10:14:27 +00:00
Andrew Tridgell
d59a342c71 s4-test: fixed test_kinit.sh time command test
passing -W breaks -k yes
2010-10-15 09:32:03 +00:00
Stefan Metzmacher
34692556be s4:blackblock/ktpass: use test specific user name
metze
2010-07-31 11:22:15 +02:00
Matthieu Patou
e461e29cd9 s4 unittests: add blackblox test for ktpass 2010-07-17 17:56:16 +04:00
Andrew Bartlett
0e212acd32 s4:testprogs Operate the blackbox kinit and net tests using the :local config
This :local tells selftest.pl to use the local smb.conf for the test
environment, not the generic client smb.conf

This then makes the rest work properly - otherwise, it may attempt to
connect to the wrong KDC for example.

The only problem is that we can't test the 'net join' with this set,
so this is removed from the test.  The member server test environment
checks this anyway.

Andrew Bartlett
2010-07-16 07:08:41 +10:00
Andrew Bartlett
8769e75a61 s4:testprogs Show that we no longer delete the old keytab entries
By using a CCACHE obtained while the old password was still valid, we
can tell if the server still accepts incoming Kerberos connections
with the old password.

Andrew Bartlett
2010-07-15 22:08:22 +10:00
Andrew Bartlett
5d61b477c6 s4:testprogs Prove kerberos still works after a password change
Changing the machine account password should not prevent connections
with a current, valid CCACHE.  This is because when the password is
changed, the server-side keytab keeps one old password around.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:22 +10:00
Matthieu Patou
0496af8341 s4: Unit test update_machine_account_password through kinit
This patch is for testing the chgdcpass script which is mostly a call to
update_machine_account_password.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Stefan Metzmacher
22dfb16d73 testprogs/blackbox/subunit.sh: initialize failed to 0
This is a short-term workarround for broken scripts,
which use "exit $failed", without initializing failed.

We need a discussion on the mailing list how to handle this
in a nicer way.

This should fix some random failures in the blackbox tests.

metze
2010-07-10 09:35:04 +02:00
Matthias Dieter Wallnöfer
518232d457 s4:kinit blackbox test - set/reset also here the "minPwdAge" 2010-07-03 16:08:24 +02:00
Matthias Dieter Wallnöfer
73c69a195a s4:blackbox/test_passwords.sh - perform also here the adaptions for "minPwdAge" != 0 2010-07-03 11:38:49 +02:00
Andrew Bartlett
48c8896f2e s4:selftest Split out PKINIT tests from test_kinit.sh and test enc types
This allows us to run the PKINIT tests only against the main DC (for
which the certificates were generated), while testing the available
encryption types in each functional level.

In particular, we need to assert that AES encryption is available in
the 2008 functional level.

Andrew Bartlett
2010-06-29 16:59:31 +10:00
Matthias Dieter Wallnöfer
088a25912e s4:blackbox/test_kinit.sh - Test the new "net user add <user> [<password>]" syntax 2010-05-09 19:14:47 +02:00
Andrew Tridgell
48330c828e s4-test: check that a weak password is rejected by kpasswd
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-16 14:12:44 +10:00
Stefan Metzmacher
16d4d0346d testprogs/blackbox/test_kinit: reorder arguments to "net time" to fix make test
metze
2010-04-13 10:09:18 +02:00
Andrew Bartlett
df7fbf28ee s4:testprogs Update test to match current Heimdal 2010-03-27 12:23:21 +11:00
Andrew Bartlett
6798543842 s4:testprogs Fix kinit test for updated Heimdal 2010-03-27 11:53:49 +11:00
Andrew Bartlett
0a65bb57a1 s4:selftest Add testing of kpasswd password set on servicePrincipalName 2010-03-25 16:32:04 +11:00
Andrew Bartlett
a9d9447d5a s4:credentials Add hooks to extract a named Kerberos credentials cache
This allows the integration of external tools that can't be linked
into C or python, but need to authenticate as the local machine
account.

The machineaccountccache script demonstrates this, and debugging has
been improved in cli_credentials_set_secrets() by passing back and
error string.

Andrew Bartlett
2010-02-20 17:58:07 +11:00
Stefan Metzmacher
1525e59886 blackbox/test_export_keytab.sh: correctly remove temporary files
metze
2010-01-04 09:36:25 +01:00
Stefan Metzmacher
5df8b33ddc blackbox/test_export_keytab.sh: use VALGRIND for samba4kinit
metze
2010-01-04 09:36:25 +01:00
Andrew Tridgell
9d6411d9dd s4-testpasswords: fixed CONFIG and quoting
Need to pass correct config file to tests
2009-12-31 17:33:34 +11:00
Jelmer Vernooij
9e5ef916d4 net: Move 'newuser' to 'net newuser'
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:27 +11:00
Jelmer Vernooij
73594c248f net: Fix tests and documentation of setexpiry.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:25 +11:00
Jelmer Vernooij
b531696a5b net: Move 'setpassword' to 'net setpassword'.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:22 +11:00
Jelmer Vernooij
797977ac53 blackbox.passwords: Use convenience variable for net.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:19 +11:00
Jelmer Vernooij
18d221342b Fix commands in password tests.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:18 +11:00
Matthias Dieter Wallnöfer
0af3b06824 Revert "blackbox:test_kinit - Remove the "-H" (hive) parameter"
This reverts commit d4389a230b.

This revert changed the behaviour which I didn't expect. Thanks abartlet to
point this out!
2009-09-21 11:33:13 +02:00
Matthias Dieter Wallnöfer
d4389a230b blackbox:test_kinit - Remove the "-H" (hive) parameter
The "enableaccount" script works only on local LDB anymore - therefore remove
this parameter.
2009-09-20 23:07:22 +02:00
Stefan Metzmacher
c5d38fd45a blackbox/test_ldb.sh: test searching using OIDs instead of names for attributes and classes
metze
2009-09-20 06:44:19 +02:00
Andrew Kroeger
e3a2a22451 s4:pwsettings: Added blackbox tests.
The added tests include basic validation that the script runs and accepts all
custom arguments.  The tests also verify changes to the password complexity,
minimum password length, and minimum password length settings.
2009-09-10 01:09:56 +02:00
Andrew Kroeger
67a8a8c9e6 testprogs:subunit.sh: Add function for expected failures.
The testit_expect_failure() function is like the testit() function, with
reversed error detection logic.  This reversal only affects the pass/fail logic
and logging - the original return code from the command is still returned to the
calling script.
2009-09-10 01:09:56 +02:00
Andrew Bartlett
8ff1f50b0c s4:kerberos Add support for user principal names in certificates
This extends the PKINIT code in Heimdal to ask the HDB layer if the
User Principal Name name in the certificate is an alias (perhaps just
by case change) of the name given in the AS-REQ.  (This was a TODO in
the Heimdal KDC)

The testsuite is extended to test this behaviour, and the other PKINIT
certficate (using the standard method to specify a principal name in a
certificate) is updated to use a Administrator (not administrator).
(This fixes the kinit test).

Andrew Bartlett
2009-07-28 14:10:47 +10:00
Andrew Bartlett
cdd7a5208f s4:kerberos Add test to show that we actually export the keytab
While it is hard to prove it is correct, at least the new
'nettestuser' principal and the Administrator principal are correct.

We had to fix the case of 'Administrator' in the selftest code to
match the DB, as the keytab lookup is case sensitive.

Andrew Bartlett
2009-07-27 22:41:43 +10:00
Andrew Bartlett
89a074b784 s4:heimdal Allow KRB5_NT_ENTERPRISE names in all DB lookups
The previous code only allowed an KRB5_NT_ENTERPRISE name (an e-mail
list user principal name) in an AS-REQ.  Evidence from the wild
(Win2k8 reportadely) indicates that this is instead valid for all
types of requests.

While this is now handled in heimdal/kdc/misc.c, a flag is now defined
in Heimdal's hdb so that we can take over this handling in future (once we start
using a system Heimdal, and if we find out there is more to be done
here).

Andrew Bartlett
2009-06-30 12:11:14 +10:00
Andrew Bartlett
1e6fb7d730 s4: Add tests and 'must change password' flags in setpassword and newuser
In particular, ensure that we can acutally change the password under
these circumstances.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
033e25fdce s4:testprogs Don't specify a username/password when checking the ccache
The purpose of this test is to ensure that the Kerberos credentials
cache is valid.  If the username and password is specified, this
overrides the very thing we are trying to test.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Stefan Metzmacher
d52e813117 s4:blackbox/test_ldb: make use of the $VALGRIND envvar
metze
2009-03-04 08:32:32 +01:00
Stefan Metzmacher
8b408f7819 s4:selftest: avoid hardcoded pathes in blackbox tests
metze
2009-02-03 16:31:04 +01:00
Stefan Metzmacher
bb45bf6347 s4:blackbox: don't remove newlines in the subunit failure output
metze
2009-01-08 15:59:09 +01:00
Andrew Bartlett
fc7e41d6ff s4:testprogs: improve extended dn testing of the ldb blackbox tests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:30 +11:00
Andrew Bartlett
22eb64f056 Actually test the kpasswd server
This uses kpasswd operated as a blackbox, assisted by the newly
imported rkpty tool.

Andrew Bartlett
2008-10-20 20:07:09 +11:00
Stefan Metzmacher
bb4e9d72dd s4:blackbox/test_ldb: test search by <GUID=...> and <SID=...>
metze
2008-10-06 09:07:37 +02:00
Andrew Tridgell
e13270d7ac fixed the ldb blackbox test to work with non-bourne shells (as needed
by ubuntu)

fixed spelling of 'wellknown'
2008-10-03 17:08:39 -07:00
Stefan Metzmacher
a25fac13eb s4:blackblox/test_ldb: test searches via wellknownObjects
metze
2008-10-02 18:56:09 +02:00
Jelmer Vernooij
d7a0c26af4 Move torture/ blackbox tests closer to code they're testing. 2008-09-16 18:30:24 +02:00
Jelmer Vernooij
aa09d8a75f Move ndrdump tests closer to the code they test. 2008-09-16 18:16:49 +02:00
Stefan Metzmacher
b295dca7a0 blackbox: fix source => source4
metze
2008-09-14 23:08:45 +02:00
Jelmer Vernooij
26e9194e3a Move blackbox tests closer to what they're testing.
(This used to be commit c9b2e2aa86)
2008-06-26 10:56:59 +02:00
Jim McDonough
f3fb381952 Missed these on the last commit
(This used to be commit 0e8f946ed0)
2008-06-12 07:06:07 -04:00
Jim McDonough
0410dcb32d Initial automated wintest.
Added a blackbox test which looks for $WINTEST_CONF_DIR,
gets configuration vars from *.conf in that dir, disables
smbwrapper, and runs RAW-OPEN torture test.

Scripts are coming to startup/shutdown vm's.
(This used to be commit 74a0a9bb54)
2008-06-12 07:02:14 -04:00
Andrew Kroeger
fe17acfa82 subunit.sh: Properly capture and pass on the command output.
Previously, the output from $cmdline was never captured.  In case of a
failure, there was no output being passed to the subunit_fail_test() function,
but that function contains a call to "cat -".  This caused the script to hang
indefinitely waiting for input.

We now capture $cmdline output (including mapping stderr to stdout) using
backticks, and then pipe that output to the subunit_fail_test() if there is
a failure.
(This used to be commit c0234d1319)
2008-05-21 20:46:14 -05:00
Jelmer Vernooij
1929675813 Fix reference to removed smbpython.
(This used to be commit 58f956dc45)
2008-05-21 15:39:00 +02:00
Andrew Bartlett
9586462b8f Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 18dd8120cc)
2008-04-16 16:12:58 +02:00
Andrew Bartlett
008c8adfe3 Fix wbinfo --trusted-domains.
The problems here were that we did not bind to the LSA pipe, and we
did not consider it possible to have 0 trusted domains.

Andrew Bartlett
(This used to be commit 86694d429d)
2008-04-16 16:10:16 +02:00
Jelmer Vernooij
228f342b1f Use the subunit shell library.
(This used to be commit 49367e044e)
2008-04-16 14:52:29 +02:00
Jelmer Vernooij
f540669c48 Use library for subunit test functions.
(This used to be commit 690924dc7f)
2008-04-16 12:34:53 +02:00
Jelmer Vernooij
83c8d6cc89 Fix -r test, knownfailure return code.
(This used to be commit 4f0954905a)
2008-04-16 01:10:20 +02:00
Jelmer Vernooij
f5c0be9208 Merge branch 'wbinfo-test' of git://git.samba.org/kai/samba/kai-work-in-progress into v4-0-selftest
(This used to be commit 56340a5fa1)
2008-04-16 00:05:36 +02:00
Jelmer Vernooij
edc9b35f1e Fix executable bit on blackbox ndrdump tests.
(This used to be commit a3f0e4151b)
2008-04-16 00:05:12 +02:00
Kai Blin
3413cfefb8 blackbox: Add many more tests for wbinfo
(This used to be commit 0a2942f6e9)
2008-04-15 23:36:41 +02:00
Andrew Bartlett
c7d9596764 Test password change with 'net password change'.
Andrew Bartlett
(This used to be commit 695cee0349)
2008-04-15 10:40:06 +02:00
Andrew Bartlett
5a18f0d82b Test a few more bits of smbclient
(This used to be commit 24a2409d72)
2008-04-15 10:05:29 +02:00
Andrew Bartlett
afaba23131 Add blackbox test for ndrdump, to ensure it at least does not
segfault.

Andrew Bartlett
(This used to be commit d2fe61a13a)
2008-04-15 09:13:32 +02:00
Andrew Bartlett
142fbfb3c1 Fix and test python scripts and kerberos
This fixes up the python credentials interface in a number of areas,
with the aim of supporting '-k yes' as a command line option.  (This
enables the use of kerberos).

As such, I've had to change the get_credentials call to take a
loadparm context, so that the credentials can be initialised
correctly.

The test_kinit script has been modified to prove that this continues
to work, as well as to provide greater code coverage of the kerberos
paths.

Andrew Bartlett
(This used to be commit 727ef40c2b)
2008-03-28 21:57:15 +11:00
Andrew Tridgell
054bc11876 added blackbox testing of gentest
(This used to be commit 716345fd38)
2008-02-15 16:42:22 +11:00
Andrew Tridgell
c09f70608c added a blackbox test for masktest
(This used to be commit 05a110123d)
2008-02-15 15:33:10 +11:00
Andrew Tridgell
66e8bc9dac converted locktest to use popt and cmdline utility code
(This used to be commit 625ea49a95)
2008-02-15 14:55:31 +11:00
Andrew Tridgell
63c099c51a added blackbox testing for locktest
(This used to be commit af6484f78d)
2008-02-15 14:27:06 +11:00
Jelmer Vernooij
b5bfabf152 Move nmblookup blackbox test closer to the code it tests.
(This used to be commit 3f24136b56)
2008-02-09 17:17:21 +01:00
Jelmer Vernooij
066912ba80 Put temporary test files in test directory.
(This used to be commit 16382999be)
2008-02-08 00:34:29 +01:00
Andrew Bartlett
85c7021216 Test the behaviour of mixed domain_scope and search_options controls.
Andrew Bartlett
(This used to be commit 89053bc564)
2008-01-16 08:58:07 +11:00
Jelmer Vernooij
7b06161904 Remove accidently committed debugging statement.
(This used to be commit 9ad2de6e99)
2008-01-13 04:50:33 +01:00
Jelmer Vernooij
95f83d9040 tests.blackbox: Avoid my local Kerberos setup from interfering with the blackbox.smbclient test.
(This used to be commit 1d703dcf3a)
2008-01-13 02:45:55 +01:00
Andrew Bartlett
364266e22a r26192: Handle, test and implement the style of extended_dn requiest that MMC uses.
It appears that the control value is optional, implying type 0 responses.

Failing to parse this was causing LDAP disconnects with 'unavailable
critical extension'.

Andrew Bartlett
(This used to be commit 833dfc2f2a)
2007-12-21 05:46:44 +01:00
Jelmer Vernooij
bf4f1307ab r24876: Use more absolute paths to samba4 binaries.
(This used to be commit 8616bfa0ae)
2007-10-10 15:03:26 -05:00
Jelmer Vernooij
a73a8d4b9d r24706: Move nmblookup tests to separate blackbox testsuite.
(This used to be commit aeb2e714f2)
2007-10-10 15:02:52 -05:00
Andrew Bartlett
666a833d2e r24693: Test search options in ldb blackbox testing.
Andrew Bartlett
(This used to be commit 9f45b5553a)
2007-10-10 15:02:47 -05:00
Jelmer Vernooij
8d6b9f2b88 r24691: All smbclient blackbox tests pass.
(This used to be commit c3a1386274)
2007-10-10 15:02:46 -05:00
Andrew Bartlett
0eb3ee3204 r24459: Fix up ldap.js and test_ldb.sh to test the domain_scope control, and
to test the behaviour of objectCategory=user searches.

It turns out (thanks to a hint on
http://blog.joeware.net/2005/12/08/147/) that objectCategory=user maps
into objectCategory=CN=Person,... (by the defaultObjectCategory of
that objectclass).

Simplify the entryUUID module by using the fact that we now set the DN
as the canoncical form of objectCategory.

Andrew Bartlett
(This used to be commit b474be9507)
2007-10-10 15:01:53 -05:00
Jelmer Vernooij
4da477d4fa r24339: Move output functions to separate files.
(This used to be commit f4ff4c5f61)
2007-10-10 15:01:40 -05:00
Jelmer Vernooij
f1f4f665b0 r24335: Fix -N support.
(This used to be commit 18ea767d39)
2007-10-10 15:01:39 -05:00
Andrew Bartlett
bb68118840 r23965: Add testing the 'net time' command to the script.
Andrew Bartlett
(This used to be commit 4fab53432a)
2007-10-10 15:01:12 -05:00
Andrew Bartlett
8172bbb7e4 r23964: Update blackbox selftest scripts to cover more code, and to more
consistantly report errors.  (Some were being lost due to the "echo
foo | cmd" calling convention).

Andrew Bartlett
(This used to be commit d0a994d0ce)
2007-10-10 15:01:12 -05:00
Andrew Bartlett
4955b21f68 r23849: ldap_server: Provide more info in debug traces
blackbox tests:  increase test coverage by running more options.

Andrew Bartlett
(This used to be commit 46abf82675)
2007-10-10 14:59:24 -05:00
Jelmer Vernooij
5a74acbb17 r23174: merge text
(This used to be commit a6293ab5cb)
2007-10-10 14:52:59 -05:00
Andrew Bartlett
aacabe9c57 r22284: Make this script executable
(This used to be commit b0cbf16936)
2007-10-10 14:50:56 -05:00
Andrew Bartlett
b0cbe9ae4a r22235: Test kinit, and PKINIT functionality by means of a new blackbox test.
Andrew Bartlett
(This used to be commit 7f27bfc356)
2007-10-10 14:50:41 -05:00
Andrew Bartlett
f1b2b43ba5 r22187: Test kerberos logins in the smbclient blackbox tests, including with a
machine account.

Andrew Bartlett
(This used to be commit 16a2bb87a8)
2007-10-10 14:50:01 -05:00
Andrew Bartlett
f3303bc8f6 r22170: To get the smbclient blackbox test to pass again, we need to get the
private dir to contain a valid machine account.

It isn't really valid it use the DC's account any more, so extend this
script to also join the domain.  This nicely tests out some previously
untested code too!

Andrew Bartlett
(This used to be commit 12f4e6033e)
2007-10-10 14:49:57 -05:00
Andrew Bartlett
847102c6ca r21736: Fix the smbclient test to do something more interesting with the last
few authentication tests.  Now that the tests correctly 'fail', I was
able to fix the credentials subsystem to honour USER and PASSWD.

To get --machine-pass working, I needed ldb to always load it's static
modules, so I put this in ldb_connect().

Andrew Bartlett
(This used to be commit 3430d8c072)
2007-10-10 14:49:20 -05:00
Jelmer Vernooij
72d88d158a r21707: Finally merge my (long-living) perlselftest branch.
This changes the main selftest code to be in perl rather than in shell script.

The selftest script is now no longer a black box but a regular executable that takes
--help.

This adds the following features:

 * "make test TESTS=foo" will run only the tests that match the regex "foo"
 * ability to deal with expected failures. the suite will not warn about tests
   that fail and are known to fail, but will warn about other failing tests and
   tests that are succeeding tests but incorrectly marked as failing.
 * ability to print a summary with all failures at the end of the run

It also opens up the way to the following features, which I hope to implement later:
 * "environments", for example having a complete domains with DCs and domain members
 in a testenvironment
 * only set up smbd if necessary (not when running LOCAL tests, for example)
 * different mktestsetup scripts per target. except for the mktestsetup script, we can
   use the same infrastructure for samba 3 or windows.
(This used to be commit 38f867880b)
2007-10-10 14:49:15 -05:00
Jelmer Vernooij
000a094318 r21700: Run mktestsetup as an external program. This guarantees that it can be used for other selftest implementations (in particular the perl one I've been working on).
(This used to be commit aa29907327)
2007-10-10 14:49:15 -05:00
Jelmer Vernooij
48bb9bc6cd r21017: Actually run tests during test phase rather than when generating the recipe.
(This used to be commit b975ce3a47)
2007-10-10 14:44:20 -05:00
Andrew Bartlett
109d97a38f r20958: Inspired by the lcov output, check the PASSWD_FILE and
--authentication-file options to smbclient.

Andrew Bartlett
(This used to be commit f85e57a71e)
2007-10-10 14:44:02 -05:00
Jelmer Vernooij
f60f9de6a8 r20747: Move cifsdd to blackbox section
(This used to be commit 96ac1c62ee)
2007-10-10 14:40:36 -05:00
Jelmer Vernooij
d9665a737b r20746: Don't report each individual test in test_smbclient as a single testsuite.
Create separate directory for blackbox tests.
(This used to be commit 7e6357f213)
2007-10-10 14:40:36 -05:00