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

359 Commits

Author SHA1 Message Date
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