metze/samba/wip.git
10 years agosamba-tool: make provision check for bind version
Garming Sam [Thu, 19 Dec 2013 02:06:51 +0000 (15:06 +1300)]
samba-tool: make provision check for bind version

(small corrections and TODO added following Jelmer's review by abartlet)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: Iba9a709641dad9f2ae05df0b26ac4cd2ebfc84f0
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Mar  9 02:52:50 CET 2014 on sn-devel-104

10 years agobuild: Make order of arguments clearer by explicitly making the list of functions...
Andrew Bartlett [Thu, 6 Mar 2014 23:05:19 +0000 (12:05 +1300)]
build: Make order of arguments clearer by explicitly making the list of functions to look for a python list

Change-Id: I19bbd3b34548258201dabdc0ec8dc049e28d0049
Reviewed-by: David Disseldorp <ddiss@samba.org>
Tested-by: Thomas Schulz <schulz@adi.com>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  8 05:53:08 CET 2014 on sn-devel-104

10 years agobuild: Do not rely on sys.platform for ACL tests, combine UnixWare and Solaris ACL...
Andrew Bartlett [Wed, 5 Mar 2014 02:06:02 +0000 (15:06 +1300)]
build: Do not rely on sys.platform for ACL tests, combine UnixWare and Solaris ACL tests

This avoids issues with whatever sys.platform may return, fixes the
order of arguments to the CHECK_FUNCS_IN call, and only runs after
Linux-style POSIX ACL detection fails.

Andrew Bartlett

Change-Id: I930dff1e03c1cd1ceb8f3a35823ceb805694b66a
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Tested-by: Thomas Schulz <schulz@adi.com>
10 years agoFor FSRVP use textual error messages instead of hex error codes
Noel Power [Thu, 6 Mar 2014 11:57:45 +0000 (11:57 +0000)]
For FSRVP use textual error messages instead of hex error codes

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar  8 03:52:44 CET 2014 on sn-devel-104

10 years agoAdd missing FSRVP_E_UNSUPPORTED_CONTEXT constant
Noel Power [Thu, 6 Mar 2014 14:02:26 +0000 (14:02 +0000)]
Add missing FSRVP_E_UNSUPPORTED_CONTEXT constant

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-kerberos: remove unused kdc_name from create_local_private_krb5_conf_for_domain().
Günther Deschner [Fri, 7 Mar 2014 13:47:31 +0000 (14:47 +0100)]
s3-kerberos: remove unused kdc_name from create_local_private_krb5_conf_for_domain().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Mar  7 18:43:57 CET 2014 on sn-devel-104

10 years agos3-kerberos: remove print_kdc_line() completely.
Günther Deschner [Mon, 13 Jan 2014 14:59:26 +0000 (15:59 +0100)]
s3-kerberos: remove print_kdc_line() completely.

Just calling print_canonical_sockaddr() is sufficient, as it already deals with
ipv6 as well. The port handling, which was only done for IPv6 (not IPv4), is
removed as well. It was pointless because it always derived the port number from
the provided address which was either a SMB (usually port 445) or LDAP
connection. No KDC will ever run on port 389 or 445 on a Windows/Samba DC.
Finally, the kerberos libraries that we support and build with, can deal with
ipv6 addresses in krb5.conf, so we no longer put the (unnecessary) burden of
resolving the DC name on the kerberos library anymore.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:lib/socket: simplify iface_list_wildcard() and its callers
Stefan Metzmacher [Thu, 27 Feb 2014 09:28:23 +0000 (10:28 +0100)]
s4:lib/socket: simplify iface_list_wildcard() and its callers

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10464
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Change-Id: Ib317d71dea01fc8ef6b6a26455f15a8a175d59f6
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Mar  7 02:18:17 CET 2014 on sn-devel-104

10 years agos4:lib/socket: use the same logic in iface_list_wildcard() as in smbd
Stefan Metzmacher [Thu, 27 Feb 2014 09:18:35 +0000 (10:18 +0100)]
s4:lib/socket: use the same logic in iface_list_wildcard() as in smbd

If we have ipv6 support we should listen on "::" too.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10464
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Change-Id: I8ce185d5070280149bee9fd33010443be9031089
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agopidl-waf: Only install Yapp::Driver if it is not available.
Andreas Schneider [Fri, 28 Feb 2014 15:00:54 +0000 (16:00 +0100)]
pidl-waf: Only install Yapp::Driver if it is not available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Mar  6 23:30:47 CET 2014 on sn-devel-104

10 years agopidl-waf: Check for system perl(Parse::Yapp::Driver).
Andreas Schneider [Fri, 28 Feb 2014 14:59:45 +0000 (15:59 +0100)]
pidl-waf: Check for system perl(Parse::Yapp::Driver).

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-waf: Add a function to check for a system perl module.
Andreas Schneider [Fri, 28 Feb 2014 14:59:41 +0000 (15:59 +0100)]
pidl-waf: Add a function to check for a system perl module.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-waf: Do not glob to install pidl modules.
Andreas Schneider [Fri, 28 Feb 2014 14:55:46 +0000 (15:55 +0100)]
pidl-waf: Do not glob to install pidl modules.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-waf: Install pidl modules to the perl vendorlib directory.
Andreas Schneider [Fri, 28 Feb 2014 14:53:10 +0000 (15:53 +0100)]
pidl-waf: Install pidl modules to the perl vendorlib directory.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-waf: Remove unused variable pidl_src.
Andreas Schneider [Fri, 28 Feb 2014 14:54:09 +0000 (15:54 +0100)]
pidl-waf: Remove unused variable pidl_src.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoautobuild: Set perl vendorlib direcotry.
Andreas Schneider [Wed, 5 Mar 2014 15:27:15 +0000 (16:27 +0100)]
autobuild: Set perl vendorlib direcotry.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agobuildtools: Add perl vendorlib configure option.
Andreas Schneider [Fri, 28 Feb 2014 14:50:02 +0000 (15:50 +0100)]
buildtools: Add perl vendorlib configure option.

After this patch has been pushed, we need to change autobuild to compile
with this option or we will not be able to install pidl.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agobuildtools: Rename perl vendorarch configure option.
Andreas Schneider [Fri, 28 Feb 2014 14:47:45 +0000 (15:47 +0100)]
buildtools: Rename perl vendorarch configure option.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoRevert "pidl: Install pidl files corrently."
Andreas Schneider [Fri, 28 Feb 2014 14:46:01 +0000 (15:46 +0100)]
Revert "pidl: Install pidl files corrently."

This reverts commit cee11cfa4544425099268cd32393169afb4bb107.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoRevert "waf: Add option to specify perl vendor dir."
Andreas Schneider [Fri, 28 Feb 2014 14:45:51 +0000 (15:45 +0100)]
Revert "waf: Add option to specify perl vendor dir."

This reverts commit 9b200555fec2e33da9521db388d1839375aa8d83.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoRevert "pidl: Make perl(Parse:Yapp:Driver) installation optional."
Andreas Schneider [Fri, 28 Feb 2014 14:45:35 +0000 (15:45 +0100)]
Revert "pidl: Make perl(Parse:Yapp:Driver) installation optional."

This reverts commit f0030c619bcf22dbe9eed54b2c0dc9c61f564838.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoctdb-vacuum: fix delete list counts in delete_marshall_traverse_first
Michael Adam [Fri, 21 Feb 2014 22:43:17 +0000 (23:43 +0100)]
ctdb-vacuum: fix delete list counts in delete_marshall_traverse_first

when bumping skipped, decrement left, so the sum is correct

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Mar  6 03:32:33 CET 2014 on sn-devel-104

10 years agoctdb-vacuum: fix possible cause for delelete_list processing counts left records > 0
Michael Adam [Wed, 19 Feb 2014 23:58:17 +0000 (00:58 +0100)]
ctdb-vacuum: fix possible cause for delelete_list processing counts left records > 0

We need to have left records == 0 at the end of the delete list processing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: systematize counters into various structs
Michael Adam [Wed, 19 Feb 2014 23:32:08 +0000 (00:32 +0100)]
ctdb-vacuum: systematize counters into various structs

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: remove unused counter vdata->total
Michael Adam [Wed, 19 Feb 2014 23:29:47 +0000 (00:29 +0100)]
ctdb-vacuum: remove unused counter vdata->total

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: make ctdb_process_delete_list() void
Michael Adam [Sun, 16 Feb 2014 00:08:18 +0000 (01:08 +0100)]
ctdb-vacuum: make ctdb_process_delete_list() void

The overall return code was not really used anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: make ctdb_process_vacuum_fetch_lists() void.
Michael Adam [Sat, 15 Feb 2014 23:37:43 +0000 (00:37 +0100)]
ctdb-vacuum: make ctdb_process_vacuum_fetch_lists() void.

This constantly returns 0 anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: make ctdb_vacuum_traverse_db() void.
Michael Adam [Sat, 15 Feb 2014 23:35:34 +0000 (00:35 +0100)]
ctdb-vacuum: make ctdb_vacuum_traverse_db() void.

Failure in traversal of the DB should not
prevent further processing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: don't stop in process_vacuum_fetch_lists when sending to one node fails.
Michael Adam [Sat, 15 Feb 2014 23:26:00 +0000 (00:26 +0100)]
ctdb-vacuum: don't stop in process_vacuum_fetch_lists when sending to one node fails.

We should try to continue vacuuming as much as possible.
Failure to send records to one lmaster doesn't mean the
others will fail too.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: catch and log errors to traverse the delete list in ctdb_process_delete_...
Michael Adam [Sat, 15 Feb 2014 17:06:09 +0000 (18:06 +0100)]
ctdb-vacuum: catch and log errors to traverse the delete list in ctdb_process_delete_list()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: catch and log error of traverse in ctdb_process_delete_queue()
Michael Adam [Sat, 15 Feb 2014 16:59:22 +0000 (17:59 +0100)]
ctdb-vacuum: catch and log error of traverse in ctdb_process_delete_queue()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_marshall_traverse_fi...
Michael Adam [Sat, 15 Feb 2014 12:03:51 +0000 (13:03 +0100)]
ctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_marshall_traverse_first()

Spare malloc and free.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: simplify delete_marshall_traverse_first: use tdb_null
Michael Adam [Sat, 15 Feb 2014 12:01:33 +0000 (13:01 +0100)]
ctdb-vacuum: simplify delete_marshall_traverse_first: use tdb_null

we know anyways the record to store is empty at this point.
So skip pointer calculations.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: remove VacuumLimit criterion for triggering a repack
Michael Adam [Fri, 14 Feb 2014 21:05:21 +0000 (22:05 +0100)]
ctdb-vacuum: remove VacuumLimit criterion for triggering a repack

With the new vacuuming, we consider it an error if there are
records left for deletion after processing the various lists.
All records that can be deleted should have been deleted by
tdb_delete calls.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: treat value 0 of tunable VacuumLimit as turning off repacking
Michael Adam [Wed, 12 Feb 2014 16:41:28 +0000 (17:41 +0100)]
ctdb-vacuum: treat value 0 of tunable VacuumLimit as turning off repacking

I.e. no number of records found to delete will trigger the
repacking.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: add consistency check for counts at end of process_delete_list()
Michael Adam [Fri, 14 Feb 2014 21:02:41 +0000 (22:02 +0100)]
ctdb-vacuum: add consistency check for counts at end of process_delete_list()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: log error if records are left for deletion after ctdb_process_delete_list()
Michael Adam [Fri, 14 Feb 2014 21:01:38 +0000 (22:01 +0100)]
ctdb-vacuum: log error if records are left for deletion after ctdb_process_delete_list()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_record_traverse()
Michael Adam [Fri, 14 Feb 2014 20:50:59 +0000 (21:50 +0100)]
ctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_record_traverse()

Spare malloc and free.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: update comment for ctdb_process_delete_queue
Michael Adam [Fri, 14 Feb 2014 17:48:02 +0000 (18:48 +0100)]
ctdb-vacuum: update comment for ctdb_process_delete_queue

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: rename ctdb_vacuum_db_fast --> ctdb_process_delete_queue
Michael Adam [Fri, 14 Feb 2014 17:47:25 +0000 (18:47 +0100)]
ctdb-vacuum: rename ctdb_vacuum_db_fast --> ctdb_process_delete_queue

This describes more precisely what this does.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: update comment for ctdb_vacuum_traverse_db
Michael Adam [Fri, 14 Feb 2014 17:46:49 +0000 (18:46 +0100)]
ctdb-vacuum: update comment for ctdb_vacuum_traverse_db

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: rename ctdb_vacuum_db_full --> ctdb_vacuum_traverse_db
Michael Adam [Fri, 14 Feb 2014 17:42:37 +0000 (18:42 +0100)]
ctdb-vacuum: rename ctdb_vacuum_db_full --> ctdb_vacuum_traverse_db

This describes more precisely what it actually is, nowadays.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: change full db traverse vacuuming to fill delete queue
Michael Adam [Fri, 14 Feb 2014 17:38:31 +0000 (18:38 +0100)]
ctdb-vacuum: change full db traverse vacuuming to fill delete queue

This lets the "fast vacuum" delete queue traverse do the actual work.

On the positive side, we note that this lets the "full vacuuming"
treat the records that have never been migrated with data correctly.
These had previously been added to the delete list for complicated
cross-node deletion instead of directly deleting them.

On the other hand side, there might be a slight overhead
since the records are read again in the delete queu traverse,
but this is OK because this change is in preparation of
untangling the db traverse altogether from the vacuum run,
making it independent.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: run the fast vacuum after the db traverse
Michael Adam [Fri, 14 Feb 2014 17:27:14 +0000 (18:27 +0100)]
ctdb-vacuum: run the fast vacuum after the db traverse

This in preparation of modifying the db traverse to
fill the delete_queue that is processed by the fast
vacuum run, instead of filling the same lists as the
fast vacuum run for further processing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: rename private->private_data in repack_traverse
Michael Adam [Fri, 14 Feb 2014 17:08:20 +0000 (18:08 +0100)]
ctdb-vacuum: rename private->private_data in repack_traverse

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: rename private->private_data in vacuum_traverse
Michael Adam [Fri, 14 Feb 2014 17:07:55 +0000 (18:07 +0100)]
ctdb-vacuum: rename private->private_data in vacuum_traverse

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: extract check for full vacuum run out of ctdb_vacuum_db_full()
Michael Adam [Fri, 14 Feb 2014 17:03:02 +0000 (18:03 +0100)]
ctdb-vacuum: extract check for full vacuum run out of ctdb_vacuum_db_full()

This is more consistent.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: add consistency check for counts to ctdb_vacuum_db_fast()
Michael Adam [Fri, 14 Feb 2014 16:58:01 +0000 (17:58 +0100)]
ctdb-vacuum: add consistency check for counts to ctdb_vacuum_db_fast()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_queue_traverse()
Michael Adam [Fri, 14 Feb 2014 14:28:22 +0000 (15:28 +0100)]
ctdb-vacuum: use tdb_parse_record instead of tdb_fetch in delete_queue_traverse()

this spares malloc and free

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: simplify delete_record_traverse() - free treats NULL
Michael Adam [Fri, 14 Feb 2014 14:35:01 +0000 (15:35 +0100)]
ctdb-vacuum: simplify delete_record_traverse() - free treats NULL

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: simplify delete_queue_traverse() - free treats NULL pointers.
Michael Adam [Fri, 14 Feb 2014 14:34:23 +0000 (15:34 +0100)]
ctdb-vacuum: simplify delete_queue_traverse() - free treats NULL pointers.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: reduce indentation in delete_queue_traverse
Michael Adam [Fri, 14 Feb 2014 14:30:08 +0000 (15:30 +0100)]
ctdb-vacuum: reduce indentation in delete_queue_traverse

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: treat value 0 of tunable RepackLimit as turned off.
Michael Adam [Wed, 12 Feb 2014 16:40:31 +0000 (17:40 +0100)]
ctdb-vacuum: treat value 0 of tunable RepackLimit as turned off.

I.e. when RepackLimit is set to 0, no size of the freelist
should trigger a repack in vacuuming.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: fix treatment of remaining records and statistics in delete_record_trave...
Michael Adam [Fri, 14 Feb 2014 00:55:39 +0000 (01:55 +0100)]
ctdb-vacuum: fix treatment of remaining records and statistics in delete_record_traverse()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: cast freelist_size in comparison.
Michael Adam [Wed, 12 Feb 2014 16:38:56 +0000 (17:38 +0100)]
ctdb-vacuum: cast freelist_size in comparison.

At this point, it is >= 0 anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-vacuum: improve output of delete list statistics
Michael Adam [Thu, 13 Feb 2014 23:53:23 +0000 (00:53 +0100)]
ctdb-vacuum: improve output of delete list statistics

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agos3:smb2_server: avoid talloc_zero_array() in smbd_smb2_request_setup_out()
Stefan Metzmacher [Wed, 4 Dec 2013 14:32:45 +0000 (15:32 +0100)]
s3:smb2_server: avoid talloc_zero_array() in smbd_smb2_request_setup_out()

In the common case with just one request, we can use a preallocated
req->out.vector.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar  6 00:59:29 CET 2014 on sn-devel-104

10 years agos3:smb2_server: don't assume that req->out.vector is always a valid talloc pointer
Stefan Metzmacher [Wed, 4 Dec 2013 14:28:11 +0000 (15:28 +0100)]
s3:smb2_server: don't assume that req->out.vector is always a valid talloc pointer

We use 'req' instead as it has the same lifetime.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: avoid talloc_zero_array() in smbd_smb2_request_error_ex()
Stefan Metzmacher [Wed, 4 Dec 2013 14:24:29 +0000 (15:24 +0100)]
s3:smb2_server: avoid talloc_zero_array() in smbd_smb2_request_error_ex()

It is only important that the content of info->data stays alive
for the lifetime of the request, but the DATA_BLOB structure itself
can be on the stack, while passing it as 'dyn' to smbd_smb2_request_done_ex().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: optimize smbd_smb2_generate_outbody() for the common case
Stefan Metzmacher [Wed, 4 Dec 2013 14:05:34 +0000 (15:05 +0100)]
s3:smb2_server: optimize smbd_smb2_generate_outbody() for the common case

Use a preallocated buffer for the first response in the compound chain.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_write: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_write: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_tcon: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_tcon: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_setinfo: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_setinfo: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_sesssetup: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_sesssetup: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_read: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_read: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_notify: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_notify: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_negprot: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_negprot: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_lock: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_lock: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_keepalive: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_keepalive: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_ioctl: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_ioctl: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_getinfo: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_getinfo: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_flush: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_flush: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_find: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_find: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_create: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_create: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_close: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_close: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_break: make use of smbd_smb2_generate_outbody()
Stefan Metzmacher [Wed, 4 Dec 2013 13:59:07 +0000 (14:59 +0100)]
s3:smb2_break: make use of smbd_smb2_generate_outbody()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: add smbd_smb2_generate_outbody() helper
Stefan Metzmacher [Wed, 4 Dec 2013 11:52:21 +0000 (12:52 +0100)]
s3:smb2_server: add smbd_smb2_generate_outbody() helper

We can add optimization there later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_read: avoid 2 talloc* calls when using sendfile()
Stefan Metzmacher [Wed, 4 Dec 2013 11:32:36 +0000 (12:32 +0100)]
s3:smb2_read: avoid 2 talloc* calls when using sendfile()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: avoid a call to data_blob_clear_free() if not needed
Stefan Metzmacher [Wed, 20 Nov 2013 08:56:48 +0000 (09:56 +0100)]
s3:smb2_server: avoid a call to data_blob_clear_free() if not needed

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: optimize smbd_smb2_request_setup_out()
Stefan Metzmacher [Wed, 20 Nov 2013 08:56:19 +0000 (09:56 +0100)]
s3:smb2_server: optimize smbd_smb2_request_setup_out()

We can use a preallocated buffer for the possible error
response of the first response in the compound chain.

This avoids a talloc_array_zero() call for the common case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_server: optimize req->in.vector allocation
Stefan Metzmacher [Tue, 19 Nov 2013 06:42:57 +0000 (07:42 +0100)]
s3:smb2_server: optimize req->in.vector allocation

We can avoid a talloc_zero_array() call in the
common case (without compound requests) and use a
preallocated array instead.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
Stefan Metzmacher [Fri, 6 Dec 2013 12:56:12 +0000 (13:56 +0100)]
s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar  5 22:53:34 CET 2014 on sn-devel-104

10 years agos3:smbd: fix the maxentries calculation depending on the max_send.
Stefan Metzmacher [Wed, 5 Mar 2014 13:03:42 +0000 (14:03 +0100)]
s3:smbd: fix the maxentries calculation depending on the max_send.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: simplify maxentries calculation in reply_search()
Stefan Metzmacher [Wed, 5 Mar 2014 13:00:40 +0000 (14:00 +0100)]
s3:smbd: simplify maxentries calculation in reply_search()

Using helper variables make it much easier to understand.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: fix the read numtoread calculation depending on the max_send.
Stefan Metzmacher [Tue, 4 Mar 2014 13:07:26 +0000 (14:07 +0100)]
s3:smbd: fix the read numtoread calculation depending on the max_send.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: fix the lockread numtoread calculation depending on the max_send.
Stefan Metzmacher [Tue, 4 Mar 2014 13:07:26 +0000 (14:07 +0100)]
s3:smbd: fix the lockread numtoread calculation depending on the max_send.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
Stefan Metzmacher [Tue, 4 Mar 2014 13:07:26 +0000 (14:07 +0100)]
s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
Stefan Metzmacher [Tue, 4 Mar 2014 13:07:26 +0000 (14:07 +0100)]
s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
Stefan Metzmacher [Fri, 6 Dec 2013 12:53:45 +0000 (13:53 +0100)]
s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c

We're now sure that sconn->smb1.sessions.max_send is >= SMB_BUFFER_SIZE_MIN.
in order to garantee some progress we need to make sure our assumed
header overhead is less than SMB_BUFFER_SIZE_MIN.

Assuming 372 bytes for the SMBtrans headers should still be more than
enough.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request
Stefan Metzmacher [Fri, 6 Dec 2013 12:52:09 +0000 (13:52 +0100)]
s3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request

This makes sure sconn->smb1.sessions.max_send is always >= SMB_BUFFER_SIZE_MIN.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX
Stefan Metzmacher [Fri, 6 Dec 2013 12:50:49 +0000 (13:50 +0100)]
s3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX

SMB_BUFFER_SIZE_MAX is UINT16_MAX and the largest value a client
can possibly specify in the session setup request.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()
Stefan Metzmacher [Fri, 6 Dec 2013 12:45:35 +0000 (13:45 +0100)]
s3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()

The current limit of 128*1024 causes problems as the value has to be
<= UINT16_MAX otherwise some clients get confused, as they want to
use the MaxBufferSize value from the negprot response (uint32_t)
for the MaxBufferSize value in thet session setup request (uint16_t).
E.g. Windows 7 (as client) sends MaxBufferSize = 0 if the server value
is > UINT16_MAX.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
Stefan Metzmacher [Fri, 6 Dec 2013 12:57:15 +0000 (13:57 +0100)]
s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolibcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines
Stefan Metzmacher [Fri, 6 Dec 2013 12:28:35 +0000 (13:28 +0100)]
libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
Stefan Metzmacher [Wed, 19 Feb 2014 12:59:07 +0000 (13:59 +0100)]
s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()

There's really no reason to add such limit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:client: only limit the buffer by the given length 'n'
Stefan Metzmacher [Wed, 19 Feb 2014 12:57:28 +0000 (13:57 +0100)]
s3:client: only limit the buffer by the given length 'n'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
Stefan Metzmacher [Wed, 19 Feb 2014 12:56:06 +0000 (13:56 +0100)]
s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:utils/smbfilter: use a local variable for the packet buffer
Stefan Metzmacher [Wed, 19 Feb 2014 12:54:44 +0000 (13:54 +0100)]
s3:utils/smbfilter: use a local variable for the packet buffer

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agonsswitch: Remove fallback setting of WINBINDD_SOCKET_DIR
Andrew Bartlett [Tue, 18 Feb 2014 22:39:46 +0000 (11:39 +1300)]
nsswitch: Remove fallback setting of WINBINDD_SOCKET_DIR

This is the original cause of the wbc NT_STATUS_OBJECT_NAME_NOT_FOUND issues in recent git master, as the
build was able to progress without the correct path being set as an override.

Andrew Bartlett

Change-Id: I1dbc7350695756356e869199b589eb781eb5c673
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar  5 18:34:48 CET 2014 on sn-devel-104

10 years agolibcli: Add warning about flow control changing macros in ntstatus.h
Andrew Bartlett [Tue, 4 Mar 2014 01:11:09 +0000 (14:11 +1300)]
libcli: Add warning about flow control changing macros in ntstatus.h

Change-Id: I49fec82e55b6bc59d5c0f157df90005f7d891c66
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>