ira/wip.git
12 years agoselftest: mark smb2 tests knownfail failing in 3.6
Gregor Beck [Wed, 29 Feb 2012 06:57:52 +0000 (07:57 +0100)]
selftest: mark smb2 tests knownfail failing in 3.6

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:torture: avoid reporting error on failure of smb2.ioctl tests
Gregor Beck [Wed, 29 Feb 2012 10:02:20 +0000 (11:02 +0100)]
s4:torture: avoid reporting error on failure of smb2.ioctl tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:torture: avoid reporting error on failure of smb2.getinfo test
Gregor Beck [Tue, 28 Feb 2012 13:19:49 +0000 (14:19 +0100)]
s4:torture: avoid reporting error on failure of smb2.getinfo test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:torture: avoid reporting error on failure of smb2.setinfo test
Gregor Beck [Tue, 28 Feb 2012 11:53:29 +0000 (12:53 +0100)]
s4:torture: avoid reporting error on failure of smb2.setinfo test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:torture: avoid reporting error on failure of smb2.streams tests
Gregor Beck [Tue, 28 Feb 2012 11:54:35 +0000 (12:54 +0100)]
s4:torture: avoid reporting error on failure of smb2.streams tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:torture: avoid reporting error on failure of smb2.acls tests
Gregor Beck [Tue, 28 Feb 2012 11:46:41 +0000 (12:46 +0100)]
s4:torture: avoid reporting error on failure of smb2.acls tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:smbd: keep 'num_files' and 'files' directly under smbd_server_connection
Stefan Metzmacher [Sat, 3 Mar 2012 04:44:16 +0000 (05:44 +0100)]
s3:smbd: keep 'num_files' and 'files' directly under smbd_server_connection

The plan is to have files_struct as some kind of low level
abstraction for a smb1/smb2 opens, that can be used by SMB_VFS modules.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Mar  6 23:04:01 CET 2012 on sn-devel-104

12 years agos3:smbd: keep 'num_connections' and 'connections' directly under smbd_server_connection
Stefan Metzmacher [Sat, 3 Mar 2012 04:43:31 +0000 (05:43 +0100)]
s3:smbd: keep 'num_connections' and 'connections' directly under smbd_server_connection

The plan is to have connection_struct as some kind of low level
abstraction for a smb1/smb2 tree connects, that can be used by SMB_VFS modules.

metze

12 years agos3:smbd: keep 'num_users' and 'users' directly under smbd_server_connection
Stefan Metzmacher [Sat, 3 Mar 2012 04:41:43 +0000 (05:41 +0100)]
s3:smbd: keep 'num_users' and 'users' directly under smbd_server_connection

The plan is to have users_struct as some kind of low level
abstraction for a smb1/smb2 session, that can be used by SMB_VFS modules.

metze

12 years agos3:msdfs: set the 'cnum' field to invalid for faked connection_structs
Stefan Metzmacher [Sat, 3 Mar 2012 05:19:28 +0000 (06:19 +0100)]
s3:msdfs: set the 'cnum' field to invalid for faked connection_structs

metze

12 years agos4 dns: Fix TCP handling in the DNS server
Kai Blin [Tue, 6 Mar 2012 07:49:16 +0000 (08:49 +0100)]
s4 dns: Fix TCP handling in the DNS server

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Mar  6 21:17:19 CET 2012 on sn-devel-104

12 years agos3: Move a talloc_strdup out of the main code path
Volker Lendecke [Mon, 5 Mar 2012 15:56:53 +0000 (16:56 +0100)]
s3: Move a talloc_strdup out of the main code path

This is only used for AS_GUEST requests

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Mar  6 14:29:50 CET 2012 on sn-devel-104

12 years agos3: Fix some format string warnings
Volker Lendecke [Sat, 3 Mar 2012 20:37:13 +0000 (21:37 +0100)]
s3: Fix some format string warnings

We were printing nmb->header.name_trn_id with %hu, which denotes a
short. However, header.name_trn_id is an int for the better or
worse.

12 years agopolicy/python: Move python binding tests to standard location.
Jelmer Vernooij [Mon, 5 Mar 2012 23:46:55 +0000 (00:46 +0100)]
policy/python: Move python binding tests to standard location.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Mar  6 02:26:29 CET 2012 on sn-devel-104

12 years agoselftest/tests.py: Fix name of selftest.py for benefit of --load-list.
Jelmer Vernooij [Mon, 5 Mar 2012 23:39:11 +0000 (00:39 +0100)]
selftest/tests.py: Fix name of selftest.py for benefit of --load-list.

12 years agoselftest.py: Only run teardown_all when actually relevant.
Jelmer Vernooij [Mon, 5 Mar 2012 23:38:54 +0000 (00:38 +0100)]
selftest.py: Only run teardown_all when actually relevant.

12 years agos3-rpc_server: Remove remaining code for embedded endpoint mapper
Andrew Bartlett [Sat, 3 Mar 2012 01:49:10 +0000 (12:49 +1100)]
s3-rpc_server: Remove remaining code for embedded endpoint mapper

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Mar  5 23:14:33 CET 2012 on sn-devel-104

12 years agos3-rpc_server: Only init and register embedded RPC services in dcesrv_ep_setup()
Andrew Bartlett [Sun, 4 Mar 2012 23:59:01 +0000 (10:59 +1100)]
s3-rpc_server: Only init and register embedded RPC services in dcesrv_ep_setup()

This consults the two definitions for embedded, that is if the deamon is forking
or if the rpc_server:<interface> line is set to embedded.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3: Fix a "Invalid (state->nread >= 0)" warning
Volker Lendecke [Mon, 5 Mar 2012 14:56:55 +0000 (15:56 +0100)]
s3: Fix a "Invalid (state->nread >= 0)" warning

Both read_from_internal_pipe and tstream_readv_pdu_queue_recv return
ssize_t.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 17:38:16 CET 2012 on sn-devel-104

12 years agos3: Move the drain_socket on error to reply_write_and_X
Volker Lendecke [Mon, 5 Mar 2012 14:40:49 +0000 (15:40 +0100)]
s3: Move the drain_socket on error to reply_write_and_X

That's the only case where this can happen, so we should not clutter the main
code path.

12 years agos3: Use "goto out;" in reply_write_and_X
Volker Lendecke [Mon, 5 Mar 2012 14:47:52 +0000 (15:47 +0100)]
s3: Use "goto out;" in reply_write_and_X

12 years agos3: Remove "size" param from switch_message
Volker Lendecke [Mon, 5 Mar 2012 12:28:07 +0000 (13:28 +0100)]
s3: Remove "size" param from switch_message

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 15:13:49 CET 2012 on sn-devel-104

12 years agos3: Remove "size" param from smb_dump
Volker Lendecke [Mon, 5 Mar 2012 12:28:07 +0000 (13:28 +0100)]
s3: Remove "size" param from smb_dump

12 years agos3-lsasd: Fix debug messages on registration failure
Andrew Bartlett [Sat, 3 Mar 2012 01:18:21 +0000 (12:18 +1100)]
s3-lsasd: Fix debug messages on registration failure

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 09:50:17 CET 2012 on sn-devel-104

12 years agoselftest: Reduce declarations of smbclient_auth tests by moving into a loop
Andrew Bartlett [Mon, 5 Mar 2012 03:52:36 +0000 (14:52 +1100)]
selftest: Reduce declarations of smbclient_auth tests by moving into a loop

12 years agoselftest: run smbtorture_s3 tests against the ntvfs file server
Andrew Bartlett [Mon, 5 Mar 2012 03:28:15 +0000 (14:28 +1100)]
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

12 years agoselftest: Reduce time in cleanup loop, try waitpid on all 3 children
Andrew Bartlett [Mon, 5 Mar 2012 00:12:00 +0000 (11:12 +1100)]
selftest: Reduce time in cleanup loop, try waitpid on all 3 children

12 years agoselftest: start to run more dcerpc tests against plugin_s4_dc
Andrew Bartlett [Sun, 4 Mar 2012 23:46:23 +0000 (10:46 +1100)]
selftest: start to run more dcerpc tests against plugin_s4_dc

12 years agoselftest: forward rpcecho to Samba4 in plugin_s4_dc
Andrew Bartlett [Sun, 4 Mar 2012 23:34:30 +0000 (10:34 +1100)]
selftest: forward rpcecho to Samba4 in plugin_s4_dc

12 years agoselftest.run: Factor out read_testlist_file and open_file_or_pipe.
Jelmer Vernooij [Mon, 5 Mar 2012 03:05:35 +0000 (04:05 +0100)]
selftest.run: Factor out read_testlist_file and open_file_or_pipe.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Mar  5 05:42:19 CET 2012 on sn-devel-104

12 years agoselftest.run: Factor out exported_envvars_str.
Jelmer Vernooij [Mon, 5 Mar 2012 02:49:50 +0000 (03:49 +0100)]
selftest.run: Factor out exported_envvars_str.

12 years agoselfclient.client: Factor out write_clientconf.
Jelmer Vernooij [Mon, 5 Mar 2012 02:45:57 +0000 (03:45 +0100)]
selfclient.client: Factor out write_clientconf.

12 years agoselftest.run: Factor out expand_command_run.
Jelmer Vernooij [Mon, 5 Mar 2012 02:39:57 +0000 (03:39 +0100)]
selftest.run: Factor out expand_command_run.

12 years agoselftest.run: Factor out expand_command_list.
Jelmer Vernooij [Mon, 5 Mar 2012 02:27:40 +0000 (03:27 +0100)]
selftest.run: Factor out expand_command_list.

12 years agoselftest: Factor out expand_environment_strings.
Jelmer Vernooij [Mon, 5 Mar 2012 02:20:13 +0000 (03:20 +0100)]
selftest: Factor out expand_environment_strings.

12 years agos3-ctdb: Enable CTDB readonly support only if CTDB supports it
Amitay Isaacs [Tue, 21 Feb 2012 06:30:53 +0000 (17:30 +1100)]
s3-ctdb: Enable CTDB readonly support only if CTDB supports it

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar  5 02:47:36 CET 2012 on sn-devel-104

12 years agodbwrap_ctdb: only fetch a read-only copy if we had a record already.
Rusty Russell [Fri, 3 Feb 2012 00:00:54 +0000 (11:00 +1100)]
dbwrap_ctdb: only fetch a read-only copy if we had a record already.

Because revoking read-only copies of records is expensive, we only
want ctdbd to do it for high-turnover records.  A basic heuristic is
that if we don't find a local copy of the record, don't ask for a
read-only copy.

The fetch itself will cause ctdbd to migrate the record, so eventually
we will have a local copy.  Next time it gets migrated away, we'll
call ctdbd_fetch() with local_copy = true.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoctdbd_conn: fetch read-only copies of records.
Rusty Russell [Thu, 2 Feb 2012 23:54:53 +0000 (10:54 +1100)]
ctdbd_conn: fetch read-only copies of records.

This means we try to get a read-only copy of a record, which we can
then place in the local tdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agodbwrap_ctdb: handle read-only records.
Rusty Russell [Thu, 2 Feb 2012 23:53:27 +0000 (10:53 +1100)]
dbwrap_ctdb: handle read-only records.

The new read-only record flags make determining if we can use a record
a bit more complex, so extract it into its own function.

The OLD logic was:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it.

The new logic is:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it IF we only
   want read-only access, OR there are no read-only delegations.
3) If we are not dmaster, we can only use it if we want read-only
   access and it is marked as a read-only copy.

This logic is unused until the next patches which begin to ask
for read-only copies of records.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoselftest: remove unused config.h check
Andrew Bartlett [Fri, 2 Mar 2012 02:37:49 +0000 (13:37 +1100)]
selftest: remove unused config.h check

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 01:10:01 CET 2012 on sn-devel-104

12 years agos3-smbd: vuser and session_info cannot be NULL here
Andrew Bartlett [Sun, 4 Mar 2012 20:47:50 +0000 (07:47 +1100)]
s3-smbd: vuser and session_info cannot be NULL here

The callers always supply it. (this is a hold-over from the
security=share removal).

Andrew Bartlett

12 years agos3-rpc_server: consolidate rpc server init routines
Andrew Bartlett [Fri, 2 Mar 2012 05:11:55 +0000 (16:11 +1100)]
s3-rpc_server: consolidate rpc server init routines

This uses a helper function to reduce duplication.

Andrew Bartlett

12 years agos3-auth Add make_session_info_from_pw to avoid multiple getpwnam() calls
Andrew Bartlett [Fri, 3 Feb 2012 07:19:36 +0000 (18:19 +1100)]
s3-auth Add make_session_info_from_pw to avoid multiple getpwnam() calls

12 years agos3-auth: Remove security=share (depricated since 3.6).
Andrew Bartlett [Fri, 3 Feb 2012 07:03:10 +0000 (18:03 +1100)]
s3-auth: Remove security=share (depricated since 3.6).

This patch removes security=share, which Samba implemented by matching
the per-share password provided by the client in the Tree Connect with
a selection of usernames supplied by the client, the smb.conf or
guessed from the environment.

The rationale for the removal is that for the bulk of security=share
users, we just we need a very simple way to run a 'trust the network'
Samba server, where users mark shares as guest ok.  This is still
supported, and the smb.conf options are documented at
https://wiki.samba.org/index.php/Public_Samba_Server

At the same time, this closes the door on one of the most arcane areas
of Samba authentication.

Naturally, full user-name/password authentication remain available in
security=user and above.

This includes documentation updates for username and only user, which
now only do a small amount of what they used to do.

Andrew Bartlett

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SHARE       |
                  |    security=share    |
                  |                      |
                  |                      |
                  |       5 March        |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______

12 years agos3:smbd/globals.h: remove unused pollfd pointer
Stefan Metzmacher [Sat, 3 Mar 2012 04:38:46 +0000 (05:38 +0100)]
s3:smbd/globals.h: remove unused pollfd pointer

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar  4 23:18:10 CET 2012 on sn-devel-104

12 years agoselftest.py: Use testtools TestCase class.
Jelmer Vernooij [Sun, 4 Mar 2012 17:00:54 +0000 (18:00 +0100)]
selftest.py: Use testtools TestCase class.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar  4 19:38:25 CET 2012 on sn-devel-104

12 years agoselftest.py: Add dummy init file (required to run tests).
Jelmer Vernooij [Sun, 4 Mar 2012 15:53:59 +0000 (16:53 +0100)]
selftest.py: Add dummy init file (required to run tests).

12 years agoselftest.pl: Remove unused --verbose option.
Jelmer Vernooij [Sun, 4 Mar 2012 15:50:28 +0000 (16:50 +0100)]
selftest.pl: Remove unused --verbose option.

12 years agoselftest.py: Remove unused --verbose option.
Jelmer Vernooij [Sun, 4 Mar 2012 15:50:21 +0000 (16:50 +0100)]
selftest.py: Remove unused --verbose option.

12 years agoselftest.py: Remove unused code, reconcile signal handlers.
Jelmer Vernooij [Sun, 4 Mar 2012 15:49:30 +0000 (16:49 +0100)]
selftest.py: Remove unused code, reconcile signal handlers.

12 years agoselftest.py: Fix handling of boolean options.
Jelmer Vernooij [Sun, 4 Mar 2012 15:39:43 +0000 (16:39 +0100)]
selftest.py: Fix handling of boolean options.

12 years agoselftest.py: Fix signal handling.
Jelmer Vernooij [Sun, 4 Mar 2012 15:32:56 +0000 (16:32 +0100)]
selftest.py: Fix signal handling.

12 years agoRun selftest.py tests.
Jelmer Vernooij [Sun, 4 Mar 2012 15:30:26 +0000 (16:30 +0100)]
Run selftest.py tests.

12 years agoselftest: Now runs again for tests that use environment 'none'.
Jelmer Vernooij [Sun, 4 Mar 2012 15:22:34 +0000 (16:22 +0100)]
selftest: Now runs again for tests that use environment 'none'.

12 years agoselftest.target: Add NoneTarget.
Jelmer Vernooij [Sun, 4 Mar 2012 15:01:18 +0000 (16:01 +0100)]
selftest.target: Add NoneTarget.

12 years agoselftest.py: Finish conversion to python - now loads without syntax errors.
Jelmer Vernooij [Sun, 4 Mar 2012 14:11:36 +0000 (15:11 +0100)]
selftest.py: Finish conversion to python - now loads without syntax errors.

12 years agoselftest.testlist: Add RestrictedTestManager.from_path.
Jelmer Vernooij [Sun, 4 Mar 2012 13:55:39 +0000 (14:55 +0100)]
selftest.testlist: Add RestrictedTestManager.from_path.

12 years agoselftest: More work on conversion to Python.
Jelmer Vernooij [Sun, 4 Mar 2012 04:00:55 +0000 (05:00 +0100)]
selftest: More work on conversion to Python.

12 years agoselftest.testlist: Add docstrings.
Jelmer Vernooij [Sun, 4 Mar 2012 03:19:26 +0000 (04:19 +0100)]
selftest.testlist: Add docstrings.

12 years agoselftest.testlist: Add manager for restricted test lists.
Jelmer Vernooij [Sun, 4 Mar 2012 03:16:16 +0000 (04:16 +0100)]
selftest.testlist: Add manager for restricted test lists.

12 years agoAdd TestListFilter definition.
Jelmer Vernooij [Sun, 4 Mar 2012 03:01:28 +0000 (04:01 +0100)]
Add TestListFilter definition.

12 years agoselftest.testlist: Add read_testlist.
Jelmer Vernooij [Sun, 4 Mar 2012 02:24:10 +0000 (03:24 +0100)]
selftest.testlist: Add read_testlist.

12 years agoselftest.testlist: Add read_test_regexes.
Jelmer Vernooij [Sun, 4 Mar 2012 02:12:35 +0000 (03:12 +0100)]
selftest.testlist: Add read_test_regexes.

12 years agoselftest: Add testlist management module.
Jelmer Vernooij [Sun, 4 Mar 2012 02:02:53 +0000 (03:02 +0100)]
selftest: Add testlist management module.

12 years agoselftest.target: Add Environment.get_vars.
Jelmer Vernooij [Sun, 4 Mar 2012 01:38:15 +0000 (02:38 +0100)]
selftest.target: Add Environment.get_vars.

12 years agoselftest: Add tests for trying to reuse an environment that has gone down.
Jelmer Vernooij [Sun, 4 Mar 2012 01:37:42 +0000 (02:37 +0100)]
selftest: Add tests for trying to reuse an environment that has gone down.

12 years agoselftest: Add tests for NoneEnvironment.
Jelmer Vernooij [Sun, 4 Mar 2012 01:36:28 +0000 (02:36 +0100)]
selftest: Add tests for NoneEnvironment.

12 years agoselftest.target: Test that environments are reused.
Jelmer Vernooij [Sun, 4 Mar 2012 01:32:26 +0000 (02:32 +0100)]
selftest.target: Test that environments are reused.

12 years agoselftest.target: Add tests for get_running_env.
Jelmer Vernooij [Sun, 4 Mar 2012 01:31:32 +0000 (02:31 +0100)]
selftest.target: Add tests for get_running_env.

12 years agoselftest.target: Add tests for getlog_env.
Jelmer Vernooij [Sun, 4 Mar 2012 01:30:42 +0000 (02:30 +0100)]
selftest.target: Add tests for getlog_env.

12 years agoselftest.target: Add tests for check.
Jelmer Vernooij [Sun, 4 Mar 2012 01:29:34 +0000 (02:29 +0100)]
selftest.target: Add tests for check.

12 years agoselftest.target: Add tests for setup.
Jelmer Vernooij [Sun, 4 Mar 2012 01:28:06 +0000 (02:28 +0100)]
selftest.target: Add tests for setup.

12 years agoselftest: Add base classes for Target/Environment and their management.
Jelmer Vernooij [Sun, 4 Mar 2012 01:18:27 +0000 (02:18 +0100)]
selftest: Add base classes for Target/Environment and their management.

12 years agoselftest.socket_wrapper: interface is an integer.
Jelmer Vernooij [Sun, 4 Mar 2012 01:17:52 +0000 (02:17 +0100)]
selftest.socket_wrapper: interface is an integer.

12 years agoselftest.socket_wrapper: Add basic unit tests.
Jelmer Vernooij [Sun, 4 Mar 2012 00:36:16 +0000 (01:36 +0100)]
selftest.socket_wrapper: Add basic unit tests.

12 years agoselftest.socket_wrapper: Add docstrings.
Jelmer Vernooij [Sun, 4 Mar 2012 00:36:01 +0000 (01:36 +0100)]
selftest.socket_wrapper: Add docstrings.

12 years agoAdd test infrastructure for selftest.
Jelmer Vernooij [Sun, 4 Mar 2012 00:31:44 +0000 (01:31 +0100)]
Add test infrastructure for selftest.

12 years agoselftest: Add python version of socket wrapper utilities.
Jelmer Vernooij [Sun, 4 Mar 2012 00:30:58 +0000 (01:30 +0100)]
selftest: Add python version of socket wrapper utilities.

12 years agoselftest: Add selftest.py.
Jelmer Vernooij [Sun, 4 Mar 2012 00:24:10 +0000 (01:24 +0100)]
selftest: Add selftest.py.

12 years agokcc: Improve formatting of Python code to be more consistent with our other code.
Jelmer Vernooij [Sun, 4 Mar 2012 00:05:23 +0000 (01:05 +0100)]
kcc: Improve formatting of Python code to be more consistent with our other code.

12 years agolibcli:smb: define SMB2_HDR_FLAG_REPLAY_OPERATION
Michael Adam [Fri, 2 Mar 2012 22:51:26 +0000 (23:51 +0100)]
libcli:smb: define SMB2_HDR_FLAG_REPLAY_OPERATION

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Mar  4 15:10:38 CET 2012 on sn-devel-104

12 years agos3: Fix some && vs & warnings
Volker Lendecke [Sat, 3 Mar 2012 20:40:27 +0000 (21:40 +0100)]
s3: Fix some && vs & warnings

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Sun Mar  4 13:31:25 CET 2012 on sn-devel-104

12 years agoselftest: Rework Samba3.pm process termination
Andrew Bartlett [Sun, 4 Mar 2012 07:34:34 +0000 (18:34 +1100)]
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

12 years agoselftest: Rework Samba4.pm process termination.
Andrew Bartlett [Sun, 4 Mar 2012 07:32:44 +0000 (18:32 +1100)]
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

12 years agoselftest: Fix waitpid termination test
Andrew Bartlett [Sun, 4 Mar 2012 07:10:35 +0000 (18:10 +1100)]
selftest: Fix waitpid termination test

12 years agoselftest: Use fork()/exec() rather than system()
Andrew Bartlett [Sun, 4 Mar 2012 06:30:45 +0000 (17:30 +1100)]
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

12 years agos3-winbindd: Add stdin handler for winbind
Andrew Bartlett [Fri, 2 Mar 2012 07:22:10 +0000 (18:22 +1100)]
s3-winbindd: Add stdin handler for winbind

This will help avoid runaway processes in the test env, particularly when
the whole selftest.pl is killed.

Andrew Bartlett

12 years agos3-nmbd: Add stdin handler for nmbd
Andrew Bartlett [Fri, 2 Mar 2012 07:21:09 +0000 (18:21 +1100)]
s3-nmbd: Add stdin handler for nmbd

This will help avoid runaway processes in the test env, particularly
when the whole selftest.pl is killed.

Andrew Bartlett

12 years agochange low FDs are handled in Samba
Andrew Bartlett [Fri, 2 Mar 2012 08:32:56 +0000 (19:32 +1100)]
change low FDs are handled in Samba

We now only close fds 0, 1, 2 when we are a forked daemon, and take
care not to close a file descriptor that we might need for foreground
stdin monitoring.

This should fix stdout logging in the lsa and epmapper deamons (ie in
make test).

Andrew Bartlett

12 years agos3: don't replace the error message if already defined
Matthieu Patou [Sun, 4 Mar 2012 05:20:59 +0000 (21:20 -0800)]
s3: don't replace the error message if already defined

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Mar  4 10:13:24 CET 2012 on sn-devel-104

12 years agos3: print a nice warning when HAVE_ADS is not enabled but you still try to do net...
Matthieu Patou [Fri, 2 Mar 2012 00:29:15 +0000 (16:29 -0800)]
s3: print a nice warning when HAVE_ADS is not enabled but you still try to do net rpc keytab vampire

12 years agoselftest: Remove unused vde functions.
Jelmer Vernooij [Sun, 4 Mar 2012 04:08:26 +0000 (05:08 +0100)]
selftest: Remove unused vde functions.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar  4 07:54:51 CET 2012 on sn-devel-104

12 years agoselftest/README: Expand inconsistent tabs
Jelmer Vernooij [Sun, 4 Mar 2012 00:20:03 +0000 (01:20 +0100)]
selftest/README: Expand inconsistent tabs

12 years agoselftest: Remove outdated template.
Jelmer Vernooij [Sun, 4 Mar 2012 00:19:17 +0000 (01:19 +0100)]
selftest: Remove outdated template.

12 years agoselftest: Remove unused and broken target 'windows'.
Jelmer Vernooij [Sun, 4 Mar 2012 00:18:58 +0000 (01:18 +0100)]
selftest: Remove unused and broken target 'windows'.

12 years agosamba.7: Remove references to long gone testprns and smbsh utilities.
Jelmer Vernooij [Sat, 3 Mar 2012 21:22:50 +0000 (22:22 +0100)]
samba.7: Remove references to long gone testprns and smbsh utilities.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar  4 01:56:19 CET 2012 on sn-devel-104

12 years agos3: Fix a bogus if (client_len < 0)
Volker Lendecke [Sat, 3 Mar 2012 16:02:01 +0000 (17:02 +0100)]
s3: Fix a bogus if (client_len < 0)

On some platforms socklen_t might be unsigned, so comparing for <0
always returns true. Also, tsocket_address_bsd_sockaddr returns
ssize_t.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar  3 23:38:31 CET 2012 on sn-devel-104

12 years agoselftest: more precisely skip durable-open, not durable.open
Michael Adam [Sat, 3 Mar 2012 16:01:38 +0000 (17:01 +0100)]
selftest: more precisely skip durable-open, not durable.open

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Mar  3 19:17:32 CET 2012 on sn-devel-104

12 years agos4:torture:smb2: start a testsuite for durable v2 handles: durable and persistent...
Michael Adam [Mon, 27 Feb 2012 21:56:37 +0000 (22:56 +0100)]
s4:torture:smb2: start a testsuite for durable v2 handles: durable and persistent opens

12 years agos4:libcli:smb2: set SMB2_CAP_ALL in the negprot
Michael Adam [Thu, 1 Mar 2012 01:22:36 +0000 (02:22 +0100)]
s4:libcli:smb2: set SMB2_CAP_ALL in the negprot