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

81231 Commits

Author SHA1 Message Date
Stefan Metzmacher
ea74131dc8 selftest/knownfail: mark ^samba4.raw.session.expire1 as knownfail
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 15:03:16 CEST 2012 on sn-devel-104
2012-06-22 15:03:16 +02:00
Stefan Metzmacher
9c44f40b8d s4:torture/raw: add raw.session.expire1
This demonstrates the interaction of CAP_DYNAMIC_REAUTH
and NT_STATUS_NETWORK_SESSION_EXPIRED.

metze
2012-06-22 12:56:48 +02:00
Stefan Metzmacher
b40fa94360 s3:smbd: fix warning in smbd_tevent_trace_callback() without profile support
metze
2012-06-22 12:56:47 +02:00
Stefan Metzmacher
ad82c52db0 s3:serverid: don't ignore the result of dbwrap_parse_record()
metze
2012-06-22 12:56:45 +02:00
Stefan Metzmacher
31ad4d77e3 s4:torture/smb2: run smb2.session.reauth5 in a subdirectory
This way we can give anonymous full access to the directory.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 11:30:06 CEST 2012 on sn-devel-104
2012-06-22 11:30:05 +02:00
Rusty Russell
3c4263e758 tdb: don't use err.h in tests.
It's not portable.  While we could use ccan/err, it seems overkill since
we actually only use it in one test (I obviously cut & paste the #include).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Fri Jun 22 09:22:28 CEST 2012 on sn-devel-104
2012-06-22 09:22:28 +02:00
Rusty Russell
1783fe3443 tdb: make TDB_NOSYNC merely disable sync.
(As suggested by Stefan Metzmacher, based on the change to ntdb.)

Since commit ec96ea690e, we handle the case
where a process dies during a transaction commit.  Unfortunately, TDB_NOSYNC
means this no longer works, as it disables the recovery area as well as the
actual msync/fsync.  We should do everything except the syncs.

This also means we can do a complete test with $TDB_NO_FSYNC set; just
to get more complete coverage, we disable it explicitly for one test
(where we override the actual sync calls anyway).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
945473aac0 dbwrap: dbwrap_hash_size().
Implemented for ntdb and tdb; falls back to 0 for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
e92cb556fd dbwrap: dbwrap_name().
Useful for debug messages: particularly once we start switching between .tdb
and .ntdb files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
41f799d877 dbwrap: dbwrap_transaction_start_nonblock().
Implemented for ntdb and tdb; falls back to the blocking variant
for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
f6eb187fda dbwrap: dbwrap_fetch_locked_timeout().
Implemented for ntdb and tdb; falls back to the non-timeout variant
for others.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
431667b47c dbwrap: add dbwrap_check() function.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
9d97bf3f47 dbwrap: dbwrap_local_open()
This simply opens a tdb: it will eventually switch depending on the
extension.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
1acf548eb7 dbwrap: remove get_flags().
The flags returned were TDB-specific: this was only used for detecting
the endianness of obsolete databases (the conversion code was put in in
2003, with reference to Samba 2.3).

It's easier to remove it than to translate the NTDB flags to TDB flags,
and it's a really weird thing to ask for anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
fc9b298761 util_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.c
We're about to use them for dbwrap.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
02bacf1f95 util: util_ntdb ntdb_fetch_int32/ntdb_store_int32 and ntdb_add_int32_atomic
Similar to the util_tdb versions, but return the error code.

ntdb_add_int32_atomic seems a clearer name than tdb_change_int32_atomic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
348159d1e4 util: util_ntdb.c gets NTDB_ERROR => NTSTATUS map.
Very similar to the tdb version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
88ad365caf util: util_ntdb.c gains bystring functions.
Very similar to the util_tdb versions, but these return the error.
I've only implemented those functions actually used.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
8113d53bb4 util: ntdb_new() supports NTDB_CLEAR_IF_FIRST.
There are various issues with NTDB_CLEAR_IF_FIRST which makes it
better if we don't have to use it, but much of the code does, so
we fake up support here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
735290f474 util: util_ntdb.c
The first function is ntdb_new: this is preferred over ntdb_open, as
it makes the ntdb_context returned (and all NTDB_DATA returned from
ntdb_fetch) valid talloc pointers.

The API is very similar to tdb_wrap_open().

Note that we handle $TDB_NO_FSYNC here, since ntdb doesn't do that
hack (and it's great for speeding up testing!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
7c1d9fb3c1 ntdb: take advantage of direct access across expand.
This means we no longer have to unmap if we want to compare a record.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
4c51ee1116 ntdb: test arbitrary operations during ntdb_parse_record().
In particular, this tests that we can store enough records to make the
database expand while we map the given record.  We use a global lock for
this, but it could happen in theory with another process.

It also tests the that we can recurse inside ntdb_parse_record().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
01ec4a72de ntdb: make database read-only during ntdb_parse() callback.
Since we have a readlock, any write will grab a write lock: if it happens
to be on the same bucket, we'll fail.

For that reason, enforce read-only so every write operation fails
(even for NTDB_NOLOCK or NTDB_INTERNAL dbs), and document it!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
bd5c061932 ntdb: allow direct access for NTDB_INTERNAL dbs during expansion.
NTDB_INTERNAL databases need to malloc and copy to keep old versions
around if we expand, in a similar way to the manner in which keep old
mmaps around.

Of course, it only works for read-only accesses, since the two copies
are not synced.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
0a34f342c3 ntdb: enhancement to allow direct access to the ntdb map during expansion.
This means keeping the old mmap around when we expand the database.
We could revert to read/write, except for platforms with incoherent
mmap (ie. OpenBSD), where we need to use mmap for all accesses.

Thus we keep a linked list of old maps, and unmap them when the last access
finally goes away.

This is required if we want ntdb_parse_record() callbacks to be able
to expand the database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
66d151d689 ntdb: don't munmap the database on every close.
Since we can have multiple openers, we should leave the mmap in place
for the other openers to use.  Enhance the test to check the bug (it
still works, because without mmap we fall back to read/write, but
performance would be terrible!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
406bd2d121 ntdb: hand correct error code when alloc_read allocation fails.
-ECUTNPASTE.  This is not a usage error!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:16 +02:00
Rusty Russell
f7f6992c1e autobuild: always set TDB_NO_FSYNC.
Then we unset it inside the tdb test target itself.  This means that
new code can't accidently forget it, and we can set it in the
'buildnice' script on sn-devel, for example.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:16 +02:00
Rusty Russell
0265837ee8 ntdb: respect TDB_NO_FSYNC flag for 'make test'
This reduces test time from 31 seconds to 6, on my laptop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:16 +02:00
Stefan Metzmacher
0c54e7c936 s4:torture/smb2: add smb2.durable-open.lock-oplock
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 03:37:54 CEST 2012 on sn-devel-104
2012-06-22 03:37:54 +02:00
Stefan Metzmacher
ff36ce74c0 selftest: samba3.smb2.durable-open.lock => samba3.smb2.durable-open.lock-lease
metze
2012-06-22 01:47:33 +02:00
Stefan Metzmacher
7d8db45028 s4:torture/smb2: rename smb2.durable-open.lock to smb2.durable-open.lock-lease
metze
2012-06-22 01:47:33 +02:00
Michael Adam
732f28b85e autobuild: run "samba3-ctdb" by default
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun 22 01:46:13 CEST 2012 on sn-devel-104
2012-06-22 01:46:13 +02:00
Michael Adam
80921deae0 autobuild: run "samba-ctdb" by default to catch dbwrap_ctdb regressions 2012-06-21 23:49:19 +02:00
Michael Adam
a0f6014517 autobuild: add a target "samba3-ctdb" that builds samba3 (autoconf) with cluster support
This is achieved by using the ctdb header files copied in from current ctdb
master. Tests are not run. For this we would need to have a full ctdb built and
configured.
2012-06-21 23:49:19 +02:00
Michael Adam
18ce23b31d autobuild: add a target "samba-ctdb" that builds samba (waf) with cluster support
This is achieved by using the ctdb header files copied in from current ctdb
master. Tests are not run. For this we would need to have a full ctdb built and
configured.
2012-06-21 23:49:19 +02:00
Michael Adam
f9b722d50e autobuild: rename the "samba4-libs" target to "samba-libs" 2012-06-21 23:49:19 +02:00
Michael Adam
a24d78d344 autobuild: rename the "samba4" target to "samba" 2012-06-21 23:49:19 +02:00
Michael Adam
a518648bea Add current headers from ctdb master.
(ctdb.h, ctdb_protocol.h, ctdb_private.h, ctdb_typesafe_cb.h, ctdb_client.h)

This will allow us to check for build regressions against ctdb from autobuild.
2012-06-21 23:49:19 +02:00
Björn Baumbach
cea3bdb103 wintest: enable dns forwarding for internal dns
Internal DNS will forward dns requests to the original nameserver
(specified in resolv.conf).

Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Jun 21 23:47:35 CEST 2012 on sn-devel-104
2012-06-21 23:47:35 +02:00
Björn Baumbach
1318b5bb2c wintest: get original nameserver for forwarding on a more general place
Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
5305570758 wintest: extend get_is_dc function with additional expectations
Windows Server 2003 r2 answers "wintest2k3 is not a DC."

Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
884e28f66b wintest: check netcats exitstatus instead of output
There are many netcat implementations with different output messages.

Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
ed3ded1122 wintest: set recursive queries for internal dns
Need dns recursive queries = yes, since
host expects answers with RA-bit.

Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
b45d4beca5 wintest: add option to select the dns backend
This is an option to use the internal dns.

Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
09bee254f0 wintest: set nameserver on a more general place
Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
226dbc116d wintest: add option to use ntvfs instead of s3fs
Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Björn Baumbach
9fcd4a83a5 wintest: add working bbaumbach.conf file for use with VirtualBox
Signed-off-by: Kai Blin <kai@samba.org>
2012-06-21 21:55:20 +02:00
Jeremy Allison
dd763d6d8e Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 21 21:53:58 CEST 2012 on sn-devel-104
2012-06-21 21:53:58 +02:00
Jelmer Vernooij
7b43053ad6 Add --disable-ntdb option for building.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Jun 21 19:59:57 CEST 2012 on sn-devel-104
2012-06-21 19:59:57 +02:00