ira/wip.git
12 years agotdb2: add an internal TDB_CANT_CHECK flag.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: add an internal TDB_CANT_CHECK flag.

This will be used shortly to indicate that a TDB2 file indicates it
cannot be checked.

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

12 years agotdb2: suppress failtest more than once on mmap.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: suppress failtest more than once on mmap.

Now we test failing mmap, ccanlint -v time has increased from 200 to
330 seconds.  Worse, tests no time out on my laptop.

Fix this, by preventing us from going down that particular rabbit hole.
ccanlint -v now takes 201 seconds again.

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

12 years agotdb2: simplify failtest helper.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: simplify failtest helper.

failtest now culls duplicates for itself (and more efficiently), so
don't replicate the logic here.  It changes things a bit, because
failtest uses backtraces rather than a simple call point to find
duplicates.

Also, fix one case (in run-11-simple-fetch.c) where we simply exited
rather than using failtest_exit().  We got away with it before, because
we never hit that particular failure pattern.

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

12 years agotdb2: failtest: use a linked list for history, not an array.
Rusty Russell [Mon, 5 Dec 2011 06:33:30 +0000 (17:03 +1030)]
tdb2: failtest: use a linked list for history, not an array.

This avoids a silly realloc, but more importantly it gets us closer to
being runtime extensible, as each history element can be a different
size.

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

12 years agotdb2: consolidate testing failtest suppression routines.
Rusty Russell [Mon, 5 Dec 2011 06:33:19 +0000 (17:03 +1030)]
tdb2: consolidate testing failtest suppression routines.

Less cut & paste means less patching as failtest changes.

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

12 years agotdb2: fix intermittant failure in run-50-multiple-freelists-fail.c
Rusty Russell [Mon, 5 Dec 2011 06:33:19 +0000 (17:03 +1030)]
tdb2: fix intermittant failure in run-50-multiple-freelists-fail.c

layout.c's TDB creation functions were incorrect in case of a hash
collision, causing occasional failure.  Make it always use the
(previously-failing) seed value, and fix it.

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

12 years agolib/ccan/cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers)
Rusty Russell [Mon, 5 Dec 2011 06:12:50 +0000 (16:42 +1030)]
lib/ccan/cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers)

As noted by Jan Engelhardt; libHX fixed this already.

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

12 years agolib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means"
Rusty Russell [Mon, 5 Dec 2011 06:12:50 +0000 (16:42 +1030)]
lib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means"

Actually, I don't even think it means that.  But rename it to something
which is sane.

Thanks to David Gibson for reporting.

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

12 years agolib/ccan/asearch: fix example on 64 bit platforms.
Rusty Russell [Mon, 5 Dec 2011 06:12:49 +0000 (16:42 +1030)]
lib/ccan/asearch: fix example on 64 bit platforms.

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

12 years agolib/ccan/htable: benchmark against hsearch(3)
Rusty Russell [Mon, 5 Dec 2011 06:12:49 +0000 (16:42 +1030)]
lib/ccan/htable: benchmark against hsearch(3)

Since that has a fixed hash table size and doesn't support delete, we can't
do a thorough comparison, but we can insert and search.

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

12 years agolib/ccan/likely: use htable_type
Rusty Russell [Mon, 5 Dec 2011 06:12:48 +0000 (16:42 +1030)]
lib/ccan/likely: use htable_type

Also general cleanups:
(1) Don't assume that strings are folded by the compiler.
(2) Implement likely_stats_reset().
(3) Return non-const string from likely_stats(), as caller must free it.
(4) Don't use struct info indirection (that was from when we used callbacks?)
(5) Close memory leak in run-debug.c

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

12 years agolib/ccan/htable: HTABLE_INITIALIZER() for static initialization.
Rusty Russell [Mon, 5 Dec 2011 06:12:48 +0000 (16:42 +1030)]
lib/ccan/htable: HTABLE_INITIALIZER() for static initialization.

Unfortunately it's a bit of a pain to use for typed hashtables, but it
works.

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

12 years agolib/ccan/htable: clean up interface, document htable_type better.
Rusty Russell [Mon, 5 Dec 2011 06:12:47 +0000 (16:42 +1030)]
lib/ccan/htable: clean up interface, document htable_type better.

We change from htable_new()/htable_free() to htable_init/htable_clear.
We also change HTABLE_DEFINE_TYPE() to be the full name, without automatically
prepending htable_.

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

12 years agolib/ccan/htable: start empty.
Rusty Russell [Mon, 5 Dec 2011 06:12:47 +0000 (16:42 +1030)]
lib/ccan/htable: start empty.

There's no real reason to start with 128 entries.

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

12 years agolib/ccan/htable, strset: benchmarking tools.
Rusty Russell [Mon, 5 Dec 2011 06:12:46 +0000 (16:42 +1030)]
lib/ccan/htable, strset: benchmarking tools.

This lets us compare hash table vs. strset vs. the example
implementation of critbit trees.

cbspeed 100 runs, min-max(avg):
#01: Initial insert:   236-245(237)
#02: Initial lookup (match):   180-186(180)
#03: Initial lookup (miss):   171-185(172)
#04: Initial lookup (random):   441-457(444)
#05: Initial delete all:   127-132(128)
#06: Initial re-inserting:   219-225(220)
#07: Deleting first half:   101-104(102)
#08: Adding (a different) half:   158-162(159)
#09: Lookup after half-change (match):   202-207(203)
#10: Lookup after half-change (miss):   217-222(218)
#11: Churn 1:   297-302(299)
#12: Churn 2:   297-305(300)
#13: Churn 3:   301-308(303)
#14: Post-Churn lookup (match):   189-195(190)
#15: Post-Churn lookup (miss):   189-193(190)
#16: Post-Churn lookup (random):   499-513(503)

speed 100 runs, min-max(avg):
#01: Initial insert:   211-218(212)
#02: Initial lookup (match):   161-166(162)
#03: Initial lookup (miss):   157-162(158)
#04: Initial lookup (random):   452-460(454)
#05: Initial delete all:   126-135(127)
#06: Initial re-inserting:   193-201(194)
#07: Deleting first half:   99-107(99)
#08: Adding (a different) half:   143-190(144)
#09: Lookup after half-change (match):   183-195(184)
#10: Lookup after half-change (miss):   197-203(198)
#11: Churn 1:   271-278(274)
#12: Churn 2:   280-287(282)
#13: Churn 3:   277-285(279)
#14: Post-Churn lookup (match):   171-175(171)
#15: Post-Churn lookup (miss):   174-178(175)
#16: Post-Churn lookup (random):   525-552(528)

stringspeed 100 runs, min-max(avg):
#01: Initial insert:   300-343(308)
#02: Initial lookup (match):   98-136(99)
#03: Initial lookup (miss):   73-102(75)
#04: Initial lookup (random):   230-282(233)
#05: Initial delete all:   66-102(69)
#06: Initial re-inserting:   62-99(64)
#07: Deleting first half:   43-52(43)
#08: Adding (a different) half:   101-156(106)
#09: Lookup after half-change (match):   114-156(120)
#10: Lookup after half-change (miss):   94-103(95)
#11: Churn 1:   98-105(99)
#12: Churn 2:   96-104(98)
#13: Churn 3:   174-184(176)
#14: Post-Churn lookup (match):   93-112(94)
#15: Post-Churn lookup (miss):   77-107(79)
#16: Post-Churn lookup (random):   229-265(232)

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

12 years agolib/ccan/str: fix warnings.
Rusty Russell [Mon, 5 Dec 2011 06:12:46 +0000 (16:42 +1030)]
lib/ccan/str: fix warnings.

Firstly, -Wwrite-strings makes string literals const, secondly, we mustn't
define str_strstr etc in terms of themselves!

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

12 years agolib/ccan/str: relicense to public domain.
Rusty Russell [Mon, 5 Dec 2011 06:12:45 +0000 (16:42 +1030)]
lib/ccan/str: relicense to public domain.

LGPL is overkill for trivial wrappers like this.

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

12 years agolib/ccan/typesafe_cb: fix example macro ordering in typesafe_cb_preargs documentation.
Rusty Russell [Mon, 5 Dec 2011 06:12:45 +0000 (16:42 +1030)]
lib/ccan/typesafe_cb: fix example macro ordering in typesafe_cb_preargs documentation.

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

12 years agolib/ccan/htable: fix tools/speed.
Rusty Russell [Mon, 5 Dec 2011 06:12:44 +0000 (16:42 +1030)]
lib/ccan/htable: fix tools/speed.

As pointed out by Christian Thaeter, it has bitrotted.

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

12 years agolib/ccan/build_assert: Remove stale LGPL license comment.
Joey Adams [Mon, 5 Dec 2011 06:12:43 +0000 (16:42 +1030)]
lib/ccan/build_assert: Remove stale LGPL license comment.

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

12 years agolib/ccan/array_size: relicense under public domain.
Rusty Russell [Mon, 5 Dec 2011 06:12:40 +0000 (16:42 +1030)]
lib/ccan/array_size: relicense under public domain.

It's just a header, I don't care what's done with it.

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

12 years agoRevert fac5c654e2fe17c2c11d150b16088e8a51f6be20
Jeremy Allison [Sun, 4 Dec 2011 05:44:14 +0000 (21:44 -0800)]
Revert fac5c654e2fe17c2c11d150b16088e8a51f6be20

s3: Add a fallback for missing open&x support in OS/X Lion

This is now done inside the synchronous cli_open() wrapper
function.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sun Dec  4 08:19:31 CET 2011 on sn-devel-104

12 years agoMove the callers that need to use the new cli_open() back to calling
Jeremy Allison [Sun, 4 Dec 2011 05:36:47 +0000 (21:36 -0800)]
Move the callers that need to use the new cli_open() back to calling
it from cli_openx().

12 years agoAdd cli_open() back as a synchronous wrapper function the calls
Jeremy Allison [Sun, 4 Dec 2011 05:31:32 +0000 (21:31 -0800)]
Add cli_open() back as a synchronous wrapper function the calls
NtCreateX followed by openX() if NtCreateX is unsupported.

12 years agoRename cli_open -> cli_openx. Prelude to replacing generic cli_open()
Jeremy Allison [Sun, 4 Dec 2011 05:13:08 +0000 (21:13 -0800)]
Rename cli_open -> cli_openx. Prelude to replacing generic cli_open()
with a call that uses NTCreateX in preference to OpenAndX.

12 years agos4 dns: Test SOA queries
Kai Blin [Sat, 3 Dec 2011 18:08:09 +0000 (19:08 +0100)]
s4 dns: Test SOA queries

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Dec  3 20:52:51 CET 2011 on sn-devel-104

12 years agoRevert making public of the samba-module library.
Jelmer Vernooij [Sat, 3 Dec 2011 06:03:35 +0000 (07:03 +0100)]
Revert making public of the samba-module library.

This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104

12 years agolib/util: factor out tdb_data_is_empty
Gregor Beck [Mon, 7 Nov 2011 08:59:37 +0000 (09:59 +0100)]
lib/util: factor out tdb_data_is_empty

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Dec  3 05:20:30 CET 2011 on sn-devel-104

12 years agos3:registry: do not use regdb functions during db upgrade
Gregor Beck [Fri, 14 Oct 2011 08:57:11 +0000 (10:57 +0200)]
s3:registry: do not use regdb functions during db upgrade

It is importante to not use the database backend implementation
in the upgrade. Otherwise this would only work as long as this
is the newset version. In future versions of the registry, this
(then) intermediate upgrade step would change in behaviour and not
work as expected any more.

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not...
Gregor Beck [Fri, 4 Nov 2011 09:55:47 +0000 (10:55 +0100)]
s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not found

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3-winbind: Add an update function for winbind cache.
Andreas Schneider [Sat, 3 Dec 2011 00:19:34 +0000 (16:19 -0800)]
s3-winbind: Add an update function for winbind cache.

With 57b3d32 we changed the format for the winbind cache database and
the code deleted the database for the upgrade. As this database holds
also cached credentials, removing it is not an option. We need to update
from version 1 to version 2.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec  3 03:47:58 CET 2011 on sn-devel-104

12 years agotevent: Fix typo in build script.
Jelmer Vernooij [Fri, 2 Dec 2011 22:43:10 +0000 (23:43 +0100)]
tevent: Fix typo in build script.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 02:15:40 CET 2011 on sn-devel-104

12 years agoUpdate the waf build system to link with the new PIDL locking code.
Jeremy Allison [Fri, 2 Dec 2011 21:41:55 +0000 (13:41 -0800)]
Update the waf build system to link with the new PIDL locking code.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec  3 00:14:54 CET 2011 on sn-devel-104

12 years agos3: Use autogenerated open_files.idl
Volker Lendecke [Thu, 24 Nov 2011 13:11:28 +0000 (14:11 +0100)]
s3: Use autogenerated open_files.idl

12 years agos3: Move ndr_file_id to LIBNDR_OBJ
Volker Lendecke [Thu, 24 Nov 2011 09:02:44 +0000 (10:02 +0100)]
s3: Move ndr_file_id to LIBNDR_OBJ

12 years agos3: Add open_files.idl
Volker Lendecke [Thu, 24 Nov 2011 09:01:57 +0000 (10:01 +0100)]
s3: Add open_files.idl

12 years agolibrpc: Add support for struct timeval
Volker Lendecke [Thu, 24 Nov 2011 08:49:19 +0000 (09:49 +0100)]
librpc: Add support for struct timeval

12 years agolibrpc: Add support for struct timespec
Volker Lendecke [Thu, 24 Nov 2011 08:48:40 +0000 (09:48 +0100)]
librpc: Add support for struct timespec

12 years agoFix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add inheritable...
Jeremy Allison [Fri, 2 Dec 2011 18:55:40 +0000 (10:55 -0800)]
Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add inheritable entries on a directory with no stored ACL.

If referring to an fsp sbuf can be left as an uninitialized variable,
causing the 'is_directory' variable to be false when it should be true.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec  2 22:13:03 CET 2011 on sn-devel-104

12 years agoEnsure we map our own Samba return of ERRSRV, ERRunknownsmb
Jeremy Allison [Fri, 2 Dec 2011 18:28:23 +0000 (10:28 -0800)]
Ensure we map our own Samba return of ERRSRV, ERRunknownsmb
on an unknown SMB request to NT_STATUS_NOT_IMPLEMENTED.

12 years agoConvert smbclient to using NtCreateX by preference, fall back to openX on
Jeremy Allison [Fri, 2 Dec 2011 18:11:17 +0000 (10:11 -0800)]
Convert smbclient to using NtCreateX by preference, fall back to openX on
'not implemented' or similar error.

12 years agos3: Fix some nonblank line endings
Volker Lendecke [Fri, 2 Dec 2011 16:40:33 +0000 (17:40 +0100)]
s3: Fix some nonblank line endings

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec  2 20:39:33 CET 2011 on sn-devel-104

12 years agos3: Remove unused dbwrap_record_get_private_data
Volker Lendecke [Fri, 2 Dec 2011 16:39:13 +0000 (17:39 +0100)]
s3: Remove unused dbwrap_record_get_private_data

db_record->private_data is for backends which can include dbwrap_private.h
anyway.

12 years agos3-winbind: Remove unused keys from list.
Andreas Schneider [Fri, 2 Dec 2011 14:44:02 +0000 (15:44 +0100)]
s3-winbind: Remove unused keys from list.

DR and DE have been removed with
0834574fdd6b469797b3b6a4edd45f321b9b9971.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Dec  2 19:02:45 CET 2011 on sn-devel-104

12 years agoAdd the "backup" toggle command to smbclient. In order for this to be
Jeremy Allison [Thu, 1 Dec 2011 21:47:12 +0000 (13:47 -0800)]
Add the "backup" toggle command to smbclient. In order for this to be
really useful we need to change to using NTCreateX opens by default in
cli_open() and fall back to old OpenX calls instead of doing it the
other way around.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec  2 00:23:13 CET 2011 on sn-devel-104

12 years agoAfter a discussion with Volker, sdd a backup_intent state to the client struct.
Jeremy Allison [Thu, 1 Dec 2011 21:24:22 +0000 (13:24 -0800)]
After a discussion with Volker, sdd a backup_intent state to the client struct.

This causes the backup_intent flags to be added to findfirst/findnext
and ntcreate/nttrans_create calls.

cli_set_backup_intent() sets the flag and returns the old value of
its state.

12 years agos4-ntvfs: added allow_override check based on use of NT ACL
Andrew Tridgell [Thu, 1 Dec 2011 02:40:49 +0000 (13:40 +1100)]
s4-ntvfs: added allow_override check based on use of NT ACL

This disables the posix permission override if the calculated
permissions did not come from a NT ACL.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  1 05:14:49 CET 2011 on sn-devel-104

12 years agos4-ntvfs: fixed a unix ACL mapping bug
Andrew Tridgell [Thu, 1 Dec 2011 01:59:23 +0000 (12:59 +1100)]
s4-ntvfs: fixed a unix ACL mapping bug

the ACL mapping code was incorrectly allowing creation of directories
in some situations where it should be denied by the unix permissions

12 years agoselftest: Fix typo in socket wrapper test.
Jelmer Vernooij [Wed, 30 Nov 2011 21:57:18 +0000 (22:57 +0100)]
selftest: Fix typo in socket wrapper test.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  1 00:30:00 CET 2011 on sn-devel-104

12 years agoselftest: Drop broken and unused Kvm target.
Jelmer Vernooij [Wed, 30 Nov 2011 19:42:58 +0000 (20:42 +0100)]
selftest: Drop broken and unused Kvm target.

12 years agoselftest: Don't acquire target when --list was specified.
Jelmer Vernooij [Wed, 30 Nov 2011 19:42:14 +0000 (20:42 +0100)]
selftest: Don't acquire target when --list was specified.

12 years agoUpdate ldb API sigs. ldb-1.1.4
Jelmer Vernooij [Wed, 30 Nov 2011 19:22:47 +0000 (20:22 +0100)]
Update ldb API sigs.

12 years agoBump ldb version to 1.1.4 after introduction of ldb_module_error.
Jelmer Vernooij [Wed, 30 Nov 2011 17:46:31 +0000 (18:46 +0100)]
Bump ldb version to 1.1.4 after introduction of ldb_module_error.

12 years agoselftest: Don't generate subunit file when writing subunit to stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 20:50:23 +0000 (21:50 +0100)]
selftest: Don't generate subunit file when writing subunit to stdout.

12 years agoselftest: Prevent error about unfinished test command when using --list.
Jelmer Vernooij [Sun, 27 Nov 2011 20:07:07 +0000 (21:07 +0100)]
selftest: Prevent error about unfinished test command when using --list.

12 years agos4-tests: Use long option names in test list script, to prevent 'eating' --list argum...
Jelmer Vernooij [Sun, 27 Nov 2011 20:05:09 +0000 (21:05 +0100)]
s4-tests: Use long option names in test list script, to prevent 'eating' --list argument when e.g.  is not set.

12 years agotestr: Use test lists.
Jelmer Vernooij [Sun, 27 Nov 2011 18:59:01 +0000 (19:59 +0100)]
testr: Use test lists.

12 years agos4-testlist: Write diagnostic info to stderr, and purely test info to stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 18:58:30 +0000 (19:58 +0100)]
s4-testlist: Write diagnostic info to stderr, and purely test info to stdout.

12 years agoselftest: Don't use fancy subunit formatters when generating a test list.
Jelmer Vernooij [Sun, 27 Nov 2011 18:57:53 +0000 (19:57 +0100)]
selftest: Don't use fancy subunit formatters when generating a test list.

12 years agoselftest: Don't write subunit output in --list mode.
Jelmer Vernooij [Sun, 27 Nov 2011 18:53:35 +0000 (19:53 +0100)]
selftest: Don't write subunit output in --list mode.

12 years agoselftesthelpers: write warnings to stderr rather than stdout.
Jelmer Vernooij [Sun, 27 Nov 2011 18:52:57 +0000 (19:52 +0100)]
selftesthelpers: write warnings to stderr rather than stdout.

12 years agos3: Attempt to fix the vfs_commit module
Volker Lendecke [Wed, 30 Nov 2011 17:51:27 +0000 (18:51 +0100)]
s3: Attempt to fix the vfs_commit module

This bug went in in 2007. I wonder how much this module is actually used....

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 30 21:46:09 CET 2011 on sn-devel-104

12 years agos4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0
Matthias Dieter Wallnöfer [Mon, 28 Nov 2011 19:55:37 +0000 (20:55 +0100)]
s4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0

This function call together with the lowat feature has been removed in release
3.0 as described in this mailing list post:
http://old.nabble.com/gnutls_transport_set_lowat-deprecated-td32554230.html.

Since we do not make any use of lowat (esprimed by each function call)
we are free to simply omit it on v3.0 and later.

This addresses bug #8537.

Reviewed by: abartlet + metze

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov 30 20:11:14 CET 2011 on sn-devel-104

12 years agos3-waf: fix the build with CTDB_CONTROL_CHECK_SRVIDS.
Günther Deschner [Wed, 30 Nov 2011 15:34:52 +0000 (16:34 +0100)]
s3-waf: fix the build with CTDB_CONTROL_CHECK_SRVIDS.

Volker, Michael, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 30 18:37:29 CET 2011 on sn-devel-104

12 years agos4:gensec/spnego: only try the mechs that match the client given ones
Stefan Metzmacher [Wed, 30 Nov 2011 14:17:05 +0000 (15:17 +0100)]
s4:gensec/spnego: only try the mechs that match the client given ones

Windows-Members of NT4/Samba3 domains, send

MechTypes:
1.3.6.1.4.1.311.2.2.10 [NTLMSSP]
1.2.840.48018.1.2.2    [krb5 broken]
1.2.840.113554.1.2.2   [krb5]

MechToken for NTLMSSP.

This patch makes sure we start NTLMSSP with the given MechToken,
instead of trying to pass the NTLMSSP MechToken to the krb5 backend
first. As that would fail the authentication with an error
instead of trying fallbacks.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 17:03:29 CET 2011 on sn-devel-104

12 years agos4:libcli/raw: implement on top of smbXcli_conn/req
Stefan Metzmacher [Fri, 23 Sep 2011 06:35:17 +0000 (08:35 +0200)]
s4:libcli/raw: implement on top of smbXcli_conn/req

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104

12 years agos4:libcli: do the nbss session request within smbcli_sock_connect_*()
Stefan Metzmacher [Wed, 30 Nov 2011 07:50:11 +0000 (08:50 +0100)]
s4:libcli: do the nbss session request within smbcli_sock_connect_*()

metze

12 years agos4:libcli/raw: remove unused functions
Stefan Metzmacher [Wed, 30 Nov 2011 07:35:33 +0000 (08:35 +0100)]
s4:libcli/raw: remove unused functions

metze

12 years agos4:libcli: use smbcli_sock_connect() in smbcli_socket_connect()
Stefan Metzmacher [Wed, 30 Nov 2011 07:33:29 +0000 (08:33 +0100)]
s4:libcli: use smbcli_sock_connect() in smbcli_socket_connect()

metze

12 years agos4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()
Stefan Metzmacher [Wed, 30 Nov 2011 06:17:31 +0000 (07:17 +0100)]
s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()

metze

12 years agos4:libcli: convert smbcli_transport_connect_* to tevent_req
Stefan Metzmacher [Tue, 29 Nov 2011 10:57:11 +0000 (11:57 +0100)]
s4:libcli: convert smbcli_transport_connect_* to tevent_req

metze

12 years agos4:lib/socket: add socket_connect_multi_ex_*
Stefan Metzmacher [Tue, 29 Nov 2011 15:25:03 +0000 (16:25 +0100)]
s4:lib/socket: add socket_connect_multi_ex_*

This add an async establish hook, that gets called
before a connection success is detected.

This can be used to do a NBT session request
and it makes sure that we don't cancel the connection
on port 445, just because the tcp connect on port
139 worked.

metze

12 years agos3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS
Volker Lendecke [Mon, 31 Oct 2011 15:30:38 +0000 (16:30 +0100)]
s3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS

This should be a lot quicker than PROCESS_EXISTS followed by looking at
serverid.tdb

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 30 12:47:27 CET 2011 on sn-devel-104

12 years agoFix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set...
Jeremy Allison [Wed, 30 Nov 2011 00:31:18 +0000 (16:31 -0800)]
Fix bug 8636 - When returning an ACL without SECINFO_DACL requested, we still set SEC_DESC_DACL_PRESENT in the type field.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 30 04:59:07 CET 2011 on sn-devel-104

12 years agos4-kdc: Add hdb plugin for samba4, to allow kadmin to work
Andrew Bartlett [Tue, 29 Nov 2011 20:45:25 +0000 (07:45 +1100)]
s4-kdc: Add hdb plugin for samba4, to allow kadmin to work

This will help users who are used to the kadmin interface, and could
be extended to import existing MIT or Heimdal keys into a Samba4 AD
domain.

To use, add to your krb5.conf

[kdc]

database = {
   dbname = samba4:
}

or

[kdc]

database = {
   dbname = samba4:/usr/local/samba/etc/smb.conf
}

And copy hdb_samba4.so from PREFIX/modules/hdb to your Heimdal lib directory

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 30 03:22:11 CET 2011 on sn-devel-104

12 years agos3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in db_tdb_fetch()
Michael Adam [Tue, 29 Nov 2011 21:36:48 +0000 (22:36 +0100)]
s3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in db_tdb_fetch()

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104

12 years agobuild: TDB_ERR_NESTING is used unconditionally
Andrew Bartlett [Thu, 24 Nov 2011 12:07:21 +0000 (23:07 +1100)]
build: TDB_ERR_NESTING is used unconditionally

Therefore, do not bother doing an autoconf test looking for it.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 30 00:08:18 CET 2011 on sn-devel-104

12 years agoFix bug 8631 - POSIX ACE x permission becomes rx following mapping to and from a...
Jeremy Allison [Tue, 29 Nov 2011 19:55:39 +0000 (11:55 -0800)]
Fix bug 8631 - POSIX ACE x permission becomes rx following mapping to and from a DACL
Reported by David Disseldorp. Fix based on a patch by David.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Nov 29 22:32:27 CET 2011 on sn-devel-104

12 years agos3:net registry check: adapt to new semantic of dbwrap_fetch with rbt
Gregor Beck [Thu, 3 Nov 2011 13:57:52 +0000 (14:57 +0100)]
s3:net registry check: adapt to new semantic of dbwrap_fetch with rbt

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Nov 29 19:53:30 CET 2011 on sn-devel-104

12 years agos3:net registry check: adapt to new semantic of dbwrap_fetch
Gregor Beck [Mon, 24 Oct 2011 08:25:29 +0000 (10:25 +0200)]
s3:net registry check: adapt to new semantic of dbwrap_fetch

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.
Michael Adam [Thu, 10 Nov 2011 23:49:11 +0000 (00:49 +0100)]
s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.

This implement more correct NTSTATUS handling inside the backends.
This ensures that data.dptr != NULL if return code is NT_STATUS_OK.

12 years agos3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()
Michael Adam [Tue, 29 Nov 2011 14:57:10 +0000 (15:57 +0100)]
s3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()

12 years agos3:net registry check: handle missing version info
Gregor Beck [Mon, 24 Oct 2011 12:29:45 +0000 (14:29 +0200)]
s3:net registry check: handle missing version info

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap_torture: code cleanup
Gregor Beck [Thu, 20 Oct 2011 08:18:24 +0000 (10:18 +0200)]
s3:dbwrap_torture: code cleanup

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos4:libcli/raw: copy smbcli_transport_connect_* to clisocket.c
Stefan Metzmacher [Tue, 29 Nov 2011 11:21:48 +0000 (12:21 +0100)]
s4:libcli/raw: copy smbcli_transport_connect_* to clisocket.c

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Nov 29 17:34:52 CET 2011 on sn-devel-104

12 years agos4:libcli/raw: add transport->ev as copy of transport->socket->event.ctx
Stefan Metzmacher [Tue, 22 Nov 2011 08:36:30 +0000 (09:36 +0100)]
s4:libcli/raw: add transport->ev as copy of transport->socket->event.ctx

We'll remove transport->socket soon, but removing transport->ev
will take a bit longer.

metze

12 years agos4:torture: use tctx->ev as event context for polling
Stefan Metzmacher [Thu, 22 Sep 2011 19:30:13 +0000 (21:30 +0200)]
s4:torture: use tctx->ev as event context for polling

metze

12 years agosmbXcli: add support for SMBreadBraw
Stefan Metzmacher [Fri, 25 Nov 2011 13:49:24 +0000 (14:49 +0100)]
smbXcli: add support for SMBreadBraw

metze

12 years agosmbXcli: add smb1cli_conn_server_{readbraw,writebraw,lockread,writeunlock}()
Stefan Metzmacher [Fri, 25 Nov 2011 14:13:38 +0000 (15:13 +0100)]
smbXcli: add smb1cli_conn_server_{readbraw,writebraw,lockread,writeunlock}()

metze

12 years agos4:gentest: get the tid from the smbcli_tree struct
Stefan Metzmacher [Mon, 28 Nov 2011 19:46:19 +0000 (20:46 +0100)]
s4:gentest: get the tid from the smbcli_tree struct

metze

12 years agos4:libcli/smb2: make sure only one idle event runs at a time
Stefan Metzmacher [Tue, 22 Nov 2011 09:10:30 +0000 (10:10 +0100)]
s4:libcli/smb2: make sure only one idle event runs at a time

metze

12 years agosmb1cli_trans: add support for tevent_req_cancel()
Stefan Metzmacher [Mon, 28 Nov 2011 09:41:25 +0000 (10:41 +0100)]
smb1cli_trans: add support for tevent_req_cancel()

metze

12 years agosmb1cli_trans: return the status from the server if possible
Stefan Metzmacher [Mon, 28 Nov 2011 08:15:11 +0000 (09:15 +0100)]
smb1cli_trans: return the status from the server if possible

metze

12 years agosmbXcli: rebuild smb1.recv_iov array if we expect more than one response
Stefan Metzmacher [Mon, 28 Nov 2011 16:48:44 +0000 (17:48 +0100)]
smbXcli: rebuild smb1.recv_iov array if we expect more than one response

metze

12 years agosmbXcli: allow up to 10 iovec elements for the bytes in smb1cli_req_create()
Stefan Metzmacher [Mon, 28 Nov 2011 14:28:31 +0000 (15:28 +0100)]
smbXcli: allow up to 10 iovec elements for the bytes in smb1cli_req_create()

The smb1cli_trans_* code uses up to 6 elements, which was too much for
the current limit of 5.

metze

12 years agosmbXcli: s/smb2cli_writev_done/smb2cli_req_writev_done
Stefan Metzmacher [Mon, 28 Nov 2011 09:24:18 +0000 (10:24 +0100)]
smbXcli: s/smb2cli_writev_done/smb2cli_req_writev_done

This is a better name and it matches smb1cli_req_writev_done

metze

12 years agosmbXcli: call tevent_queue_stop() for the outgoing queue on disconnect
Stefan Metzmacher [Mon, 28 Nov 2011 09:23:23 +0000 (10:23 +0100)]
smbXcli: call tevent_queue_stop() for the outgoing queue on disconnect

metze

12 years agosmbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()
Stefan Metzmacher [Fri, 25 Nov 2011 12:12:35 +0000 (13:12 +0100)]
smbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()

metze

12 years agolibcli/smb: remove unused smb_signing_set_bsrspyl() prototype
Stefan Metzmacher [Wed, 23 Nov 2011 07:47:31 +0000 (08:47 +0100)]
libcli/smb: remove unused smb_signing_set_bsrspyl() prototype

metze

12 years agos3-passdb: make pdb_password_change_time_max static.
Günther Deschner [Tue, 29 Nov 2011 12:38:59 +0000 (13:38 +0100)]
s3-passdb: make pdb_password_change_time_max static.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Nov 29 15:16:51 CET 2011 on sn-devel-104