1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

565 Commits

Author SHA1 Message Date
Andrew Bartlett
2b558f2096 selftest: Set winbind separator = /
This avoids a pile of shell-script escape pain, and fixes some tests.

Andrew Bartlett

Change-Id: Ie1d0e32ab484a5b0ddbc4073831fe6de27e38e92
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:25 +02:00
Andrew Bartlett
b2c0a6a851 selftest: Ensure winbindd is fully operating before running tests
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:25 +02:00
Andrew Bartlett
34e8deccf9 selftest: consitently use the name s4member
This avoids a conflict with the Samba3.pm defined member environment, and so spurious
failures in make test for the member environment dependent on test ordering.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:25 +02:00
Stefan Metzmacher
26b91558df selftest: use dbwrap_tdb_mutexes:* = yes for "plugin_s4_dc" and "member"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 22 23:33:41 CEST 2014 on sn-devel-104
2014-05-22 23:33:41 +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
Simo Sorce
3f60f0e36b Fix selfetet environment user gid
The real invoking user's gid should be in the /etc/group file or it may
cause spurious error messages.

Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Tue May 13 15:33:21 CEST 2014 on sn-devel-104
2014-05-13 15:33:21 +02:00
Andreas Schneider
2522bb8090 selftest: Rename WINBINDD_SOCKET_DIR environment variable.
It is very confusing if the env var uses the same name as the define in
the source code. So prefix it with SELFTEST.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
354744f6e8 selftest: Write the nss_wrapper hosts file.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
3381784690 selftest: Set NSS_WRAPPER_MODULE variables for NSS module.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
a573441e73 selftest: Add the user running the test to passwd.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
77b7dfd37b selftest: Call smbpasswd as root.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Andreas Schneider
d1c53ebf4c selftest: Enable uid_wrapper globally.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Jeremy Allison
30cc8f41da s3: vfs_dirsort module.
Add raw.search torture test on a share definition with:

vfs objects = dirsort

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

Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-12 12:37:05 +13:00
Stefan Metzmacher
b449d13be4 selftest/Samba3: make --log-stdout optional
It's still used by default, but the following environment variables
are able to avoid it NMBD_DONT_LOG_STDOUT=1, WINBINDD_DONT_LOG_STDOUT=1
and SMBD_DONT_LOG_STDOUT=1.

It's strange that nmbd and smbd take --log-stdout, while winbindd
takes --stdout.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Feb  1 01:27:18 CET 2014 on sn-devel-104
2014-02-01 01:27:18 +01:00
Andreas Schneider
c20753ce7a selftest: Use the absolute path to libnss_winbind.so.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 17 16:45:27 CET 2014 on sn-devel-104
2014-01-17 16:45:27 +01:00
Stefan Metzmacher
0d4806f9f0 selftest/Samba4: use "allow nt4 crypto = yes" for testing
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 12:47:17 +01:00
Gregor Beck
dfff01910b selftest: pass -l logdir to daemon processes.
The daemons try to set up the corefile path within logdir before the config
file was read.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-11 17:22:40 +01:00
Stefan Metzmacher
a32366e973 selftest/Samba3: export ENVNAME
This is used by selftest/in_screen.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-11 16:54:15 +01:00
Christof Schmitt
63727c1545 selftest: Introduce share for testing AIO
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-05 18:22:16 -08:00
David Disseldorp
a3839ded47 selftest/s3: expose share with FS applicable config
Attempt to determine the underlying test share filesystem using statfs.
If the filesystem is detected and an applicable configuration is
available, then apply it to a new filesystem specific share.
Btrfs is currently the only VFS module to utilize this logic.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-22 08:56:44 -08:00
Stefan Metzmacher
cf29fb2cf4 CVE-2013-4476: selftest/Samba4: use umask 0077 within mk_keyblobs()
We should generate private keys with 0600.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234

Pair-Programmed-With: Björn Baumbach <bb@sernet.de>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-11-11 11:14:36 +01:00
Andrew Bartlett
e512491552 s3-winbindd: Remove undocumented winbindd:socket dir parameter
This uses the documeted "winbindd socket directory" parameter instead.

This came about due to the merge of the two smb.conf tables in s3 and
s4 for the Samba 4.0 release.  The s4 code used a real parameter,
which caused this to be documented, whereas no automatic procedure
existed to notice the parametric option and the need to document that.
The fact that this was not used consistently in both codebases is one
of the many areas of technical debt we still need to pay off here.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-10-15 10:58:45 +13:00
David Disseldorp
477e53a8cb param: disable print notify backchannel by default
In handling RemoteFindFirstPrinterChangeNotifyEx requests, the spoolss
server can establish a "backchannel" connection to the print client, as
a mechanism for sending print notifications. This behaviour is governed
by the "print notify backchannel" smb.conf parameter.

This change sets "print notify backchannel" to "no" by default, which
sees Samba respond to RemoteFindFirstPrinterChangeNotifyEx requests with
WERR_SERVER_UNAVAILABLE. In recieving such a response, print clients can
fall back to polling for print queue changes.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Oct 14 18:49:41 CEST 2013 on sn-devel-104
2013-10-14 18:49:41 +02:00
Nadezhda Ivanova
5805b7abc8 s4-openldap: Added an -H option to delegation script
Also calling delegation locally without credentials, as this is not really
necessary and causes selftest errors against the openldap backend.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-23 18:40:25 -07:00
Howard Chu
2a452f2374 Cleanup start/stop code
teardown was bailing out before stopping slapd.
Use fork/exec to start slapd, just like samba.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
2013-09-23 18:40:25 -07:00
David Disseldorp
40db563791 selftest: change to src dir for panic backtrace
When running selftest against a Samba3 target, the working directory is
set to st/s3dc/share. The existing "panic action" script attempts
obtain a backtrace for a paniced smbd process using GDB, which does not
locate debug info relative to the working directory.

This commit changes the S3 selftest panic action to first enter
the base source directory before attempting to obtain the backtrace,
ensuring that GDB can locate the debug info.

Signed-off-by: David Disseldorp <ddiss@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep 12 00:19:39 CEST 2013 on sn-devel-104
2013-09-12 00:19:39 +02:00
Andrew Bartlett
013c4990c6 selftest: Start internal DNS server on domain provisioned for BIND9_DLZ
This shows that the internal server can use the dns-SERVER account.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2013-09-04 07:06:05 +02:00
Andrew Bartlett
e281037c9b selftest: Test creation of the dns-SERVER account during selftest
We do this by having the samba-tool domain dcpromo for promoted_vampire_dc also create a
dns-SERVER account.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2013-09-04 07:06:05 +02:00
Christof Schmitt
73a9e6a73b selftest: Print error message when smbd does not have ADS support
When smbd cannot be compiled with ADS support, setting up the s3member
environment fails with:

samba: using 'standard' process model
Samba can't provide environment 's3member' at /test/samba/selftest/target/Samba.pm line 44.
Can't use string ("UNKNOWN") as a HASH ref while "strict refs" in use at /test/samba/selftest/selftest.pl line 852.
samba: EOF on stdin - terminating

Add an explicit error message for the missing ADS support to make this
easier to debug and also avoid the warning about the hash reference:

samba: using 'standard' process model
Samba can't provide environment 's3member' at /test/samba/selftest/target/Samba.pm line 44.
Unable to setup environment s3member at /test/samba/selftest/selftest.pl line 851.
smbd does not have ADS support
samba: EOF on stdin - terminating

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jul 27 08:31:14 CEST 2013 on sn-devel-104
2013-07-27 08:31:14 +02:00
Andrew Bartlett
ae0ba6bd83 selftest: Ensure the DC has started and and got a RID set before we proceed
This avoids errors when a busy DC has not yet fetched a RID set, showing up
as flapping tests when users are created, such as the samr.large-dc test.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-07-24 16:35:20 +02:00
Andreas Schneider
a4af4fa9db selftest: Use higher ip numbers.
127.0.0.2 is used by some distributions to resolve the own hostname.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-02 12:30:53 -07:00
Andreas Schneider
d5511b125c selftest: Add a newline to root entries in the nss files.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-02 12:30:50 -07:00
Andreas Schneider
7392985b29 selftest: Fix domain name of plugindc.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-02 12:30:47 -07:00
Andrew Bartlett
26d36befa8 selftest: VFSLIBDIR is not needed, the waf build knows where to find modules automatically
This is why was relinks on install, because it is fixing these
internal variables up.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Alexander Werth
6fa3f7d0f4 s4-smbtorture: Run tests for nfs4:modes simple and special.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Andrew Bartlett
fe8a1fcda7 selftest: Run raw.acls test against the nfs4acl_xattr module
This is the first time we have tested the NFSv4 ACL mapping code.
Sadly most tests fail but these can be fixed from here.

This at least shows that the code does not segfault.

Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Jeremy Allison
8956c0d53b Ensure we test the dirsort module in make test.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 11 21:17:21 CEST 2013 on sn-devel-104
2013-04-11 21:17:21 +02:00
Andrew Bartlett
58e385a5ac Revert "Ensure the masks don't conflict with the ACL checks."
This reverts commit 78594909b8 which was
needed by 7622aa16ad.

This change masked bug #9462 which was fixed by
2013bb9b4d.  The issue was that the
defaults for the substituted parameters did not match the old
parameter.  Changing the values in our test suite hid the issue, but
did not fix the issue.

(Additional change in the revert is to correct the expected ACL value
in posixacl.py due to changed implied inherited permissions).

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Mar 11 19:46:24 CET 2013 on sn-devel-104
2013-03-11 19:46:24 +01:00
Christof Schmitt
6ac0bdc451 Add testcase for idmap_rfc2307 module
Create a new test environment with 'idmap config DOMAIN : backend =
rfc2307'. A new test script adds LDAP records and queries them again for
the mapped uid and gid.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  9 08:18:43 CET 2013 on sn-devel-104
2013-03-09 08:18:43 +01:00
Andrew Bartlett
166288b162 selftest: Fix specification of --machinepass to actually set a unique password
Because perl does not assert on dereferencing an invalid hash key
we did not notice that the passwords were being set to machine, not
machineloCalMemberPass.

Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-06 14:46:29 -08:00
Rusty Russell
2f4b21bb57 ntdb: switch between secrets.tdb and secrets.ntdb depending on 'use ntdb'
Since we open with dbwrap, it auto-converts old tdbs (which it will
rename to secrets.tdb.bak once it's done).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Wed Feb 20 07:09:19 CET 2013 on sn-devel-104
2013-02-20 07:09:19 +01:00
Stefan Metzmacher
7e7cd07c40 selftest: rename 'promoted_vampire_dc' to 'promoted_dc'
Unix domain socket are limited to 104 characters on Linux.

Using something like this fails as it uses more than 104 characters:
'/memdisk/autobuild/flakey/b232141/samba/bin/ab/promoted_vampire_dc/private/smbd.tmp/msg/msg.482379.2147483647'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-27 12:22:51 +01:00
Andrew Bartlett
c9d2ca585e selftest: Add test for rfc2307 mapping handling
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 14:52:52 +01:00
Andrew Bartlett
1002cc9a66 selftest: show that Samba honours "write list" and valid users
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-09 15:29:47 +11:00
Jeremy Allison
c1fb37d7be Recent coverity changes added directory_create_or_exist() checks to many directories.
These may not be needed, but in the meantime - ensure "make test" works again
by chmod'ing the created test directories from 0777 to 0755.

Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 22 02:08:33 CET 2012 on sn-devel-104
2012-12-22 02:08:33 +01:00
Michael Adam
46f2dfa7a5 selftest:Samba3: provision the BUILTIN\Users group if the environment runs winbindd
Note that in order to create a local group (alias), the id-allocator of
id-mapping is needed, so this can only work if winbindd is running.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:25 +01:00
Michael Adam
11ca063386 selftest:Samba3: add "wbinfo -p" test to wait_for_start()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:24 +01:00
Michael Adam
5b975ce78c selftest:Samba3: add nmbd, winbindd smbd arguments to wait_for_start()
to make checks conditional

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:24 +01:00
Michael Adam
f7dca55224 selftest:Samba3: call wait_for_start() from check_or_start()
...instead of calling the two one after another each time.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:24 +01:00
Michael Adam
ee17a516c8 selftest:Samba3: provision the domain adminstrators group in the s3 environments
I discovered that this sid / mapping is missing by working with the Sids2Uids
code and test. I do even wonder why this test could succeed prior to my pending
changes to the winbindd sids-to-xids code, for example against the s3:local
environment, since the test tries to map the sid <domsid>-512.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03 08:48:23 +01:00
Stefan Metzmacher
990448b499 s4:dsdb/acl_read: enable acl checking on search by default (bug #8620)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-30 17:17:20 +01:00
David Disseldorp
27d23dd3a9 selftest: configure printer with default devmode = no
This allows us to reproduce the segfault described in bug 9433.

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-29 13:39:30 +01:00
Andrew Bartlett
0b7bb774ce selftest: check that samba-tool gpo works for basic operations
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-11-06 08:27:44 +11:00
Jeremy Allison
78594909b8 Ensure the masks don't conflict with the ACL checks.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  5 00:36:40 CEST 2012 on sn-devel-104
2012-10-05 00:36:40 +02:00
Andrew Bartlett
0e037bfc60 selftest: Always build a linux-style nss_winbind for nss_wrapper 2012-10-03 14:25:57 +02:00
Andrew Bartlett
3c4d0ce469 samba_dnsupdate: Safely update/create names for Samba3 targets as well
This avoids unlocked writes to the dns_hosts_file, and may fix some of our
issues on the build farm where large numbers of tests fail due to failed name resolution.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep 26 05:48:25 CEST 2012 on sn-devel-104
2012-09-26 05:48:25 +02:00
Andrew Bartlett
b320e7f93b selftest: Remove invalid security=share and rename secshare to simpleserver
This avoids the loadparm code failing due to the invalid smb.conf entry, and removes
the very last hint of security=share!

Andrew Bartlett
2012-09-26 04:08:26 +02:00
Stefan Metzmacher
a11e45f1c5 selftest: let provision_plugin_s4_dc use SMB3
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep 12 18:30:48 CEST 2012 on sn-devel-104
2012-09-12 18:30:48 +02:00
Stefan Metzmacher
1b848ecbff lib/param: change the default for 'allow dns updates' to 'secure only'
metze
2012-09-12 16:51:29 +02:00
Stefan Metzmacher
1e00c0dcec selftest:Samba4: don't provision with BIND9_DLZ
metze
2012-09-12 16:51:29 +02:00
Kai Blin
76801b502d s4 dns: Run python tests in fl2003dc env 2012-09-12 16:51:29 +02:00
Stefan Metzmacher
5b4a7aea17 selftest/Samba4: make use of samba-tool domain provision
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 11 10:15:23 CEST 2012 on sn-devel-104
2012-09-11 10:15:23 +02:00
Stefan Metzmacher
7a51c5e469 selftest/knownfail: we pass some samba3.smb2.durable-* tests now
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Sep  8 23:18:39 CEST 2012 on sn-devel-104
2012-09-08 23:18:39 +02:00
Stefan Metzmacher
3fef8e207c selftest/Samba3: don't explicitly set 'server max protocol'
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Sep  8 05:15:00 CEST 2012 on sn-devel-104
2012-09-08 05:15:00 +02:00
Andrew Bartlett
9983ad7a80 s3-passdb: Rename pdb_samba4 to samba_dsdb and autoconfigure when we are a AD DC
The name samba_dsdb is not ideal, but it matches the primary ldb
module we use, and more importantly it avoids having '4' in the name.
We should slowly avoid using the term samba4 in long-term places like
the smb.conf because it is confusing to users given we are shipping
Samba 4.0 as an AD DC as well as all the other supported roles (domain
member/standalone server/classic DC)

Additionally, samba4 will be an odd name when we eventually release
Samba 5.0!

samba4 remains accepted as an alias to ensure existing smb.conf files
load, but to allow changes here in the future, we set the value during
the smb.conf load, and not during the provision when we are an AD DC.

This simplifies the default smb.conf for the vast majority of our
users and reduces the number of things listed in smb.conf files that
we later have to work around if we wish to change the
name/implementation of the passdb glue module again.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep  4 04:45:16 CEST 2012 on sn-devel-104
2012-09-04 04:45:16 +02:00
Jeremy Allison
64e57a1770 Add a comment showing where to set log level in tests. 2012-08-31 20:29:13 -07:00
Andreas Schneider
20cfa38b9d selftest: Add missing printing options for plugin_s4_dc. 2012-08-30 15:42:58 +02:00
Andreas Schneider
bf36462555 selftest: Define the log directory for s3fs. 2012-08-30 15:42:58 +02:00
Andrew Bartlett
3a303ae5ab selftest: Add a test for smbclient --machine-pass without secrets.tdb
Errors in handling the upgrade case without a matching secrets.tdb caused segfaults
in the server.  This essentially tests both sides.

Andrew Bartlett
2012-08-29 09:10:40 +10:00
Andrew Bartlett
e14bf399cf s4-selftest: Always set vfs objects in selftest smb.conf
This sets it for all enviornments, as it is harmless if ntvfs is used
and critical if the provision script runs in s3fs mode.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 23 16:42:41 CEST 2012 on sn-devel-104
2012-08-23 16:42:41 +02:00
Andrew Bartlett
a778662da8 s4-provision: set POSIX ACLs to for use with the smbd file server (s3fs)
This handles the fact that smbd will rarely override the POSIX ACL enforced by
the kernel.  This has caused issues with the creation of group policies by
other members of the Domain Admins group.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
8518dd6406 file_server: Move default VFS module settings to loadparm.c
This means that any utility that calls into the VFS layer will get the
right modules.

Because we use the fake_acls backend we need to override this whole
list in Samba4.pm however.

Andrew Bartlett
2012-08-23 15:02:26 +02:00
Andrew Bartlett
ccac50c7c4 selftest: Set --use-ntvfs for rodc, vampire_dc, promoted_vampire_dc and subdom_dc 2012-08-23 15:02:25 +02:00
Andrew Bartlett
8c7f4f05f2 selftest: Specify --use-ntvfs for the chdcpass environment 2012-08-23 15:02:25 +02:00
Andrew Bartlett
9170f9ce95 selftest: Specify --use-ntvfs to provision in test scripts
Because these run as non-root, we need to avoid doing things that will
fail during the provision.  The main test of the s3fs provision is the
plugin_s4_dc environment with a smb.conf that specifies vfs_fake_acls.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
ebb776f51f selftest: Add tests for vfs_aio_fork
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 13:12:33 CEST 2012 on sn-devel-104
2012-08-21 13:12:33 +02:00
Andrew Bartlett
74a4c40d4f selftest: Use new fake_acls module
This isolates us from the OS ACL library, and allows chown to 'work'
when we are non-root.  In turn, this ensures that we can test the SMB
-> POSIX layer even when the OS would refuse the set due to non-root
or simply not having acls enabled on this particular file system.

This should make a number of build farm tests much more reliable, and
allows a number more tests to pass.

Andrew Bartlett
2012-08-20 21:58:08 +10:00
Stefan Metzmacher
1b487ad3d7 s3:selftest: add some tests against a share the requires encryption
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 17 16:34:26 CEST 2012 on sn-devel-104
2012-08-17 16:34:26 +02:00
Andrew Bartlett
2908bbe06a s4-selftest: Test samba-tool domain dcpromo
This needs a new environment to test it properly.  This requires a raise in the
number of socket wrapper interfaces.

Andrew Bartlett
2012-07-06 08:10:18 +02:00
Andrew Bartlett
3c57fcea95 selftest: Give Samba4 processes a little longer to clean up
This may help write out gcov data correctly.

Andrew Bartlett
2012-07-03 08:13:01 +10:00
Andrew Bartlett
df899ae040 selftest: Add extra users to nss_wrapper
These will be used for a test using pdbtest and to run the client
test environment under nss_wrapper.

Andrew Bartlett
2012-06-27 11:29:16 +02:00
Stefan Metzmacher
9146e56ebb selftest/Samba3: 'server max protocol = SMB3'
metze
2012-06-25 20:55:06 +02:00
Andrew Bartlett
706a998c1f s4-provision: Remove last unused remenants of the 'sid generator' configuration
This was part of the now-abandoned S4 AD LDAP backend project.

Andrew Bartlett
2012-06-20 16:22:41 +10:00
Andrew Bartlett
39766b75a4 s4-lib/param: FLAG DAY for the default FILE SERVER
This commit changes the default file server to be s3fs.  Existing
installs wishing to keep the ntvfs file server need to set this in
their smb.conf:

server services = +smb -s3fs
dcerpc endpoint services = +winreg +srvsvc

Andrew Bartlett
2012-06-16 08:18:10 +02:00
Jeremy Allison
f57ca68b1c Tests for bug #8972 - Add a posix_share definition to s4 so we can do raw posix permissions checks. 2012-06-05 06:25:31 +02:00
Jeremy Allison
acab344847 Tests for bug #8972 - Add a posix_share definition to s3 so we can do raw posix permissions checks. 2012-06-05 06:25:31 +02:00
Michael Adam
f6e6086ad0 selftest:Samba4: use the nmblookup4 binary mapping 2012-05-31 04:46:06 +02:00
Michael Adam
24bdec94d7 s3:selftest: introduce a variable for binpath('nmblookup3') in tests.py 2012-05-31 04:46:05 +02:00
Andrew Bartlett
abb2c7fef4 s4-provision: Make s3fs the default way to install a new Samba4 DC
With s3fs now well settled into master, we now throw the swtich and make
it the default.

There is still much to do, but we need to be using s3fs by default to
find out exactly what that is.

Andrew Bartlett
2012-05-24 09:59:04 +02:00
Stefan Metzmacher
d79b46f358 selftest/Samba3: add 'smbd:suicide mode = yes'
metze
2012-05-18 16:36:16 +02:00
Andrew Bartlett
f67cb32b51 selftest: Remove tests for security=server
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-15 08:18:27 +02:00
Jelmer Vernooij
61546b5263 samba4: When running samba_dnsupdate during tests, use the test
smb.conf.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri May 11 18:18:53 CEST 2012 on sn-devel-104
2012-05-11 18:18:52 +02:00
Andrew Bartlett
3408c1ce6c selftest: 'store dos attributes = yes' is now set in fileserver.conf
As such, there is no need to set it or the permissions-based mappings here as well.

Andrew Bartlett
2012-05-02 10:53:51 +10:00
Andrew Bartlett
53c70be468 selftest: Do not start samba4 srvsvc in plugin_s4_dc mode 2012-05-02 01:00:13 +02:00
Andrew Bartlett
45125a459a selftest: add hooks required for printing to Samba4.pm 2012-05-02 01:00:13 +02:00
Andrew Bartlett
c0db57e748 selftest: Use same pattern for path to share as Samba3.pm
This helps as we declare tests that were previously targetted at Samba3 only.

Andrew Bartlett
2012-05-02 01:00:12 +02:00
Andrew Bartlett
154518a719 selftest: Add hideunread share to plugin_s4_dc 2012-05-02 01:00:12 +02:00
Andrew Bartlett
99ce5626dc selftest: run plugin_s4_dc with 'acl_xattr xattr_tdb streams_depot' VFS modules 2012-05-02 01:00:12 +02:00
Andrew Bartlett
546318b879 selftest: prepare to run smbtorture tests against plugin_s4_dc 2012-05-02 01:00:12 +02:00
Andrew Bartlett
5baf11307f selftest: attempt to test samba3hide in a different environment
This should ensure that the samba3hide test is still run and passes,
in a non-ACLed environment.

Andrew Bartlett
2012-05-02 01:00:12 +02:00
Andrew Bartlett
5f0707801a selftest: Enable ACL testing against the s3dc environment
Previously, ACL tests were skipped and the correct modules for ACL
testing were not loaded.

The addition of a knownfail entry for raw.samba3* tests is due to an
inconsitancy between the behaviour with and without ACL modules loaded
- posix chown calls appear to be ignored in this mode.

Andrew Bartlett
2012-05-02 01:00:12 +02:00
Andrew Bartlett
538893d183 s3fs: Use xattr_tdb format for xattr storage
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 18 05:39:01 CEST 2012 on sn-devel-104
2012-04-18 05:39:01 +02:00
Andrew Bartlett
7cda954fbb file_server: Move vfs objects initialisation into file_server.c smb.conf wrapper 2012-04-03 14:35:02 +10:00
Jelmer Vernooij
95ebb111ba selftest.py: Add get_interface.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Mar 27 00:32:48 CEST 2012 on sn-devel-104
2012-03-27 00:32:48 +02:00
Jelmer Vernooij
ae9b5add1e selftest.py: Add cleanup_pid.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 04:52:59 CET 2012 on sn-devel-104
2012-03-24 04:52:59 +01:00
Jelmer Vernooij
99b4d52633 selftest.py: Add write_krb5_conf. 2012-03-24 03:19:31 +01:00
Jelmer Vernooij
289632f85e selftest.py: Add mk_realms_stanza function. 2012-03-24 03:19:31 +01:00
Jelmer Vernooij
f18d9e147d selftest.py: Add selftest.target.samba with bindir_path function. 2012-03-24 03:19:31 +01:00
Michael Adam
79a1baec86 s4:selftest: make the use of writetimeupdatedelay consistent across all tests
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Mar 15 20:20:13 CET 2012 on sn-devel-104
2012-03-15 20:20:13 +01:00
Michael Adam
64627de35c s3:selftest: reactivate the writetimeupdatedelay speed-up
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-15 18:41:37 +01:00
Kai Blin
f9f1d98e74 s3 selftest: Allow DNS updates during testing 2012-03-11 00:31:37 +01:00
Andrew Bartlett
54d36099ec s3-rpc_server: Do not register embedded ncacn_np endpoints by default
The end point mapper is primarily in support of lsasd, and the key
SAMR, LSA and NETLOGON services being accessed over TCP/IP.  The end
point mapper does not appear to be used for the well-known mappings to
named pipes, and we have a problem with how to safely register the
embedded pipes.  For now, disable this to avoid re-registration storms
in production, until we sort out a better way.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar  7 14:27:38 CET 2012 on sn-devel-104
2012-03-07 14:27:38 +01:00
Andrew Bartlett
8466b3c85e s3-rpc_server: Do not setup ncalrpc pipes and TCP for embedded rpc servers
Embedded RPC services are those not launched in the preforked lsasd
and spoolssd children.

The reason that these child processes were created is that is is not
possible to correctly listen for ncalrpc and TCP connections without
creating a child process.  Therefore, we should not have these
embedded RPC services to listen on these sockets just because the
endpoint mapper has been enabled.

Andrew Bartlett
2012-03-07 12:46:13 +01:00
Andrew Bartlett
716a6c314c selftest: Only run s3dc with a forked lsasd
This ensures that we run ktest, member and s3member in the default
configuration, to try and cover both code paths.

(This does not change the tests being run, but at least the
initialisation code will be checked, plus whatever the rpcclient test
can cover).

Andrew Bartlett
2012-03-07 12:46:13 +01:00
Andrew Bartlett
fc5762388a selftest: run smbtorture_s3 tests against the ntvfs file server
This checks not only the behaviour of the NTVFS file server, but also the
client library and authentication stack.

Andrew Bartlett
2012-03-05 08:15:05 +01:00
Andrew Bartlett
4c926a708d selftest: Reduce time in cleanup loop, try waitpid on all 3 children 2012-03-05 08:15:05 +01:00
Andrew Bartlett
0582d03efe selftest: forward rpcecho to Samba4 in plugin_s4_dc 2012-03-05 08:15:05 +01:00
Jelmer Vernooij
3a6e4cf2b1 selftest.target: Add NoneTarget. 2012-03-04 18:02:07 +01:00
Jelmer Vernooij
4d602fb05d selftest.target: Add Environment.get_vars. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
e7633d86c0 selftest.target: Add tests for check. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
c57ab7ba9d selftest.target: Add tests for setup. 2012-03-04 18:02:06 +01:00
Jelmer Vernooij
5f74fa3511 selftest: Add base classes for Target/Environment and their management. 2012-03-04 18:02:06 +01:00
Andrew Bartlett
48e9d7efce selftest: Rework Samba3.pm process termination
We now store the timelimit child PID in memory, and confirm that the child has exited
with both waitpid() and kill(0, $pid).

By calling Samba::cleanup_child() we get exit status information.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Mar  4 11:51:12 CET 2012 on sn-devel-104
2012-03-04 11:51:12 +01:00
Andrew Bartlett
a37990c5c1 selftest: Rework Samba4.pm process termination.
We now double-check the waitpid() result with kill(0, $pid)

We now also send a SIGTERM, then a SIGKILL.

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Andrew Bartlett
e495118aab selftest: Fix waitpid termination test 2012-03-04 10:14:34 +01:00
Andrew Bartlett
d715e2c294 selftest: Use fork()/exec() rather than system()
This follows the Samba3.pm model for starting child processes is to
use fork()/exec().  This reduces the number of processes being created
by selftest.pl, and gives us more information about the child process
and the running state in the parent.

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Jelmer Vernooij
f75746e353 selftest: Remove outdated template. 2012-03-04 01:19:17 +01:00
Jelmer Vernooij
ed92f3de63 selftest: Remove unused and broken target 'windows'. 2012-03-04 01:18:58 +01:00
Andrew Bartlett
5d4144a826 selftest: close stdin and wait with waitpid() for a safer exit
This avoids timelimit sending kill -9 after 1 second, which may
disrupt the writing of gcov data.

Andrew Bartlett
2012-03-02 12:30:05 +01:00
Andrew Bartlett
0d94d681c4 selftest: Put stdin pipe on the environment
This seems to help us close the right pipe at cleanup time.

Andrew Bartlett
2012-03-02 12:30:05 +01:00
Andrew Bartlett
10700f69b2 selftest: Establish a registry of socket wrapper IPs
This fixes a bug where chgdcpass was on the same IP as localsubdc, and
will avoid similar mistakes in future.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar  2 03:48:05 CET 2012 on sn-devel-104
2012-03-02 03:48:05 +01:00
Andrew Bartlett
89fb6da8d0 selftest: change plugin_dc to test using s3fs 2012-02-29 10:41:07 +01:00
Andrew Bartlett
8e8fde51b4 selftest: Do not run chgdcpass test on the main DC
If winbindd has it's password changed from under it, it becomes
grumpy.

Andrew Bartlett
2012-02-29 10:41:07 +01:00
Andrew Tridgell
645fcc5375 selftest: added a pipe on stdin in s3 child processes
this adds a pipe for STDIN in smbd, nmbd and winbindd when run in
selftest. This allows those processes to detect when they should exit
by looking for EOF on stdin.
2012-02-28 12:01:08 +01:00
Andrew Bartlett
dc677b3baf selftest: up the default log level in s3
This may help show more detail when our tests fail.

Andrew Bartlett
2012-02-27 11:16:05 +01:00
Andrew Bartlett
6f8f24c5f2 selftest: Do not skip environments that fail to start up
This is a regression in 70f4a96c68.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Feb 23 10:55:20 CET 2012 on sn-devel-104
2012-02-23 10:55:20 +01:00
Andrew Bartlett
dd479bd292 selftest: Fix selftest to check ADS functionalty again
This was found by looking over the lcov output on build.samba.org

The new have_ads() check also now dies if it cannot run smbd, to avoid
this in future.

Andrew Bartlett
2012-02-18 00:44:07 +01:00
Andrew Bartlett
6917575fe3 selftest: skip plugin_s4_dc if we do not have ADS 2012-02-16 15:21:10 +11:00
Andrew Bartlett
c006b9b898 selftest: skip targets that are not compiled in if we do not have ADS 2012-02-16 15:21:10 +11:00
Andrew Bartlett
212b3ec1a0 s3-selftest: Require SMB signing for ktest environment
This will help weed out session key errors in the krb5 code.

Andrew Bartlett
2012-02-16 15:21:10 +11:00
Andrew Bartlett
22a2c46f84 selftest: Do not start up an already-running test environment
Otherwise we may re-provision the dc just because we started it via s3member or s4member
first.

Andrew Bartlett
2012-02-16 15:21:10 +11:00
Andrew Bartlett
e1f9fb79c7 selftest: Make plugin_s4_dc set the cached environment correctly 2012-02-16 15:21:10 +11:00
Andrew Bartlett
70f4a96c68 selftest: Allow setup_env() to signal that an environment name is unknown
This will allow us to skip samba4 environments that may be mentioned in
the source3/selftest/tests.py file.

Andrew Bartlett
2012-02-13 04:41:05 +01:00
Andrew Bartlett
eecf2ac4c8 selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
Andrew Bartlett
965b83158d s3-selftest: Add test for posix large reads and writes
This includes encrypted reads and writes, both NTLM and kerberos.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan 28 00:13:57 CET 2012 on sn-devel-104
2012-01-28 00:13:56 +01:00
Andrew Bartlett
8a4b5cdfea s4-selftest: Add test of RPC to a netbios alias
This tries to ensure our netbios lookup code is still run.

Andrew Bartlett
2011-12-13 23:42:05 +01:00
Rusty Russell
08019a0973 tdb2: don't use TDB2 versions of test tdb files.
Now tdb2 handles tdb1 files, we don't need most of commit
5eecc85423 which added TDB2 versions of
all the testing tdbs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec 12 06:33:44 CET 2011 on sn-devel-104
2011-12-12 06:33:44 +01:00
Jelmer Vernooij
ce359c14f2 selftest: Drop broken and unused Kvm target. 2011-11-30 22:58:05 +01:00
Stefan Metzmacher
b94b7a2fe1 selftest/Samba4: pass '--machinepass' to 'samba-tool domain join'
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov 29 11:00:42 CET 2011 on sn-devel-104
2011-11-29 11:00:42 +01:00
Kai Blin
ef4bda5c76 s4 dns: Turn on internal DNS server during testing 2011-11-17 08:42:45 +01:00
Stefan Metzmacher
0be0da9650 selftest/Samba4: allow schema updates
metze
2011-11-15 09:46:30 +01:00
Andrew Bartlett
862b81791e selftest: Remove the 'all' environment as it is just too slow to start up
Instead we start the 'dc' environment, and other environments are available as:
make testenv SELFTEST_TESTENV=fl2003dc

Andrew Bartlett
2011-11-08 02:58:06 +01:00
Stefan Metzmacher
aa70b7e0fc selftest/Samba4: use "server signing = on" for now
Otherwise the smb2.compound test fails as it doesn't work
with signing yet.

metze
2011-11-03 16:55:11 +01:00
Jeremy Allison
8c6ff21782 The xcopy test is used in unusual ways (via a different uid). Ensure we can cope with this. 2011-10-28 12:16:43 -07:00
Jeremy Allison
80c3aa7d29 The xcopy test requires "dos filemode=yes" as it opens with WRITE_OWNER. 2011-10-28 12:16:42 -07:00
Amitay Isaacs
7ca0bed38d s4-selftest: Add tests for RPC dnsserver
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-20 05:53:05 +02:00
Michael Adam
4874e1f5b3 selftest:Samba3: fix signature for check_or_start() 2011-10-18 20:58:26 +02:00
Michael Adam
dd6b413a57 selftest:Samba3: fix a message printed when starting winbindd 2011-10-18 20:58:26 +02:00
Andreas Schneider
031519cec9 selftest: Fix plugin_s4_dc configuration.
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 12 13:50:10 CEST 2011 on sn-devel-104
2011-10-12 13:50:10 +02:00
Stefan Metzmacher
f0cd3f62d0 selftest: run dfs tests on plugin_s4_dc
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct  8 03:18:54 CEST 2011 on sn-devel-104
2011-10-08 03:18:54 +02:00
Stefan Metzmacher
733457a94e selftest/Samba3: enable uid wrapper in nmbd, winbindd and smbd
metze

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Oct  6 13:49:05 CEST 2011 on sn-devel-104
2011-10-06 13:49:05 +02:00
Andrew Bartlett
8c33036a37 s4-subdomain more work on sub-domain join
we can now create a subdomain of an existing windows domain using:

  samba-tool domain join sub.domain.dns.name subdomain

The ordering of the creation of the key records is quite tricky,
especially for the NTDSDSA object

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-09-13 15:38:02 +10:00
Andrew Bartlett
4d74fb7d47 selftest: add test for subdomain support 2011-09-13 15:37:12 +10:00
Andreas Schneider
ae292ed180 s3-rpc_server: Handle services with multiple pipe names.
The configuration should only use the default pipe name to configure all
of them correctly.
2011-09-01 14:28:03 +02:00
Andrew Bartlett
1f181476b4 selftest: Allow a krb5.conf to be generated that covers multiple realms 2011-08-26 14:06:07 +02:00
Andrew Bartlett
43c0863333 set passdb backend in Samba4 make test environments too
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Aug 22 03:46:21 CEST 2011 on sn-devel-104
2011-08-22 03:46:21 +02:00
Andreas Schneider
0f4ee5d1b7 s3-lsasd: Listen on \PIPE\lsass.
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:24 -04:00
Andreas Schneider
d5ba5dec26 selftest: Enable testing of the lsa service daemon.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:03 -04:00
Simo Sorce
f9c7b59d3e selftest: Fix daemon testing to use the new syntax.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:03 -04:00
Stefan Metzmacher
81d3f92155 selftest:Samba4: test --domain-critical-only in provision_vampire_dc()
This way only only replicate critical objects during the initial join
as DC, then we'll replicate the whole domain while 'samba' is running.

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 14:07:50 CEST 2011 on sn-devel-104
2011-08-12 14:07:50 +02:00
Stefan Metzmacher
da7d22dade selftest:target/Samba4: use the correct configuration in setup_vampire_dc()
This allows "TDB_NO_FSYNC=1 make -j test TESTS=vampire" to work.

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-12 12:39:05 +02:00
Andrew Tridgell
6b3a12b0f4 s4-test: use standard process model for 'dc' server
this provides us with both 'standard' and 'single' process models in
selftest, ensuring that we test the standard process model in the
build farm

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Aug 12 11:06:50 CEST 2011 on sn-devel-104
2011-08-12 11:06:50 +02:00
Andreas Schneider
d53e3ecf08 selftest: Always test the spoolss deamon.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Aug 10 19:29:14 CEST 2011 on sn-devel-104
2011-08-10 19:29:14 +02:00
Andrew Bartlett
4379738e85 selftest: print %U in smbclient -L output to allow testing 2011-08-03 18:48:05 +10:00
Andrew Bartlett
4806eda36c selftest: use the s4 winbindd in plugin_s4_dc test
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andreas Schneider
9c5f2ec121 s3-rpc_server: Disable listening on tcpip ports by default. 2011-08-01 11:08:36 +02:00
Andreas Schneider
e0931a53c8 s3-torture: Run epmapper as daemon and the tests over ncalrpc. 2011-08-01 08:50:35 +02:00
Andrew Bartlett
8f13c84dce s3-selftest Add tests for 'map to guest = bad user'
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-29 04:24:07 +02:00
Andrew Bartlett
61cb2150cb selftest: explain how the message command test works 2011-07-29 04:24:06 +02:00
Björn Baumbach
e3fc1aba86 selftest: use "state directory" and "cache directory" options
instead of "state dir" and "cache dir"

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

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jul 21 10:06:32 CEST 2011 on sn-devel-104
2011-07-21 10:06:32 +02:00
Andrew Tridgell
e593939da1 samba-tool: fixed some more calls to samba_tool join to be 'domain join' 2011-07-21 11:44:38 +10:00
Andrew Bartlett
702e35ac6d selftest: Pass lsass and epmapper across the named pipe proxy to the AD server
Eventually we will have just one end point mapper, but for now we need
to use the source4 one for the AD tests.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:14 +10:00
Andrew Tridgell
18995cde5c s4-fault: changed to use %d for PID, instead of %PID%
this matches the s3 behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13 12:51:05 +02:00
Stefan Metzmacher
2ba1444fbd selftest/Samba4: use "state dir" for persistent files
metze
2011-07-12 14:58:38 +02:00
Stefan Metzmacher
1c5390e39f selftest/Samba4: setup "state dir" and "cache dir"
metze
2011-07-12 14:58:37 +02:00
Michael Adam
b6f25650f1 selftest: eliminate perl warnings (my $cmd masks earlier definition...) 2011-07-04 20:02:07 +02:00
Stefan Metzmacher
d7cc8571f7 s4:selftest: test ntvfs.cifs with s4u2proxy
Pair-Programmed-With: Björn Baumbach <bb@sernet.de>

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jun 24 20:35:30 CEST 2011 on sn-devel-104
2011-06-24 20:35:30 +02:00
Stefan Metzmacher
a7d2492cf7 selftest/Samba4: correctly upper case the netbiosname variable
metze
2011-06-24 19:09:28 +02:00
Andrew Bartlett
abb72170e4 selftest: Remove %PROG% argument from 'panic action'
The debugger or script will need to work out the binary from the PID,
as %PROG% support was lost when the setup_fault() code was merged
between Samba3 and Samba4.

Andrew Bartlett
2011-06-24 13:08:04 +10:00
Rusty Russell
5eecc85423 tdb2: create tdb2 versions of various testing TDBs.
Soon, TDB2 will handle tdb1 files, but until then, we substitute.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:36 +02:00
Andrew Bartlett
bb00f97a82 s3-selftest Add a test for 'message command'
This also provides us a way to test that the -n option to smbclient
works, as that becomes part of the filename.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Tridgell
0e1d7eb429 s4-testparm: testparm is now part of samba_tool 2011-06-06 12:26:11 +10:00
Matthieu Patou
fae229aa3d selftest: Allow to test samba4 with ACL on read set
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-05-21 14:39:12 +04:00
Andrew Bartlett
a2caad24a1 selftest: don't override just-added username in plugin_s4_dc test
This will allow us to test a user added via smbpasswd as well as the
administrator added by provision.

Andrew Bartlett
2011-05-09 05:06:12 +02:00
Andrew Bartlett
f4d9b40d7f selftest: Make the ncalrpc dir common between Samba4 and Samba3.
This also avoids creating the directory, as the startup routines will
create it with the correct permissions.

Andrew Bartlett
2011-05-08 19:00:29 +02:00
Andrew Bartlett
eae061293b selftest: Add plugin_s4_dc environment
This environment uses pdb_samba4 and auth_samba4 to plug these
critical subsystems into a mixed Samba3/Samba4 DC, in a similar way to
the 'Franky' proposal.

Andrew Barltett
2011-05-08 19:00:28 +02:00
Andrew Bartlett
3eb1023d52 selftest Use die() less often, as it fails to allow cleanup 2011-05-08 10:56:27 +02:00
Andrew Bartlett
3542bd324e selftest: Restore the s3member environment by avoiding smbcacls
This removes the need for acls on the filesystem for simple domain
member tests.  ACL tests should be written at some point...

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-04-29 16:38:16 +10:00
Andrew Bartlett
1c5cc4a2d1 s4-selftest: Don't use a hardcoded target DC name
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 28 07:34:31 CEST 2011 on sn-devel-104
2011-04-28 07:34:31 +02:00
Andrew Bartlett
123097e879 selftest: Print a better warning warning message when smbcacls fails.
These tests can't run on systems without posix ACLs.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 28 06:18:59 CEST 2011 on sn-devel-104
2011-04-28 06:18:59 +02:00
Andrew Bartlett
b44f4325bb selftest: Don't die() when the join fails
This kills off everything without a proper shutdown, and is difficult
to debug.

Andrew Bartlett
2011-04-28 05:30:21 +02:00
Andrew Bartlett
fb5e1f4a65 selftest: s3member admember test to confirm s3/s4 interopability
This checks that Samba3 joins Samba4 correctly, and allows NTLM and
Kerberos logons from a live Samba4 DC.

This needs the common krb5.conf generation logic, and because we now
override KRB5_CONFIG we must update ktest to have a valid krb5.conf.

Based on an original patch by metze

Andrew Bartlett
2011-04-28 05:30:21 +02:00
Andrew Bartlett
ab46d66101 selftest: Make overwrite of $env->{target} optional
This allows a target to be a mix of Samba3 and Samba4, and chose it's
own backend for check_env and get_log_env.

Andrew Bartlett
2011-04-28 05:30:21 +02:00
Andrew Bartlett
aa8406cadf s3-selftest: Use default name resolution methods (now that dns is emulated)
Now that we have emulated DNS, we can test Samba with the default name
resolve order.

Andrew Bartlett
2011-04-28 05:30:20 +02:00
Andrew Tridgell
ea95e0967b s3-test: log to stdout for smbd/nmbd/winbindd
this prevents error messages from logfile creation before smb.conf is
read

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Apr 28 05:29:19 CEST 2011 on sn-devel-104
2011-04-28 05:29:19 +02:00
Andrew Bartlett
2a9a9454e8 selftest: Make bindir_path much less complex
There is no need to pass it as a function pointer, just put it in 'Samba.pm'.

Andrew Bartlett
2011-04-27 11:22:07 +10:00
Andrew Bartlett
c18954775e libcli/dns Improve dns_hosts_file, using Samba3's struct dns_rr_srv
By reworking the 'fake DNS' file to use struct dns_rr_srv it should be
possible to emulate that resolver layer as well as the Samba4
sockaddr_storage* based layer.  This will then give us a common DNS
emulation for 'make test'.

Andrew Bartlett
2011-04-26 17:16:34 +10:00
Andrew Bartlett
dfb490d551 selftest Consolidate server wall clock time limits
This helps ensure that we don't have the Samba3 servers stop before
the full make test is finished.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 19 09:03:07 CEST 2011 on sn-devel-104
2011-04-19 09:03:07 +02:00
Andrew Bartlett
5189cfca4e selftest: move warning about invalid environments up to selftest.pl 2011-04-19 16:13:42 +10:00
Andrew Bartlett
790ceec78b s4-selftest Rename Samba4 'member' test environment to s4member
This will avoid a conflict with the s3 'member' environment.

Andrew Bartlett
2011-04-19 14:26:59 +10:00
Andrew Bartlett
55cb125312 s4-selftest: Move Samba4 test interfaces out of the way of the Samba3 tests.
This avoids a conflict when we merge the test suites.
2011-04-19 14:26:59 +10:00
Andrew Bartlett
148efda795 s3-selftest Fix interface localktest6 listens on.
Andrew Bartlett
2011-04-19 14:26:59 +10:00
Andrew Bartlett
9000188fb4 selftest Add combined 'Samba' target module
To work around environment variable handling, the initialisation of
NSS_WRAPPER_WINBIND_SO_PATH is pushed in to Samba3.pm (the s3 autoconf
build still overrides this)

Andrew Bartlett
2011-04-19 14:26:59 +10:00
Andrew Bartlett
aed450df0b s4-selftest: Avoid duplicating the servers IP in the provision() sub arguments.
This should make it easier to change the IP address.

Andrew Bartlett
2011-04-19 14:26:58 +10:00
Andrew Bartlett
36d4bbfeef s3-selftest Rename s3 DC environment to s3dc
This should avoid a clash with the s4 DC environment in a future
combined 'make test'.

Andrew Bartlett
2011-04-19 14:26:58 +10:00
Andrew Bartlett
8f58b13579 s4-selftest: Stop creating netbios aliases everywhere
This reduces some of the clutter when we have quite so many server
configurations starting.

The one case that actually needs an alias (dc environment for the
test_nmblookup.sh test) will still keep it.

Andrew Bartlett
2011-04-19 14:26:58 +10:00
Andrew Bartlett
1870d25495 selftest Add binary mappings for samba3 selftest
This will help us have a top level 'make test', working around the
fact that the --eanble-s3build has different names for some of these
binaries, without fixing the names forever (we can just change the
mapping later).

Andrew Bartlett
2011-04-16 11:43:04 +02:00
Andrew Bartlett
831955ddf2 selftest: Provide a single bindir_path function across all targets
This will allow a mapping to be made between things like smbtorture4
-> smbtorture that is correct for the different build environments.

Andrew Bartlett
2011-04-16 11:43:04 +02:00
Andrew Bartlett
bb15aa58bc s3/selftest Tear down the environment if we fail to connect
This removes the exit(1) that previously didn't tear down the
environment correctly, and instead just fails to set it up, allowing
the rest of the script handle that with more grace.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 12 01:53:37 CEST 2011 on sn-devel-104
2011-04-12 01:53:37 +02:00
Stefan Metzmacher
02c6f9d0d9 selftest:Samba4: setup DC_* variables in provision_rpc_proxy()
The "rpc_proxy" should behave like "member", just with a different
configuration.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Apr  7 15:52:25 CEST 2011 on sn-devel-104
2011-04-07 15:52:25 +02:00
Andrew Bartlett
4cdbb88c4b s3-selftest actually wait for smbclient to connect
This means that we actually have a working smbd.  The previous code didn't know if it worked or not, and so created flaky tests.

Andrew Bartlett
2011-04-07 14:35:36 +10:00
Andrew Bartlett
1862e904a8 s3-selftest Fix use of the 'fake DNS' file
This ensures we don't use netbios before the hosts file and that we do
fill in the fake DNS zone correctly for the way we invoke smbtorture4.
Currently this works because the realm in client.conf is "", if this
changes then this will need to change too (perhaps an additional
entry).

Andrew Bartlett
2011-04-07 14:35:36 +10:00
Andrew Bartlett
d84a8d5343 s3-selftest Add tests to show kerberos works across a password change
It is important that a machine account password change does not
invalidate existing tickets.

This is only for the default kerberos method with a password in
secrets.tdb.  The keytab based methods are still not tested.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr  6 05:24:48 CEST 2011 on sn-devel-104
2011-04-06 05:24:48 +02:00
Andrew Bartlett
747ebc118a s3-selftest names into DNS hosts file to avoid NBT lookups
NBT lookups cause trouble and variablity in 'make test', so it's much
better if we just use the fake DNS code.  This code is only used by
smbtorture4 at this time, but the other client tools are generally
told to contact by IP address.

We need to contact by name to test Kerberos, and this should make the
kerberos tests much more reliable.

Andrew Bartlett
2011-04-06 12:34:58 +10:00
Andrew Bartlett
6351dee4d8 s3-selftest Add testing of kerberos login
This uses a pre-calculated credentials cache, that should be valid
until 2036.

Andrew Bartlett
2011-04-04 19:48:57 +10:00
Andrew Bartlett
ffb6003302 s3-selftest Disable log rotation in 'make test' 2011-04-04 19:48:43 +10:00
Andrew Bartlett
c8bc7089f5 s3-selftest Add tests for security=server
Andrew Bartlett
2011-03-29 00:00:23 +02:00
Björn Baumbach
2bfe9d1772 s3:selftest: fix Samba3.pm deprecated idmap config
Replace deprecated idmap uid and gid option with new
idmap config * : range
2011-03-22 22:49:58 +01:00
Stefan Metzmacher
ce45027816 selftest/Samba3: use 'debug pid=yes'
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Mar 19 10:55:34 CET 2011 on sn-devel-104
2011-03-19 10:55:34 +01:00
Andreas Schneider
0a2251da54 selftest: Added ncalrpc dir to config.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:29 +01:00
Stefan Metzmacher
e90d5ab561 selftest/target/Samba4: regenerate the krb5.conf after the rodc join
The RODC should be used as KDC, which will forward requests to the RWDC
if required.

metze
2011-03-04 21:19:05 +01:00
Stefan Metzmacher
a8b3958f38 selftest/target/Samba4: splitout a mk_krb5_conf() function
metze
2011-03-04 21:19:05 +01:00
Andrew Bartlett
6c1ce36ec9 selftest pass in srcdir into Samba3 target module 2011-02-22 16:20:10 +11:00
Andrew Bartlett
a82d9e4e72 s3-selftest convert tests.sh to python
This should allow us a much better chance of invoking the subunit
wrappers in the right way, at the right level.

Andrew Bartlett
2011-02-22 16:20:10 +11:00
Andrew Bartlett
1650da8a99 Add tests for various s3 auth modes 2011-02-22 14:50:14 +11:00
Andrew Tridgell
b038aca5c8 s4-loadparm: removed "setup directory" option
the correct setup directory is known at both build time and install
time using dyn_SETUPDIR, so we no longer have any need to override it

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:00 +11:00
Andrew Tridgell
6484da4859 s4-test: allow make test to work from top level directory
this fixes the path assumptions in Samba4 make test to allow it to
work from the top level directory.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:00 +11:00
Andreas Schneider
d0d5d59943 s3-smbd: Disable the endpoint mapper by default. 2011-02-02 12:44:20 +01:00
Jeremy Allison
86d06ad103 Fix "make test" - ensure nmbd runs with -S (log to stdout).
Also ensure nmbd socket directory isn't created (nmbd will create it).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 11 00:30:52 CET 2011 on sn-devel-104
2011-01-11 00:30:52 +01:00
Jeremy Allison
04987bd843 Explicitly set "nmbd: socket dir" in the test environment.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan  8 07:17:22 CET 2011 on sn-devel-104
2011-01-08 07:17:22 +01:00
Günther Deschner
a43a1d9226 s3-selftest: support differing VFSLIBDIR in autoconf and waf build.
With this change make test in the s3 waf build (w/o s4 smbtorture yet) works!

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 13 13:06:05 CET 2010 on sn-devel-104
2010-12-13 13:06:05 +01:00
Kai Blin
1f2518df5a s4 libcli: Add libcli_echo lib and torture test
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Thu Dec  9 23:57:03 CET 2010 on sn-devel-104
2010-12-09 23:57:03 +01:00
Günther Deschner
6a93be43dc s3-selftest: add WIN40 directory to print$ share.
Guenther
2010-11-29 15:35:19 +01:00
Matthieu Patou
e5eaed0180 remove useless debug message :-) 2010-11-27 17:18:19 +01:00
Jelmer Vernooij
3483adaf0a selftest: Allow using ldb* utilities from system. 2010-11-27 03:48:20 +01:00
Matthieu Patou
90aa16122e Make log level of the server configurable in make test
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Tue Nov 23 22:36:37 CET 2010 on sn-devel-104
2010-11-23 22:36:37 +01:00
Jeremy Allison
ac0ffba004 Add test that detects problems in the SMB signing code when run through cli_write() (which doesn't use the new async methods).
Unfortunately, and I think due to the socket wrapper code, this doesn't
detect the failure on the build farm, but running the RW-SIGNING test
separately against a Samba or Windows server using signing does.

Jeremy.
2010-11-10 18:07:51 -08:00
Jeremy Allison
092507c65a Ensure we always have a mapped group for "Domain Users".
Needed for DC tests to pass with bugfix for bug #7777.

Jeremy.
2010-11-08 13:39:51 -08:00
Andrew Bartlett
e77e162b97 s4-selftest fix indentation 2010-11-08 18:15:23 +11:00
Andrew Tridgell
a162b1a2d8 s4-join: switch over to the new DC join in make test 2010-11-06 14:36:26 +11:00