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

220 Commits

Author SHA1 Message Date
Andrew Tridgell
540d197e49 s4-test: we don't need -s set for samba_dnsupdate
this is now handled by SMB_CONF_PATH

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-19 18:21:42 +10:00
Andreas Schneider
61106c0568 s3-selftest: Don't log to stdout, use logfiles instead.
The logging to the logfiles is more verbose and they can be found in
./st/dc/logs. If you still want to log to stdout start selftest with:

SMBD_OPTIONS="-S -d10" make selftest
2010-03-29 11:35:07 +02:00
Günther Deschner
d3a22fc62b s3-selftest: set "lpq cache time = 0" in server configuration.
This fixes currently broken spoolss tests.

Guenther
2010-03-26 23:01:19 +01:00
Andrew Tridgell
525a4fb2c4 util: on FreeBSD true is in /usr/bin. Use execvp to find it 2010-03-26 19:03:22 +11:00
Günther Deschner
f84f653066 s3-selftest: move printing config to global section.
Guenther
2010-03-25 00:55:13 +01:00
Günther Deschner
20d73f768d s3-selftest: rearrange uid/gid calculation to achieve correct membership.
Guenther
2010-03-19 10:23:39 +01:00
Günther Deschner
a949c70ed8 s3-selftest: fix Samba3.pm provisioning after uid/gid changes.
Guenther
2010-03-18 15:12:07 +01:00
Günther Deschner
05cad2ea2f s3-selftest: make sure we do not have duplicate uids/gids in nsswrapper.
Also make sure we only add root user when needed, Jeremy please check.

Guenther
2010-03-18 15:08:27 +01:00
Günther Deschner
3efaf5e6ba s3-selftest: setup initial eventlog infrastructure.
Guenther
2010-03-17 22:59:20 +01:00
Andrew Bartlett
ca67768b66 s4:selftest Add file based DNS resolver to selftest environment
This will in future allow us to test 'net vampire' in the test
environment, using the file based DNS lookups to avoid us hitting real
DNS.
2010-03-12 13:22:21 +11:00
Endi S. Dewata
02533c9f1b s4:provision - Use netbios name for FDS instance name.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-03-02 14:07:01 +11:00
Andrew Tridgell
394a7ceeeb s4-selftest: disable rndc and dns update in build farm 2010-02-23 13:48:21 +01:00
Andrew Bartlett
a8b2088a0e s4:selftest Add infrastructure for testing against an RPC proxy
This also changes the 'testenv' code to use a new environment 'all'
(we may wish to make other complex tests depend on this in future),
and exports more names in more namespaces.

Andrew Bartlett
2010-02-19 16:32:49 +11:00
Günther Deschner
34ad5da5cd s3-selftest: include addprinter/deleteprinter command.
Guenther
2010-02-18 02:27:04 +01:00
Andrew Tridgell
1e1b081189 s4-selftest: don't run rndc reload in selftest
We don't want rndc calls on the build farm
2010-02-11 21:04:15 +11:00
Matthieu Patou
3471d3677a selftest-s4: set the posix:eadb at the global level 2010-01-21 07:11:21 +13:00
Kai Blin
a4f21d5dc8 s3 selftest: Allow the enumeration of users and groups
This fixes the WINBINDD_GETPWENT test.
2010-01-14 15:18:34 +01:00
Endi S. Dewata
e035433bab s4 - SID allocation using FDS DNA plugin 2009-11-02 16:36:54 +11:00
Andrew Tridgell
0fca2b078c s4-selftest: lower some of the timeouts during make test
This speeds up some of the delay based tests by a lot. There is no
need to have long delays during testing.
2009-10-23 15:38:54 +11:00
Andrew Bartlett
5255ba3c4f s4:selftest Confirm that there isn't a listener on the ldapi:// socket
This should help debug problems with 'make test' of the LDAP backend,
if a stray listener is still around.

Andrew Bartlett
2009-08-17 09:51:00 +10:00
Andrew Bartlett
f87811f6b3 s4:provision Rework provision-backend into provision
This removes a *lot* of duplicated code and the cause of much
administrator frustration.  We now handle starting and stopping the
slapd (at least for the provision), and ensure that there is only one
'right' way to configure the OpenLDAP and Fedora DS backend

We now run OpenLDAP in 'cn=config' mode for online configuration.

To test what was the provision-backend code, a new --ldap-dryrun-mode
option has been added to provision.  It quits the provision just
before it would start the LDAP binaries

Andrew Bartlett
2009-08-17 09:50:58 +10:00
Andrew Tridgell
ad542a630e Allow selection of the samba4 process model for 'make test'
To choose the process model, set the environment variable
SAMBA_PROCESS_MODEL to the desired model. This will allow us to enable
the standard process model for some machines in the build farm without
enabling it for all of them. I don't want to just enable it
universally as I am concerned with total memory using during some of
the tests.
2009-08-12 14:41:44 +10:00
Andrew Tridgell
0ae3912f32 print server log on stderr as well as to log file
I think we are missing some important messages from the server during
'make test' because we don't show the log file contents during
runs. This patch uses tee to put the log messages to stderr so we can
see any server messages associated with the test that caused them.
2009-08-12 14:38:55 +10:00
Andrew Bartlett
69fa901bca s4:selftest Don't start the slapd for the provision, only for the run
The provision-backend script now starts slapd for us

Andrew Bartlett
2009-08-12 10:01:49 +10:00
Andrew Bartlett
4921a5853b s4:selftest Make OpenLDAP guess it's own modules from now on
In the releases of OpenLDAP we require (2.4.17) it can guess this much
itself, so no need for us to do it.

Andrew Bartlett
2009-08-12 10:01:48 +10:00
Oliver Liebel
28bcdf5266 s4:provision Rework and further automate setup of OpenLDAP backend
heres the summary of all changes/extensions:

- Andrew Bartlett's patch to generate indext
- Howard Chu's idea to use nosync on the DB included, but made optional

- slaptest-path is not needed any more (slapd -Ttest is used instead)
and is therefore removed. slapd-path is now recommended when
openldap-backend is chosen.
its also used for olc-conversion

- slapd-detection is now always done by ldapsearch (ldb module),
looking anonymous for objectClass: OpenLDAProotDSE via our ldapi_uri.

- if ldapsearch was not successfull, (no slapd listening on our socket)
slapd is
started via special generated slapdcommand_prov  (ldapi_uri only)

- slapd-"provision-process" startup is done via pythons subprocess.

- the slapd-provision-pid is stored under paths.ldapdir/slapd_provision_pid.

- after provision-backend is finished:
--- slapd.pid is compared with our stored slapd_provision_pid.
if the are unique, slapd.pid will be read out, and the
slapd "provison"-process will be shut down.
--- proper slapd-shutdown is verified again with ldb-search -> ldapi_uri
-> rootDSE.
--- if the pids are different or one of the pid-files is missing, slapd
will not be shut down,
instead an error message is displayed to locate slapd manually
--- extended help-messages (relevant to slapd) are always displayed,
e.g. the commandline with which slapd has to be started when everythings
finished
(slapd-commandline is stored under paths.ldapdir/slapd_command_file.txt))

- upgraded the content of the mini-howto (howto-ol-backend-s4.txt)
2009-08-12 10:01:48 +10:00
Andrew Tridgell
fd43e0ee09 added a uid_wrapper library
This library intercepts seteuid and related calls, and simulates them
in a manner similar to the nss_wrapper and socket_wrapper
libraries. This allows us to enable the vfs_unixuid NTVFS module in
the build farm, which means we are more likely to catch errors in the
token manipulation.

The simulation is not complete, but it is enough for Samba4 for
now. The major areas of incompleteness are:

 - no emulation of setreuid, setresuid or saved uids. These would be
   needed for use in Samba3

 - no emulation of ruid changing. That would also be needed for Samba3

 - no attempt to emulate file ownership changing, so code that (for
   example) tests whether st.st_uid matches geteuid() needs special
   handling
2009-08-05 10:51:00 +10: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
Günther Deschner
9ac7e78041 s3-selftest: forward NSS_WRAPPER_WINBIND_SO_PATH env to tests.
Guenther
2009-06-08 11:03:07 +02:00
Günther Deschner
df167ee771 s3-selftest: Fix invalid /etc/group file used with nss_wrapper.
Found by torture test.

Guenther
2009-05-30 09:43:28 +02:00
Günther Deschner
7a5475f098 s3-selftest: use nss_wrapper.pl as "add user to group" and "delete user from group" script.
Guenther
2009-05-28 10:40:22 +02:00
Günther Deschner
e11f9b46c6 s3-selftest: add add and delete group scripts using nss_wrapper.
Guenther
2009-05-20 12:37:44 +02:00
Günther Deschner
94665adb48 s3-printing: Fix vlp testprinter application.
Jeremy, we cannot just access cache_path() here without calling lp_load and
friends as well as parsing configfile from the commandline in order to make
"make test/selftest" find the correct conffile with path, etc.

I just changed it to pass the target tdbfilename as an argument, ok ?

Guenther
2009-05-12 11:41:14 +02:00
Günther Deschner
6f4b5798c9 s3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.
Guenther
2009-05-08 00:46:54 +02:00
Jelmer Vernooij
79177c1d36 Specify explicit path to vlp, for those not having vlp in $PATH. 2009-04-22 23:56:35 +02:00
Kai Blin
2ee437e122 s4 selftest: Export the WINBINDD_SOCKET_DIR env var 2009-04-22 00:14:44 +02:00
Günther Deschner
18d475cea9 selftest: add a fake root user to nss_wrapper_passwd in s3.
Needed to make some server calls to get_root_nt_token() succeed.
make selftest/make test gurus, please check.

Guenther
2009-04-08 11:48:13 +02:00
Stefan Metzmacher
97a086d5c4 selftest/Samba3: Test smb signing against the member server
metze
2009-03-23 12:21:14 +01:00
Stefan Metzmacher
431fc718c1 selftest/Samba3: always use the same timeout for all servers
metze
2009-03-21 10:44:41 +01:00
Stefan Metzmacher
593ab6ac00 s4:selftest: rename SMBD_VALGRIND => SAMBA_VALGRIND
metze
2009-03-21 10:44:40 +01:00
Stefan Metzmacher
1ef206524d selftest/Samba3: use the same sequence of signals to shutdown samba3 as with the shell scripts
When we kill the timelimit process with SIGKILL, it can't kill its
children...

metze
2009-03-20 14:41:11 +01:00
Andrew Bartlett
022946d196 Make the 'modules.conf' generation in the LDAP selftest simpler
The versions of OpenLDAP that we require don't need us to specify the
location any more - slaptest knows this from it's build time.

Andrew Bartlett
2009-02-24 20:49:59 +11:00
Simo Sorce
ca24822234 Fix GDB_PROVISION mode 2009-02-23 13:33:39 -05:00
Stefan Metzmacher
c3baf1529d selftest/Samba4: pass down the kdc address down to provision_raw_*()
metze
2009-02-10 18:07:13 +01:00
Stefan Metzmacher
0d9531e2d3 selftest/Samba4: split out ldap specific stuff from provision_raw_*()
metze
2009-02-10 18:07:12 +01:00
Stefan Metzmacher
cfb9cbdf68 selftest/Samba4: split out share configurations of provision_raw*()
metze
2009-02-10 18:07:12 +01:00
Stefan Metzmacher
da12481df6 selftest/Samba4: split provision() into provision_raw_prepare() and provision_raw_run()
This functions will be reused soon for a Samba34.pm used by
a 'make selftest34'

metze
2009-02-10 18:06:49 +01:00
Stefan Metzmacher
f0e75ff363 selftest: s/SMBD/SAMBA/ in Samba.pm
metze
2009-02-10 11:47:24 +01:00
Stefan Metzmacher
76a2d068f5 selftest: allow "skip" as max runtime for smbd, nmbd and winbindd
metze
2009-02-10 11:47:02 +01:00
Stefan Metzmacher
bb88b03846 selftest: Samba3 protect against removing /*
metze
2009-02-10 11:47:01 +01:00
Stefan Metzmacher
3c1feb82c8 selftest: add target::Template
metze
2009-02-10 11:47:01 +01:00
Stefan Metzmacher
76db6f15dc selftest/Samba3: use the same logic for make test and make selftest
See also commit 484c4a5955

metze
2009-02-04 09:25:36 +01:00
Stefan Metzmacher
a5f9816263 selftest: don't use hardcoded path to nmblookup in Samba4.pm
metze
2009-02-03 16:31:03 +01:00
Stefan Metzmacher
40b67c3426 selftest: pass down the path to python for provisioning samba4
metze
2009-01-30 20:39:44 +01:00
Stefan Metzmacher
52a49b448e selftest: allow environment options
We support "local" and "client" (default) now.
We can decide if we want to run a client against the server
(with a special client.conf) or if we want to run tests localy
on the server with the same config as the server.

metze
2009-01-30 09:36:53 +01:00
Stefan Metzmacher
439172dc06 selftest: add "member" environment for Samba3
metze
2009-01-29 10:39:06 +01:00
Stefan Metzmacher
67bf7a2396 selftest: fix Samba3 bugs
metze
2009-01-29 10:31:48 +01:00
Stefan Metzmacher
9f8d80c699 selftest: Samba4 remove unused variable
metze
2009-01-28 22:17:24 +01:00
Stefan Metzmacher
6a41a2de8d selftest: abstract Samba3 provision a bit
metze
2009-01-28 21:01:49 +01:00
Stefan Metzmacher
8b7c66512d s3:selftest: fix 'make selftest'
metze
2009-01-28 17:32:50 +01:00
Stefan Metzmacher
db7ee3733f s3: try to make 'make selftest' work again
metze
2009-01-28 10:07:12 +01:00
Stefan Metzmacher
6f6533aa81 selftest: add --exeext parameter
metze
2009-01-21 13:35:36 +01:00
Stefan Metzmacher
5a18607a3b selftest:Samba4: add bindir_path() utility function to construct the binary pathes
metze
2009-01-21 13:35:35 +01:00
Andrew Bartlett
18ef32f4ce s4:selftest: lower debug level for slapd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Jelmer Vernooij
069a6f0e4b Disable lanman authentication by default in Samba 4. 2008-10-31 15:07:34 +01:00
Stefan Metzmacher
6bc9fb887f selftest: move gdb_* and valgrind_* scripts to selftest/
metze
2008-10-28 12:20:59 +01:00
Jelmer Vernooij
0e36ffc675 selftest.pl: Silence verbose tdbsam output. 2008-10-23 16:42:45 +02:00
Jelmer Vernooij
0fd0fc75c4 Merge branch 'master' of ssh://git.samba.org/data/git/samba into selftest
Conflicts:
	selftest/selftest.pl
2008-10-11 03:12:21 +02:00
Jelmer Vernooij
182a0e3490 Move selftest code to top-level. 2008-09-18 19:51:03 +02:00