kai/samba.git
12 years agotdb2: Make TDB1 code use TDB2's open flags.
Rusty Russell [Tue, 13 Sep 2011 22:05:13 +0000 (07:35 +0930)]
tdb2: Make TDB1 code use TDB2's open flags.

This means getting rid of TDB_VOLATILE (perhaps we should use an
attribute for that?), TDB_INCOMPATIBLE_HASH (use the
tdb_attribute_hash for that) and TDB_CLEAR_IF_FIRST (use the
tdb_attribute_openhook for that).

We also get rid of TDB_DISALLOW_NESTING: that's the default for TDB2.

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

12 years agotdb2: approximate INCOMPATIBLE_HASH flag with tdb1_incompatible_hash()
Rusty Russell [Tue, 13 Sep 2011 22:04:13 +0000 (07:34 +0930)]
tdb2: approximate INCOMPATIBLE_HASH flag with tdb1_incompatible_hash()

Rather than leak TDB_INCOMPATIBLE_HASH through to the TDB2 API, we make
it that if they use the tdb1_incompatible_hash function as their hash,
then we treat it as if they had specified the TDB_INCOMPATIBLE_HASH
flag (ie. we mark the header so it's unusable by tdb < 1.2.6).

This precludes the possibility of using TDB_INCOMPATIBLE_HASH with a
custom hash function: that used to allow the user to ensure that old TDB
versions couldn't open the TDB file (and recent ones check the header to
ensure they're using the right hash).  But that's a small loss.

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

12 years agotdb2: Make tdb1 share tdb_store flags, struct tdb_data and TDB_MAGIC_FOOD.
Rusty Russell [Tue, 13 Sep 2011 22:03:13 +0000 (07:33 +0930)]
tdb2: Make tdb1 share tdb_store flags, struct tdb_data and TDB_MAGIC_FOOD.

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

12 years agotdb2: make TDB1 code use tdb2's TDB_ERROR and tdb_logerr()
Rusty Russell [Tue, 13 Sep 2011 22:02:13 +0000 (07:32 +0930)]
tdb2: make TDB1 code use tdb2's TDB_ERROR and tdb_logerr()

To do this, we make sure that the first few fields of tdb1_context and
tdb_context are the same.

This sweep also fixes up a few paths where we weren't setting
tdb->ecode before our old logging function.

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

12 years agotdb2: make tdb1 headers include tdb2 headers.
Rusty Russell [Tue, 13 Sep 2011 22:01:13 +0000 (07:31 +0930)]
tdb2: make tdb1 headers include tdb2 headers.

They're about to start sharing TDB2's definitions.

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

12 years agotdb2: rearrange tdb_context layout so tdb1_context can match
Rusty Russell [Tue, 13 Sep 2011 22:00:13 +0000 (07:30 +0930)]
tdb2: rearrange tdb_context layout so tdb1_context can match

By moving all the parts of struct tdb_context which logging and
locking use to the beginning of the structure, we can make
tdb1_context match, and thus pass that directly to the tdb_logerr()
function, and later the locking functions.

This is only necessary until we unify tdb1_context and tdb_context.

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

12 years agotdb2: add tdb1 code to build.
Rusty Russell [Tue, 13 Sep 2011 21:59:13 +0000 (07:29 +0930)]
tdb2: add tdb1 code to build.

The following patches integrate it together, but from here on we build
it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: remove TDB1 TDB_NO_FSYNC environment variable hack.
Rusty Russell [Tue, 13 Sep 2011 21:58:13 +0000 (07:28 +0930)]
tdb2: remove TDB1 TDB_NO_FSYNC environment variable hack.

The caller should do this: the SAMBA compatibility later does.

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

12 years agotdb2: get rid of TDB1 mark and nonblock functions.
Rusty Russell [Tue, 13 Sep 2011 21:57:13 +0000 (07:27 +0930)]
tdb2: get rid of TDB1 mark and nonblock functions.

We do this using hooks in tdb2.

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

12 years agotdb2: remove _PUBLIC_ in tdb1 functions.
Rusty Russell [Tue, 13 Sep 2011 21:56:13 +0000 (07:26 +0930)]
tdb2: remove _PUBLIC_ in tdb1 functions.

They'll all be accessed via the tdb2 API.

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

12 years agotdb2: Remove unused tdb1 functions.
Rusty Russell [Tue, 13 Sep 2011 21:55:13 +0000 (07:25 +0930)]
tdb2: Remove unused tdb1 functions.

We're going to use TDB2's API, so some TDB1 APIs are obviously unnecessary.
We also get rid of USE_RIGHT_MERGES and TRACE code.

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

12 years agotdb2: test: import tdb1's tests.
Rusty Russell [Tue, 13 Sep 2011 21:54:13 +0000 (07:24 +0930)]
tdb2: test: import tdb1's tests.

The main change is to s/tdb/tdb1_/ everywhere.

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

12 years agotdb2: include tdb1 source in tests.
Rusty Russell [Tue, 13 Sep 2011 21:53:13 +0000 (07:23 +0930)]
tdb2: include tdb1 source in tests.

Since we've renamed everything in tdb1, they won't clash.

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

12 years agotdb2: import TDB1 code.
Rusty Russell [Tue, 13 Sep 2011 21:52:13 +0000 (07:22 +0930)]
tdb2: import TDB1 code.

We import the entire codebase, putting a "tdb1_" prefix on the files
and changing the "tdb_" prefix to "tdb1_" everywhere.

The next patches will gradually merge it with the TDB2 code where
necessary.

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

12 years agotdb2: make tests include a single mega-header to simplify future patches
Rusty Russell [Tue, 13 Sep 2011 21:51:13 +0000 (07:21 +0930)]
tdb2: make tests include a single mega-header to simplify future patches

This lets us add the new files to a single place.

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

12 years agotdb2: tdb_foreach()
Rusty Russell [Tue, 13 Sep 2011 21:50:13 +0000 (07:20 +0930)]
tdb2: tdb_foreach()

Create an iterator over every open tdb (not internal TDBs).  This is
useful for re-establishing the tdb1-style active lock for
CLEAR_IF_FIRST.

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

12 years agotdb2: keep link of every non-internal tdb.
Rusty Russell [Tue, 13 Sep 2011 21:49:13 +0000 (07:19 +0930)]
tdb2: keep link of every non-internal tdb.

Instead of a per-file linked list, use a per-tdb list.  This is needed
for tdb_foreach().

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

12 years agotdb2: save openhook, allow tdb_get_attribute() on it.
Rusty Russell [Tue, 13 Sep 2011 21:48:13 +0000 (07:18 +0930)]
tdb2: save openhook, allow tdb_get_attribute() on it.

This makes it easy to call it again after a fork(), such as for
re-establishing the CLEAR_IF_FIRST files locks.

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

12 years agotdb_compat: make tdb2s temporarily read-only for tdb_traverse_read()
Rusty Russell [Tue, 13 Sep 2011 21:47:13 +0000 (07:17 +0930)]
tdb_compat: make tdb2s temporarily read-only for tdb_traverse_read()

It doesn't make a difference unless the tdb2 opens a TDB1 on disk, in
which case tdb1_traverse() takes a write lock on the entire file.  By
setting the tdb to read-only first, we simulate the old behaviour.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: add TDB_RDONLY flag, allow setting/unsetting it.
Rusty Russell [Tue, 13 Sep 2011 21:46:13 +0000 (07:16 +0930)]
tdb2: add TDB_RDONLY flag, allow setting/unsetting it.

You can only unset it if the TDB was originally opened O_RDWR.

Also, cleaned up error handling in tdb_allrecord_lock() so we only get
one log message on a r/o database.

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

12 years agotdb2: return TDB_ERR_RDONLY if trying to start a transaction on a R/O tdb.
Rusty Russell [Tue, 13 Sep 2011 21:45:13 +0000 (07:15 +0930)]
tdb2: return TDB_ERR_RDONLY if trying to start a transaction on a R/O tdb.

This is more accurate than returning TDB_ERR_EINVAL.

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

12 years agotdb2: save open_flags instead of mmap_flags.
Rusty Russell [Tue, 13 Sep 2011 21:44:13 +0000 (07:14 +0930)]
tdb2: save open_flags instead of mmap_flags.

It's more consistent with what tdb1 does, and slightly more encapsulated.

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

12 years agotdb_compat: adapt to tdb2 API change.
Rusty Russell [Tue, 13 Sep 2011 21:43:13 +0000 (07:13 +0930)]
tdb_compat: adapt to tdb2 API change.

Add the ecode arg to all the log functions, and log it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: Hand error code to logging function.
Rusty Russell [Tue, 13 Sep 2011 21:42:13 +0000 (07:12 +0930)]
tdb2: Hand error code to logging function.

Since we've deprecated tdb_error() function (and it didn't work right
from inside the logging function anyway, since we didn't set
tdb->ecode yet) we need to hand it to the log function.

(Imported from CCAN commit 6e3d9e8a66bf8b45150500f176452ee8e9ee9927)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: move transaction lock
Rusty Russell [Tue, 13 Sep 2011 21:41:13 +0000 (07:11 +0930)]
tdb2: move transaction lock

Make it the same offset as TDB1.  This isn't strictly necessary, but
it would allow for total unification later, since TDB1 and TDB2's
transaction code is otherwise completely compatible.

(Imported from CCAN commit de432e8f857ce23bccde7c6ffa3e7e21456df18b)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: enforce TDB_CONVERT
Rusty Russell [Tue, 13 Sep 2011 21:40:13 +0000 (07:10 +0930)]
tdb2: enforce TDB_CONVERT

If the caller actually specifies TDB_CONVERT, fail if the TDB does not
need conversion.  It's unusual for the user to specify TDB_CONVERT
(it's auto-detected) but better to be strict.

(Imported from CCAN commit 3e3ee8b0c1e77340ab9e8678c2d23646d8cdb627)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: cleanup oob handling.
Rusty Russell [Tue, 13 Sep 2011 21:39:13 +0000 (07:09 +0930)]
tdb2: cleanup oob handling.

The tdb_oob() function can fail due to errors, as well as because the length
asked for is greater than the size of the file.  Clean that up:

(1) If probe is true, only fail if there's an error, not if the length is
    too great.
(2) Exit tdb_open() if it tdb_oob() probe fails; this helps cut down
    test time for failtest.
(3) Don't set probe to true in tdb_direct() fail; a minor issue, but it means
    we log failure.

(Imported from CCAN commit 77658070a3e4f712b94d659b2e399031ce3394c8)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: fix tdb_lock offset.
Rusty Russell [Tue, 13 Sep 2011 21:38:13 +0000 (07:08 +0930)]
tdb2: fix tdb_lock offset.

It can be 64 bits, for huge databases.

(Imported from CCAN commit 736c033322079baf754261d82b6a83de53b2bb4e)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: fix internal tdb_write_convert() error handling in tdb_open()
Rusty Russell [Tue, 13 Sep 2011 21:37:13 +0000 (07:07 +0930)]
tdb2: fix internal tdb_write_convert() error handling in tdb_open()

As noted, failtest was taking a long time, because a failure injected here
was not detected.

(Imported from CCAN commit 51f592dfcda4d58d6b9d8134b6e1aff791dc40f2)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: Fix to always use 64-bit offset definition
Rusty Russell [Tue, 13 Sep 2011 21:36:13 +0000 (07:06 +0930)]
tdb2: Fix to always use 64-bit offset definition

We use off_t in the tdb2 interface (for tdb_attribute_flock); we need
to make sure that all callers agree on the size.

This also causes a problem in the tests: it's not enough to include
config.h first, we need the _FILE_OFFSET_BITS define from private.h.
Otherwise, we can disagree about the definitions of F_SETLK, F_SETLKW
and off_t, causing strange problems.

(Imported from CCAN commit baa17ee2d5e01a32030f19e566007417d72b4b6e)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoccan: configure check for HAVE_BUILTIN_CHOOSE_EXPR
Rusty Russell [Tue, 13 Sep 2011 21:35:13 +0000 (07:05 +0930)]
ccan: configure check for HAVE_BUILTIN_CHOOSE_EXPR

We weren't testing for this, and without it, typesafe_cb just casts
its function argument.  This is why I didn't get a warning when one of
my patches amended a function incorrectly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agos3:smb2cli: split cli->smb2.gss_blob from cli->secblob
Stefan Metzmacher [Tue, 13 Sep 2011 19:47:33 +0000 (21:47 +0200)]
s3:smb2cli: split cli->smb2.gss_blob from cli->secblob

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 13 23:34:13 CEST 2011 on sn-devel-104

12 years agos3:net_time: make use of cli_state_server_time_zone() and cli_state_server_time()
Stefan Metzmacher [Tue, 13 Sep 2011 19:48:58 +0000 (21:48 +0200)]
s3:net_time: make use of cli_state_server_time_zone() and cli_state_server_time()

metze

12 years agos3:libsmb: make use of cli_state_server_time_zone()
Stefan Metzmacher [Tue, 13 Sep 2011 18:43:10 +0000 (20:43 +0200)]
s3:libsmb: make use of cli_state_server_time_zone()

metze

12 years agos3:libsmb: add cli_state_server_time()
Stefan Metzmacher [Tue, 13 Sep 2011 19:41:17 +0000 (21:41 +0200)]
s3:libsmb: add cli_state_server_time()

metze

12 years agos3:libsmb: add cli_state_server_time_zone()
Stefan Metzmacher [Tue, 13 Sep 2011 18:42:20 +0000 (20:42 +0200)]
s3:libsmb: add cli_state_server_time_zone()

metze

12 years agos3:libsmb: make use of cli_state_server_session_key()
Stefan Metzmacher [Tue, 13 Sep 2011 16:39:51 +0000 (18:39 +0200)]
s3:libsmb: make use of cli_state_server_session_key()

metze

12 years agos3:libsmb: add cli_state_server_session_key()
Stefan Metzmacher [Tue, 13 Sep 2011 16:36:56 +0000 (18:36 +0200)]
s3:libsmb: add cli_state_server_session_key()

metze

12 years agos3:libsmb: make use of cli_state_security_mode()
Stefan Metzmacher [Tue, 13 Sep 2011 14:47:24 +0000 (16:47 +0200)]
s3:libsmb: make use of cli_state_security_mode()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 13 19:45:01 CEST 2011 on sn-devel-104

12 years agos3:winbindd_cm: make use of cli_state_security_mode()
Stefan Metzmacher [Tue, 13 Sep 2011 14:46:39 +0000 (16:46 +0200)]
s3:winbindd_cm: make use of cli_state_security_mode()

metze

12 years agos3:auth_server: make use of cli_state_security_mode()
Stefan Metzmacher [Tue, 13 Sep 2011 14:45:38 +0000 (16:45 +0200)]
s3:auth_server: make use of cli_state_security_mode()

metze

12 years agos3:libsmb: add cli_state_security_mode()
Stefan Metzmacher [Tue, 13 Sep 2011 14:45:04 +0000 (16:45 +0200)]
s3:libsmb: add cli_state_security_mode()

metze

12 years agos3:libsmb: make use of cli_state_max_requests() in cli_push_send()
Stefan Metzmacher [Tue, 13 Sep 2011 14:30:56 +0000 (16:30 +0200)]
s3:libsmb: make use of cli_state_max_requests() in cli_push_send()

metze

12 years agos3:libsmb: make use of cli_state_max_requests() in cli_pull_send()
Stefan Metzmacher [Tue, 13 Sep 2011 14:30:30 +0000 (16:30 +0200)]
s3:libsmb: make use of cli_state_max_requests() in cli_pull_send()

metze

12 years agos3:libsmb: add cli_state_max_requests()
Stefan Metzmacher [Tue, 13 Sep 2011 14:24:35 +0000 (16:24 +0200)]
s3:libsmb: add cli_state_max_requests()

metze

12 years agos3:libsmb: make sure cli->max_mux is valid in the return of the server
Stefan Metzmacher [Tue, 13 Sep 2011 15:05:51 +0000 (17:05 +0200)]
s3:libsmb: make sure cli->max_mux is valid in the return of the server

metze

12 years agos3:libsmb: set the MID to 0 in cli_setup_packet_buf()
Stefan Metzmacher [Tue, 13 Sep 2011 13:06:03 +0000 (15:06 +0200)]
s3:libsmb: set the MID to 0 in cli_setup_packet_buf()

It's allocated when sending the request.

metze

12 years agos3:libsmb: check that max_xmit is not less than 1024
Stefan Metzmacher [Tue, 13 Sep 2011 14:02:16 +0000 (16:02 +0200)]
s3:libsmb: check that max_xmit is not less than 1024

metze

12 years agos3:libsmb: better expect a max_xmit of 1024 instead of 0xFFFF for the CORE protocol
Stefan Metzmacher [Tue, 13 Sep 2011 13:59:37 +0000 (15:59 +0200)]
s3:libsmb: better expect a max_xmit of 1024 instead of 0xFFFF for the CORE protocol

metze

12 years agos3:torture: there's no need to alter cli->max_xmit in order to test large writes
Stefan Metzmacher [Tue, 13 Sep 2011 11:14:41 +0000 (13:14 +0200)]
s3:torture: there's no need to alter cli->max_xmit in order to test large writes

metze

12 years agos3:libsmb: don't mix smb2 share capabilities with smb1 capabilities
Stefan Metzmacher [Tue, 13 Sep 2011 11:49:15 +0000 (13:49 +0200)]
s3:libsmb: don't mix smb2 share capabilities with smb1 capabilities

metze

12 years agos3:libsmb: the smb2 server capabilities from the session setup are 32-bit
Stefan Metzmacher [Tue, 13 Sep 2011 11:48:03 +0000 (13:48 +0200)]
s3:libsmb: the smb2 server capabilities from the session setup are 32-bit

metze

12 years agoldb:pyldb.c - "py_ldb_rename" remove superflous "ldb" pointer
Matthias Dieter Wallnöfer [Tue, 13 Sep 2011 13:01:51 +0000 (15:01 +0200)]
ldb:pyldb.c - "py_ldb_rename" remove superflous "ldb" pointer

Reviewed-by: Jelmer
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Sep 13 18:11:18 CEST 2011 on sn-devel-104

12 years agos4-s3-upgrade Improve samba-tool domain samba3upgrade behaviour
Andrew Bartlett [Tue, 13 Sep 2011 11:02:43 +0000 (21:02 +1000)]
s4-s3-upgrade Improve samba-tool domain samba3upgrade behaviour

The --realm argument is again optional (the previous code would take the default
from the default smb.conf, not the one specified) and --targetdir is now a
named argument much like it is to provision.

We now test the --testparm option to ensure it behaves the way we expect.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 13 16:30:31 CEST 2011 on sn-devel-104

12 years agos4:upgrade_from_s3 - restore "get_testparm_var" method
Matthias Dieter Wallnöfer [Mon, 12 Sep 2011 18:57:10 +0000 (20:57 +0200)]
s4:upgrade_from_s3 - restore "get_testparm_var" method

This has accidentally been removed by commit 8268c2d4e231b05b439bc70331b75342b35daa4e.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
12 years agos3:torture: use CLI_BUFFER_SIZE instead of cli->max_xmit
Stefan Metzmacher [Tue, 13 Sep 2011 11:12:09 +0000 (13:12 +0200)]
s3:torture: use CLI_BUFFER_SIZE instead of cli->max_xmit

The max_data parameter of trans2/nttrans calls are not bound
to cli->max_xmit. Even with cli->max_xmit, which means the max
size of the whole SMB pdu, we would get fragmented trans2/nttrans
replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 13 14:52:35 CEST 2011 on sn-devel-104

12 years agos3:libsmb: make use of cli_state_available_size() in cli_smbwrite()
Stefan Metzmacher [Tue, 13 Sep 2011 11:10:33 +0000 (13:10 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_smbwrite()

metze

12 years agos3:libsmb: make use of cli_state_available_size() in cli_write_max_bufsize()
Stefan Metzmacher [Tue, 13 Sep 2011 09:39:07 +0000 (11:39 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_write_max_bufsize()

metze

12 years agos3:libsmb: make use of cli_state_available_size() in cli_read_max_bufsize()
Stefan Metzmacher [Tue, 13 Sep 2011 09:38:21 +0000 (11:38 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_read_max_bufsize()

metze

12 years agos3:libsmb: make use of cli_state_available_size() in cli_list_old_send()
Stefan Metzmacher [Tue, 13 Sep 2011 09:37:20 +0000 (11:37 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_list_old_send()

metze

12 years agos3:libsmb: make use of cli_state_available_size() in cli_sesssetup_blob_send()
Stefan Metzmacher [Tue, 13 Sep 2011 09:35:53 +0000 (11:35 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_sesssetup_blob_send()

metze

12 years agos3:libsmb: make use of cli_state_available_size() in cli_trans_format()
Stefan Metzmacher [Tue, 13 Sep 2011 09:34:33 +0000 (11:34 +0200)]
s3:libsmb: make use of cli_state_available_size() in cli_trans_format()

metze

12 years agos3:libsmb: add cli_state_available_size()
Stefan Metzmacher [Tue, 13 Sep 2011 09:23:49 +0000 (11:23 +0200)]
s3:libsmb: add cli_state_available_size()

metze

12 years agos3:clitar: remove unused/not existing extern variables
Stefan Metzmacher [Tue, 13 Sep 2011 06:44:17 +0000 (08:44 +0200)]
s3:clitar: remove unused/not existing extern variables

metze

12 years agos3: Fix Coverity ID 2613 -- UNINIT
Volker Lendecke [Tue, 13 Sep 2011 08:47:15 +0000 (10:47 +0200)]
s3: Fix Coverity ID 2613 -- UNINIT

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Sep 13 12:39:10 CEST 2011 on sn-devel-104

12 years agos3: Fix Coverity ID 2614 -- UNINIT
Volker Lendecke [Tue, 13 Sep 2011 08:46:32 +0000 (10:46 +0200)]
s3: Fix Coverity ID 2614 -- UNINIT

12 years agos3: Make saf_join_key() use talloc
Volker Lendecke [Mon, 12 Sep 2011 19:11:57 +0000 (21:11 +0200)]
s3: Make saf_join_key() use talloc

12 years agos3: Make saf_key() use talloc
Volker Lendecke [Mon, 12 Sep 2011 19:07:16 +0000 (21:07 +0200)]
s3: Make saf_key() use talloc

12 years agos3: Disentangle resolve_name() a bit
Volker Lendecke [Mon, 12 Sep 2011 18:56:13 +0000 (20:56 +0200)]
s3: Disentangle resolve_name() a bit

12 years agos3: Remove a reference to smbd_server_conn
Volker Lendecke [Mon, 12 Sep 2011 15:33:26 +0000 (17:33 +0200)]
s3: Remove a reference to smbd_server_conn

12 years agos3: Remove a reference to smbd_server_conn
Volker Lendecke [Mon, 12 Sep 2011 15:32:39 +0000 (17:32 +0200)]
s3: Remove a reference to smbd_server_conn

12 years agos3: Remove a reference to smbd_server_conn
Volker Lendecke [Mon, 12 Sep 2011 15:30:51 +0000 (17:30 +0200)]
s3: Remove a reference to smbd_server_conn

12 years agos3: Remove a reference to smbd_server_conn
Volker Lendecke [Mon, 12 Sep 2011 15:30:40 +0000 (17:30 +0200)]
s3: Remove a reference to smbd_server_conn

12 years agos3: Remove a reference to smbd_server_conn
Volker Lendecke [Mon, 12 Sep 2011 15:23:07 +0000 (17:23 +0200)]
s3: Remove a reference to smbd_server_conn

12 years agos3: Fix some nonempty blank lines
Volker Lendecke [Mon, 12 Sep 2011 15:19:27 +0000 (17:19 +0200)]
s3: Fix some nonempty blank lines

12 years agos3-selftest use a more portable shell syntax
Andrew Bartlett [Tue, 13 Sep 2011 05:19:46 +0000 (15:19 +1000)]
s3-selftest use a more portable shell syntax

"$10" evaulates to $1 and 0, not the 10th argument.

Thanks to Amitay for pointing this out!

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 13 09:34:49 CEST 2011 on sn-devel-104

12 years agoscript/librelease.sh: automate Samba4 alpha releases
Andrew Bartlett [Tue, 13 Sep 2011 05:18:52 +0000 (15:18 +1000)]
script/librelease.sh: automate Samba4 alpha releases

12 years agos4-subdomain: match windows form for trustAuthInOutBlob
Andrew Tridgell [Wed, 7 Sep 2011 07:22:49 +0000 (17:22 +1000)]
s4-subdomain: match windows form for trustAuthInOutBlob

Windows does not put a version element in the array

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

12 years agos4-subdomain: fixed domain guid choice for subdomain join
Andrew Tridgell [Wed, 7 Sep 2011 07:21:07 +0000 (17:21 +1000)]
s4-subdomain: fixed domain guid choice for subdomain join

We need to use the domain GUID that the server choose in the ncName
link

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

12 years agos4-subdomain: don't delete account DN not created in subdomain join
Andrew Tridgell [Mon, 5 Sep 2011 07:23:48 +0000 (17:23 +1000)]
s4-subdomain: don't delete account DN not created in subdomain join

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

12 years agos4-subdomain: use a password length of 128
Andrew Tridgell [Mon, 5 Sep 2011 06:45:28 +0000 (16:45 +1000)]
s4-subdomain: use a password length of 128

windows seems to use a fixed size for this password. It is possible
that windows servers can only handle one size, given we have observed
some strange behaviour from the windows kdc when we setup trusts

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

12 years agos4-join: fixed non-subdomain join
Andrew Tridgell [Mon, 5 Sep 2011 06:43:26 +0000 (16:43 +1000)]
s4-join: fixed non-subdomain join

these two vars need to be initialised for general join

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

12 years agos4-subdomain: fixed invocationID and hostIPs in subdomain join
Andrew Tridgell [Fri, 2 Sep 2011 05:12:11 +0000 (15:12 +1000)]
s4-subdomain: fixed invocationID and hostIPs in subdomain join

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

12 years agos4-subdomain more work on sub-domain join
Andrew Bartlett [Fri, 26 Aug 2011 03:23:41 +0000 (13:23 +1000)]
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>

12 years agos4: add createtrust tool for testing
Andrew Bartlett [Fri, 2 Sep 2011 00:35:46 +0000 (10:35 +1000)]
s4: add createtrust tool for testing

12 years agoselftest: add test for subdomain support
Andrew Bartlett [Thu, 25 Aug 2011 11:47:03 +0000 (21:47 +1000)]
selftest: add test for subdomain support

12 years agos4-join Add a partitions DN when we join a subdomain
Andrew Bartlett [Fri, 26 Aug 2011 06:07:05 +0000 (16:07 +1000)]
s4-join Add a partitions DN when we join a subdomain

12 years agos4-provision Perform 'modify' operations as system
Andrew Bartlett [Thu, 25 Aug 2011 09:15:13 +0000 (19:15 +1000)]
s4-provision Perform 'modify' operations as system

We need this so that we can modify the cn=configuration partition when
we are setting up a new subdomain.

The serverReference on our ${SERVERDN} is in that partition, and
without this change creating a new subdomain fails due to ACLs.

Andrew Bartlett

12 years agos4-join supply the NTDS GUID to the provision
Andrew Bartlett [Thu, 25 Aug 2011 09:13:34 +0000 (19:13 +1000)]
s4-join supply the NTDS GUID to the provision

Unlike other join operations, the creation of a subdomain makes local
changes to the DB, so we need to pass in the NTDS GUID to ensure the
one set on the object created in the parent domain is the one that is
used.

Andrew Bartlett

12 years agos4-provision Split addition of users and well known principals
Andrew Bartlett [Thu, 25 Aug 2011 03:18:43 +0000 (13:18 +1000)]
s4-provision Split addition of users and well known principals

If we are provisioning a subdomain, then these are already in
cn=configuration.

Andrew Bartlett

12 years agos4-provision Add initial support for joining as a new subdomain
Andrew Bartlett [Wed, 24 Aug 2011 05:39:51 +0000 (15:39 +1000)]
s4-provision Add initial support for joining as a new subdomain

To do this we need to reorganise a lot of the provision code, so that
we can create the framework for the inbound replicaton of the config
and schema partitions and then add in the new subdomain locally.

Andrew Bartlett

12 years agostart work on Samba 4.0 alpha18
Andrew Bartlett [Tue, 13 Sep 2011 01:39:09 +0000 (11:39 +1000)]
start work on Samba 4.0 alpha18

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 13 05:44:47 CEST 2011 on sn-devel-104

12 years agoRelease Samba 4.0 alpha17 save-diskspace-tags/samba-4.0.0alpha17
Andrew Bartlett [Tue, 13 Sep 2011 01:38:30 +0000 (11:38 +1000)]
Release Samba 4.0 alpha17

12 years agoWHATSNEW: more information on running dbcheck
Andrew Tridgell [Tue, 13 Sep 2011 02:05:00 +0000 (12:05 +1000)]
WHATSNEW: more information on running dbcheck

12 years agos4-python: Fix some formatting issues.
Jelmer Vernooij [Mon, 12 Sep 2011 23:27:50 +0000 (01:27 +0200)]
s4-python: Fix some formatting issues.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Sep 13 03:51:13 CEST 2011 on sn-devel-104

12 years agos4-python: Consistently use spaces rather than tabs, fix headers in several places.
Jelmer Vernooij [Mon, 12 Sep 2011 23:10:37 +0000 (01:10 +0200)]
s4-python: Consistently use spaces rather than tabs, fix headers in several places.

12 years agoAdd samba.tests.source, which checks Python files for copyright lines, license header...
Jelmer Vernooij [Mon, 12 Sep 2011 23:09:16 +0000 (01:09 +0200)]
Add samba.tests.source, which checks Python files for copyright lines, license headers and invalid characters (dos newlines, tabs).

12 years agotestparm.py: Use standard formatting of header.
Jelmer Vernooij [Mon, 12 Sep 2011 22:20:57 +0000 (00:20 +0200)]
testparm.py: Use standard formatting of header.

12 years agogroup.py: Remove tab characters.
Jelmer Vernooij [Mon, 12 Sep 2011 22:20:17 +0000 (00:20 +0200)]
group.py: Remove tab characters.

12 years agodrs.py: Remove tab characters.
Jelmer Vernooij [Mon, 12 Sep 2011 22:20:03 +0000 (00:20 +0200)]
drs.py: Remove tab characters.