samba.git
7 years agoauth/ntlmssp: Remove reference to struct ntlmssp_state
Andrew Bartlett [Fri, 9 Mar 2012 03:29:55 +0000 (14:29 +1100)]
auth/ntlmssp: Remove reference to struct ntlmssp_state

7 years agoauth/ntlmssp: Remove gensec_security element from gensec_ntlmssp_state
Andrew Bartlett [Fri, 9 Mar 2012 03:28:46 +0000 (14:28 +1100)]
auth/ntlmssp: Remove gensec_security element from gensec_ntlmssp_state

This just means there is one less pointer to ensure we initialise.

Andrew Bartlett

7 years agoselftest: mark samba3.smb2.session tests as knownfail instead of skip
Stefan Metzmacher [Thu, 8 Mar 2012 13:22:15 +0000 (14:22 +0100)]
selftest: mark samba3.smb2.session tests as knownfail instead of skip

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar  9 02:34:38 CET 2012 on sn-devel-104

7 years agos4:torture/smb2: avoid hanging in smb2.session.reconnect against samba
Stefan Metzmacher [Thu, 8 Mar 2012 13:15:19 +0000 (14:15 +0100)]
s4:torture/smb2: avoid hanging in smb2.session.reconnect against samba

Now we fail the test directly instead of waiting for oplocks to timeout.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

metze

7 years agoauth/kerberos: Fall back to gsskrb5_get_subkey if we did not get the key type
Andrew Bartlett [Thu, 8 Mar 2012 05:16:12 +0000 (16:16 +1100)]
auth/kerberos: Fall back to gsskrb5_get_subkey if we did not get the key type

The key type OID is optional, but we require that information to determine if
we should use NEW_SPNEGO.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar  8 11:53:57 CET 2012 on sn-devel-104

7 years agoauth/kerberos: Ensure we do not print invalid memory in failure case
Andrew Bartlett [Thu, 8 Mar 2012 05:15:09 +0000 (16:15 +1100)]
auth/kerberos: Ensure we do not print invalid memory in failure case

This codeblock may not have any set->elements, so we should not print them.  Copy&paste in the original code.

Andrew Bartlett

7 years agowintest: continue turning over VMs...
Andrew Bartlett [Thu, 8 Mar 2012 03:57:07 +0000 (14:57 +1100)]
wintest: continue turning over VMs...

7 years agodlz_bind9: Log Samba DEBUG() messages to the bind9 logs
Andrew Bartlett [Thu, 8 Mar 2012 01:21:56 +0000 (12:21 +1100)]
dlz_bind9: Log Samba DEBUG() messages to the bind9 logs

7 years agolib/util: Add a callback facility for debug messages
Andrew Bartlett [Thu, 8 Mar 2012 01:21:26 +0000 (12:21 +1100)]
lib/util: Add a callback facility for debug messages

This will allow dlz_bind9 to put log messages somewhere useful, which
may make it easier to debug.

Andrew Bartlett

7 years agos3-auth: Remove single-implementation plugin layer
Andrew Bartlett [Fri, 3 Feb 2012 10:58:44 +0000 (21:58 +1100)]
s3-auth: Remove single-implementation plugin layer

The ->get_ntlm_challenge and ->check_ntlm_password elements of struct auth_context
were only ever initialised to a single value.  Make it easier to follow by
just calling the function directly.

Andrew Bartlett

7 years agos3-auth: Follow auth_ntlmssp and use auth4_context for Session Setup
Andrew Bartlett [Fri, 3 Feb 2012 06:09:37 +0000 (17:09 +1100)]
s3-auth: Follow auth_ntlmssp and use auth4_context for Session Setup

This patch ensures consistency in behaviour between NTLMSSP and NTLM
session setup handlers.  By calling the same layer that auth_ntlmssp
calls, we can not only allow redirection of all authentication to the
AD DC, we ensure that map to guest and username map handling is
consistent, even in the file server alone.

Andrew Bartlett

7 years agoselftest: add more tests for different authentication codepaths
Andrew Bartlett [Thu, 8 Mar 2012 04:37:29 +0000 (15:37 +1100)]
selftest: add more tests for different authentication codepaths

7 years agoautobuild: Enable standalone tdb2 tests
Amitay Isaacs [Wed, 7 Mar 2012 02:32:22 +0000 (13:32 +1100)]
autobuild: Enable standalone tdb2 tests

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Mar  8 09:32:24 CET 2012 on sn-devel-104

7 years agofailtest: don't assume FD_SETSIZE is maximum runtime fd.
Rusty Russell [Thu, 8 Mar 2012 03:44:22 +0000 (14:14 +1030)]
failtest: don't assume FD_SETSIZE is maximum runtime fd.

This breaks when rlimit is less.  Unfortunately, valgrind (32 bit x86,
3.7.0.SVN, Ubuntu) fails to set the file limit properly on the test:
reducing it to the obvious getrlimit/setrlimit/getrlimit works fine,
so leaving diagnostics for another day.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit a85a809bb17af6b6cf6fa31b300c6622f64ee700)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar  8 06:30:48 CET 2012 on sn-devel-104

7 years agos4-selftest: create the st/provision if it didn't exists already
Matthieu Patou [Wed, 7 Mar 2012 07:22:54 +0000 (23:22 -0800)]
s4-selftest: create the st/provision if it didn't exists already

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Thu Mar  8 00:25:24 CET 2012 on sn-devel-104

7 years agos4-upgradeprovision: Add options to do a DB backup only and not to fix acls in sysvol
Matthieu Patou [Wed, 7 Mar 2012 05:44:45 +0000 (21:44 -0800)]
s4-upgradeprovision: Add options to do a DB backup only and not to fix acls in sysvol

7 years agoChange default protocol to SMB2_02.
Jeremy Allison [Wed, 7 Mar 2012 19:58:51 +0000 (11:58 -0800)]
Change default protocol to SMB2_02.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar  7 22:41:21 CET 2012 on sn-devel-104

7 years agos3: piddir creation fix part 2.
Ira Cooper [Wed, 7 Mar 2012 01:58:37 +0000 (20:58 -0500)]
s3: piddir creation fix part 2.

Since the piddir got moved from the lockdir by default, the default piddir
wasn't getting created, stopping some configurations from running.

Signed-off-by: Jeremy Allison <jra@samba.org>
7 years agoaddns: Fix the Solaris/Illumos build.
Ira Cooper [Wed, 7 Mar 2012 00:22:46 +0000 (19:22 -0500)]
addns: Fix the Solaris/Illumos build.

uuid_t is not defined without including sys/uuid.h, configure+waf checks added.

Signed-off-by: Jeremy Allison <jra@samba.org>
7 years agos3: piddir creation fix.
Ira Cooper [Wed, 7 Mar 2012 00:25:16 +0000 (19:25 -0500)]
s3: piddir creation fix.

Since the piddir got moved from the lockdir by default, the default piddir
wasn't getting created stopping some configurations from running.

Signed-off-by: Jeremy Allison <jra@samba.org>
7 years agos4:librpc/rpc: make dcerpc_bh_raw_call_* more robust against disconnects and timeouts
Stefan Metzmacher [Wed, 7 Mar 2012 15:54:18 +0000 (16:54 +0100)]
s4:librpc/rpc: make dcerpc_bh_raw_call_* more robust against disconnects and timeouts

Using tevent_req_defer_callback() should make the situation a bit better,
until we have a common robust low level dcerpc library.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  7 18:44:24 CET 2012 on sn-devel-104

7 years agos4:librpc/rpc: make dcerpc_bh_is_connected() more robust
Stefan Metzmacher [Wed, 7 Mar 2012 15:52:57 +0000 (16:52 +0100)]
s4:librpc/rpc: make dcerpc_bh_is_connected() more robust

metze

7 years agos3-rpc_server: Do not register embedded ncacn_np endpoints by default
Andrew Bartlett [Wed, 7 Mar 2012 10:39:14 +0000 (21:39 +1100)]
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

7 years agos3-rpc_server: Register embedded RPC services after starting lsasd and spoolssd
Andrew Bartlett [Wed, 7 Mar 2012 10:24:01 +0000 (21:24 +1100)]
s3-rpc_server: Register embedded RPC services after starting lsasd and spoolssd

This ensures that these services are not accidentally registered in
these child processes.

Andrew Bartlett

7 years agos4-smb_server: Put error from share_get_config() into the logs
Andrew Bartlett [Mon, 5 Mar 2012 20:34:16 +0000 (07:34 +1100)]
s4-smb_server: Put error from share_get_config() into the logs

7 years agos3-rpc_server: Do not setup ncalrpc pipes and TCP for embedded rpc servers
Andrew Bartlett [Tue, 6 Mar 2012 11:11:06 +0000 (22:11 +1100)]
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

7 years agoselftest: Only run s3dc with a forked lsasd
Andrew Bartlett [Tue, 6 Mar 2012 11:04:55 +0000 (22:04 +1100)]
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

7 years agos3-smbd make change_to_user_by_session static
Andrew Bartlett [Tue, 6 Mar 2012 11:25:50 +0000 (22:25 +1100)]
s3-smbd make change_to_user_by_session static

7 years agoselftest: mark samba4.smb2.getinfo.getinfo as knownfail
Stefan Metzmacher [Tue, 6 Mar 2012 20:23:52 +0000 (21:23 +0100)]
selftest: mark samba4.smb2.getinfo.getinfo as knownfail

Samba4 seems to have problems with streams on directories.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  7 12:44:10 CET 2012 on sn-devel-104

7 years agos4:torture: smb2.getinfo test return status of stream creation
Gregor Beck [Tue, 6 Mar 2012 10:48:52 +0000 (11:48 +0100)]
s4:torture: smb2.getinfo test return status of stream creation

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture/smb2: add simple smb2.session.reauth test
Gregor Beck [Tue, 6 Mar 2012 14:46:48 +0000 (15:46 +0100)]
s4:torture/smb2: add simple smb2.session.reauth test

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:libcli/smb2: allow smb2_session_setup_spnego to handle reauth
Gregor Beck [Tue, 6 Mar 2012 14:45:37 +0000 (15:45 +0100)]
s4:libcli/smb2: allow smb2_session_setup_spnego to handle reauth

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-libcli: pysmb: Fix typo in secinfo_flags
Amitay Isaacs [Wed, 7 Mar 2012 05:40:23 +0000 (16:40 +1100)]
s4-libcli: pysmb: Fix typo in secinfo_flags

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar  7 10:56:09 CET 2012 on sn-devel-104

7 years agolib/tdb2: add --valgrind, --valgrind-log options.
Rusty Russell [Wed, 22 Feb 2012 06:51:13 +0000 (17:21 +1030)]
lib/tdb2: add --valgrind, --valgrind-log options.

Not used by default, since it slows down testing (on my laptop) from
22 seconds to 2 minutes 30 seconds.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar  7 04:57:21 CET 2012 on sn-devel-104

7 years agolib/tdb2: wire up unit tests.
Rusty Russell [Wed, 22 Feb 2012 06:51:04 +0000 (17:21 +1030)]
lib/tdb2: wire up unit tests.

The tests are ccan-style, so the names tell how to link them.  This
logic is generic, and could be moved to wafsamba, cleaned up, and used
elsewhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years agolib/tdb2: adapt unit tests to SAMBA environment.
Rusty Russell [Wed, 22 Feb 2012 04:33:37 +0000 (15:03 +1030)]
lib/tdb2: adapt unit tests to SAMBA environment.

This means changing headers, implementing a simple tap-like wrapper,
and also splitting out the helpers into those which are linked with
the api* tests (which can't use non-public tdb2 functions) and those
linked with the run* tests (which can).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years agolib/ccan: import failtest and required ccan modules for TDB2 unit tests.
Rusty Russell [Wed, 22 Feb 2012 04:29:32 +0000 (14:59 +1030)]
lib/ccan: import failtest and required ccan modules for TDB2 unit tests.

New modules: failtest, list, time, read_write_all and tlist.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years agos3:selftest: ask smbtorture4 for smb2 tests
Gregor Beck [Thu, 2 Feb 2012 11:02:00 +0000 (12:02 +0100)]
s3:selftest: ask smbtorture4 for smb2 tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  7 01:34:05 CET 2012 on sn-devel-104

7 years agoselftest: skip samba3.smb2.scan because they are no tests
Gregor Beck [Fri, 2 Mar 2012 11:15:00 +0000 (12:15 +0100)]
selftest: skip samba3.smb2.scan because they are no tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: remove samba3.smb2.*scan from knownfail
Gregor Beck [Fri, 2 Mar 2012 11:12:58 +0000 (12:12 +0100)]
selftest: remove samba3.smb2.*scan from knownfail

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture make a suite for smb2.*scan
Gregor Beck [Thu, 1 Mar 2012 14:59:41 +0000 (15:59 +0100)]
s4:torture make a suite for smb2.*scan

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture: print ntstatus on failure of setup complex file in smb2 setinfo/getinfo...
Gregor Beck [Fri, 2 Mar 2012 11:05:59 +0000 (12:05 +0100)]
s4:torture: print ntstatus on failure of setup complex file in smb2 setinfo/getinfo scan

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture: use different filenames for smb2 setinfo and getinfo scan
Gregor Beck [Fri, 2 Mar 2012 11:02:18 +0000 (12:02 +0100)]
s4:torture: use different filenames for smb2 setinfo and getinfo scan

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture: cleanup after smb2 setinfo scan
Gregor Beck [Fri, 2 Mar 2012 10:20:18 +0000 (11:20 +0100)]
s4:torture: cleanup after smb2 setinfo scan

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture: cleanup after smb2 getinfo scan
Gregor Beck [Fri, 2 Mar 2012 10:19:48 +0000 (11:19 +0100)]
s4:torture: cleanup after smb2 getinfo scan

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: skip samba3.smb2.session because it hangs
Gregor Beck [Wed, 29 Feb 2012 10:10:30 +0000 (11:10 +0100)]
selftest: skip samba3.smb2.session because it hangs

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: skip samba3.smb2.hold-oplock because its not a test
Gregor Beck [Wed, 29 Feb 2012 10:09:56 +0000 (11:09 +0100)]
selftest: skip samba3.smb2.hold-oplock because its not a test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: mark samba3.smb2.ioctl tests knownfail
Gregor Beck [Wed, 29 Feb 2012 10:07:27 +0000 (11:07 +0100)]
selftest: mark samba3.smb2.ioctl tests knownfail

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: mark samba3.smb2.durable-v2-open tests as knownfail
Stefan Metzmacher [Tue, 6 Mar 2012 18:35:55 +0000 (19:35 +0100)]
selftest: mark samba3.smb2.durable-v2-open tests as knownfail

metze

7 years agoselftest: mark samba3.smb2.durable-open.oplock test knownfail
Gregor Beck [Wed, 29 Feb 2012 10:06:11 +0000 (11:06 +0100)]
selftest: mark samba3.smb2.durable-open.oplock test knownfail

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: mark samba3.smb2.durable-open reopen tests knownfail
Gregor Beck [Wed, 29 Feb 2012 10:05:12 +0000 (11:05 +0100)]
selftest: mark samba3.smb2.durable-open reopen tests knownfail

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoselftest: samba3.smb2.compound.invalid2 works
Gregor Beck [Wed, 29 Feb 2012 06:58:44 +0000 (07:58 +0100)]
selftest: samba3.smb2.compound.invalid2 works

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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

7 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

7 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

7 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

7 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

7 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.

7 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

7 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.

7 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.

7 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

7 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>
7 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

7 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.

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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.

7 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.

7 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.

7 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.

7 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.

7 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

7 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>
7 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>
7 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>
7 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

7 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

7 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

7 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

7 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          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______

7 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

7 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

7 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).

7 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.