sfrench/samba-autobuild/.git
9 years agoctdb-locking: Add new tunable LockProcessesPerDB
Amitay Isaacs [Tue, 15 Jul 2014 02:13:53 +0000 (12:13 +1000)]
ctdb-locking: Add new tunable LockProcessesPerDB

This allows to change the maximum number of lock processes that can
be active.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Allocate lock request soon after allocating lock context
Amitay Isaacs [Fri, 30 May 2014 05:49:46 +0000 (15:49 +1000)]
ctdb-locking: Allocate lock request soon after allocating lock context

This avoids extra work in case lock request allocation fails.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Remove unused function find_lock_context()
Amitay Isaacs [Tue, 15 Jul 2014 04:44:55 +0000 (14:44 +1000)]
ctdb-locking: Remove unused function find_lock_context()

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Schedule the next possible lock based on per-db limit
Amitay Isaacs [Thu, 29 May 2014 07:27:32 +0000 (17:27 +1000)]
ctdb-locking: Schedule the next possible lock based on per-db limit

This prevents searching through active lock requests for every pending
lock request to check if the pending lock request can be scheduled or not.
The locks are scheduled in strict first-in-first-out order.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Remove multiple lock requests per lock context (part 2)
Amitay Isaacs [Fri, 30 May 2014 05:36:03 +0000 (15:36 +1000)]
ctdb-locking: Remove multiple lock requests per lock context (part 2)

Store only a single request instead of storing a queue in lock context.
Lock request structure does not need to be a linked list any more.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Remove multiple lock requests per lock context (part 1)
Amitay Isaacs [Fri, 30 May 2014 05:36:28 +0000 (15:36 +1000)]
ctdb-locking: Remove multiple lock requests per lock context (part 1)

This was a bad idea and caused out of order scheduling of lock requests.

The logic to append lock requests to existing lock context is already
commented.  Remove the commented code and there is no need to check if
lock_ctx is NULL, since we are always creating a new one.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Remove unused structure members
Amitay Isaacs [Fri, 30 May 2014 03:57:44 +0000 (13:57 +1000)]
ctdb-locking: Remove unused structure members

block_child was used to keep track of a process which was created to debug
why a lock process has blocked.  That logic was replaced to execute an
external debug script.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-locking: Fix the lock_type_str corresponding to LOCK_ALLDB
Amitay Isaacs [Fri, 30 May 2014 03:48:45 +0000 (13:48 +1000)]
ctdb-locking: Fix the lock_type_str corresponding to LOCK_ALLDB

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoselftest: Improve check to detect if nmbd is working.
Andreas Schneider [Fri, 25 Jul 2014 14:45:29 +0000 (16:45 +0200)]
selftest: Improve check to detect if nmbd is working.

With this change you mostly have to wait only for one second till the
tests get executed instead of ten seconds.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Aug  4 17:58:58 CEST 2014 on sn-devel-104

9 years agoselftest: Use the actual name of the nmblookup binary.
Andreas Schneider [Fri, 25 Jul 2014 14:35:25 +0000 (16:35 +0200)]
selftest: Use the actual name of the nmblookup binary.

nmblookup3 is just a binary mapping. We shouldn't use the mapping
anymore.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolib: Remove unused nstrcpy
Volker Lendecke [Mon, 4 Aug 2014 05:29:14 +0000 (07:29 +0200)]
lib: Remove unused nstrcpy

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug  4 09:58:16 CEST 2014 on sn-devel-104

9 years agolib: Make DEBUG a subsystem of its own
Volker Lendecke [Wed, 30 Jul 2014 14:12:54 +0000 (14:12 +0000)]
lib: Make DEBUG a subsystem of its own

In the future this might become a library, but even with the SUBSYSTEM
it should be clear what debug.c depends upon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug  2 00:36:50 CEST 2014 on sn-devel-104

9 years agolib: Make close_low_fd() independently linkable
Volker Lendecke [Thu, 31 Jul 2014 09:40:04 +0000 (09:40 +0000)]
lib: Make close_low_fd() independently linkable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agodebug: Use close_low_fd in reopen_logs_internal
Volker Lendecke [Tue, 29 Jul 2014 18:43:05 +0000 (20:43 +0200)]
debug: Use close_low_fd in reopen_logs_internal

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib: Use close_low_fd in close_low_fds
Volker Lendecke [Tue, 29 Jul 2014 18:42:18 +0000 (20:42 +0200)]
lib: Use close_low_fd in close_low_fds

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib: Add close_low_fd
Volker Lendecke [Tue, 29 Jul 2014 18:35:10 +0000 (20:35 +0200)]
lib: Add close_low_fd

This factors out the essential code from close_low_fds for one file
descriptor: Redirect a fd to /dev/null

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agofix unstrcpy
Volker Lendecke [Tue, 22 Jul 2014 05:02:00 +0000 (07:02 +0200)]
fix unstrcpy

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10735
CVE-2014-3560: unstrcpy macro length is invalid

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Fri Aug  1 22:10:23 CEST 2014 on sn-devel-104

9 years agosamba: Retain case sensitivity of cifs client
Shirish Pargaonkar [Sat, 26 Jul 2014 15:41:25 +0000 (10:41 -0500)]
samba: Retain case sensitivity of cifs client

When a client supports extended security but server does not,
and that client, in Flags2 field of smb header indicates that

- it supports extended security negotiation
- it does not support security signatures
- it does not require security signatures

Samba server treats a client as a Vista client.

That turns off case sensitivity and that is a problem for cifs vfs client.

So include remote cifs client along with remote samba client
to not do so otherwise.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10755

Signed-off-by: Shirish Pargaonkar <spargaonkar@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Aug  1 16:11:43 CEST 2014 on sn-devel-104

9 years agowinbindd-irpc: Ensure not to call irpc_send_reply twice on error
Andrew Bartlett [Thu, 24 Jul 2014 04:01:05 +0000 (16:01 +1200)]
winbindd-irpc: Ensure not to call irpc_send_reply twice on error

As found during investigation of the previous commit, when the RPC
call fails totally, we must only try and send one error reply.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug  1 12:11:29 CEST 2014 on sn-devel-104

9 years agolibcli/auth: Ensure that the dns_names in/out parameter is preserved
Andrew Bartlett [Thu, 24 Jul 2014 03:54:58 +0000 (15:54 +1200)]
libcli/auth: Ensure that the dns_names in/out parameter is preserved

This is in dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords, which has
status variables filled in by the server and placed in this in/out
array.

This showed up as a segfault in winbindd during RODC DNS update.

Andrew Bartlett

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

9 years agowaf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.
Andreas Schneider [Thu, 31 Jul 2014 08:22:10 +0000 (10:22 +0200)]
waf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 31 21:12:07 CEST 2014 on sn-devel-104

9 years agouwrap: Support dropping all supplemetary groups with setgroups()
Jakub Hrozek [Thu, 31 Jul 2014 08:20:40 +0000 (10:20 +0200)]
uwrap: Support dropping all supplemetary groups with setgroups()

Dropping all supplementary groups is a common practice when changing
UIDs. This patch adds support for dropping all supplementary groups when
setgroups is called with size=0.

Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Add logging if uwrap is enabled correctly.
Andreas Schneider [Thu, 31 Jul 2014 08:19:58 +0000 (10:19 +0200)]
uwrap: Add logging if uwrap is enabled correctly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Log error if we are out of memory.
Andreas Schneider [Thu, 31 Jul 2014 08:19:28 +0000 (10:19 +0200)]
uwrap: Log error if we are out of memory.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Add a better logging function.
Andreas Schneider [Thu, 31 Jul 2014 08:18:59 +0000 (10:18 +0200)]
uwrap: Add a better logging function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.
Andreas Schneider [Thu, 31 Jul 2014 08:18:13 +0000 (10:18 +0200)]
uwrap: Check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Fall back to RTLD_NEXT if we can't find libc.
Andreas Schneider [Thu, 31 Jul 2014 08:13:40 +0000 (10:13 +0200)]
uwrap: Fall back to RTLD_NEXT if we can't find libc.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Add mutex in uwrap_destructor().
Andreas Schneider [Thu, 31 Jul 2014 08:13:10 +0000 (10:13 +0200)]
uwrap: Add mutex in uwrap_destructor().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Fix memory leak on error.
Andreas Schneider [Thu, 31 Jul 2014 08:12:15 +0000 (10:12 +0200)]
uwrap: Fix memory leak on error.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agodebug: Avoid dependency on str_list_make
Volker Lendecke [Tue, 29 Jul 2014 18:01:31 +0000 (20:01 +0200)]
debug: Avoid dependency on str_list_make

strtok_r just also does the job and is available in libc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Fix blank line endings
Volker Lendecke [Wed, 30 Jul 2014 09:35:43 +0000 (09:35 +0000)]
debug: Fix blank line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Increase maximum header length
Volker Lendecke [Wed, 30 Jul 2014 09:22:59 +0000 (09:22 +0000)]
debug: Increase maximum header length

With function names it can become quite long

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: In dbghdrclass, don't call strlen repeatedly
Volker Lendecke [Wed, 30 Jul 2014 09:22:21 +0000 (09:22 +0000)]
debug: In dbghdrclass, don't call strlen repeatedly

Also properly protect against header_str overflow

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Fix a typo
Volker Lendecke [Tue, 29 Jul 2014 18:44:28 +0000 (20:44 +0200)]
debug: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Simplify debug_parse_levels
Volker Lendecke [Tue, 29 Jul 2014 16:09:10 +0000 (16:09 +0000)]
debug: Simplify debug_parse_levels

Just some minimal refactoring

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Simplify Debug1() -- no va_args
Volker Lendecke [Tue, 29 Jul 2014 16:04:25 +0000 (16:04 +0000)]
debug: Simplify Debug1() -- no va_args

All callers just have "%s" as format string now, so we don't need to
vasprintf anymore.

This could speed up DEBUG a bit, we don't do a separate copy and the
printf logic

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Remove an "else"
Volker Lendecke [Tue, 29 Jul 2014 15:59:06 +0000 (15:59 +0000)]
debug: Remove an "else"

No else necessary, we just did a "goto done:"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Remove two pointless assignments
Volker Lendecke [Tue, 29 Jul 2014 15:47:07 +0000 (15:47 +0000)]
debug: Remove two pointless assignments

"goto done:" jumps to that exact assignment :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Only call Debug1 once in dbghdrclass
Volker Lendecke [Tue, 29 Jul 2014 15:31:48 +0000 (15:31 +0000)]
debug: Only call Debug1 once in dbghdrclass

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Move adding timeval and loglevel
Volker Lendecke [Tue, 29 Jul 2014 15:26:22 +0000 (15:26 +0000)]
debug: Move adding timeval and loglevel

The whole routine incrementally creates the hdr_string, do it for the
time string and the debuglevel as well

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: slprintf->snprintf
Volker Lendecke [Tue, 29 Jul 2014 15:09:00 +0000 (15:09 +0000)]
debug: slprintf->snprintf

snprintf does not need the -1 in sizeof(buf)-1

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Use timeval_str_buf in dbghdrclass
Volker Lendecke [Tue, 29 Jul 2014 15:06:17 +0000 (15:06 +0000)]
debug: Use timeval_str_buf in dbghdrclass

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Simplify dbghdrclass with an early return
Volker Lendecke [Tue, 29 Jul 2014 15:02:22 +0000 (15:02 +0000)]
debug: Simplify dbghdrclass with an early return

No code change, visible with "git diff -w"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolib: Create time_basic.[ch]
Volker Lendecke [Tue, 29 Jul 2014 18:54:44 +0000 (20:54 +0200)]
lib: Create time_basic.[ch]

Make the two functions that debug.c needs a subsystem of their own. The
goal is to put debug.c on a diet. Anybody who wants to use it should
not be forced to pull in half of Samba :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolib: Use timeval_str_buf in timeval_string
Volker Lendecke [Tue, 29 Jul 2014 14:52:42 +0000 (14:52 +0000)]
lib: Use timeval_str_buf in timeval_string

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolib: Add timeval_str_buf
Volker Lendecke [Tue, 29 Jul 2014 14:43:39 +0000 (14:43 +0000)]
lib: Add timeval_str_buf

Similarly to server_id_str_buf it does not do any allocation

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Statically allocate format_bufr
Volker Lendecke [Tue, 29 Jul 2014 12:58:53 +0000 (12:58 +0000)]
debug: Statically allocate format_bufr

Everybody needs this, so there's no point talloc'ing it. The side effect
is that it removes a dependency on smb_panic()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Fix debug_parse_params
Volker Lendecke [Tue, 29 Jul 2014 12:48:55 +0000 (12:48 +0000)]
debug: Fix debug_parse_params

The additional check this patch removes potentially drops some debuglevel
class settings. While not documented, it is possible to add a debug class
like for example "tdb:10" multiple times with multiple values. Later
settings overwrite earlier ones, but only if the overall number of
settings does not exceed the total number of available debug classes.

This patch changes our behaviour, but I can't imagine a situation where
someone relies on this check.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Make Debug1 static
Volker Lendecke [Tue, 29 Jul 2014 12:22:05 +0000 (12:22 +0000)]
debug: Make Debug1 static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agonmbd: Call DEBUGADD instead of Debug1
Volker Lendecke [Tue, 29 Jul 2014 12:11:54 +0000 (12:11 +0000)]
nmbd: Call DEBUGADD instead of Debug1

These were the only external callers of Debug1. To be honest, I don't
really care if these debug messages now look a bit differently :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Remove a dependency on charconv
Volker Lendecke [Tue, 29 Jul 2014 11:22:09 +0000 (11:22 +0000)]
debug: Remove a dependency on charconv

util_str has:

        /* characters below 0x3F are guaranteed to not appear in
           non-initial position in multi-byte charsets */
        if ((c & 0xC0) == 0) {
                return strrchr(s, c);
        }

'/' is 0x2f, so there's no point in calling strrchr_m and thus pulling
in a whole lot of stuff

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Add some readability to debug_logtype
Volker Lendecke [Tue, 29 Jul 2014 11:20:27 +0000 (11:20 +0000)]
debug: Add some readability to debug_logtype

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Factor out debug_parse_param()
Volker Lendecke [Tue, 29 Jul 2014 11:05:06 +0000 (11:05 +0000)]
debug: Factor out debug_parse_param()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Move variables where they are used
Volker Lendecke [Tue, 29 Jul 2014 10:25:32 +0000 (10:25 +0000)]
debug: Move variables where they are used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agodebug: Fix indentation in debug_parse_params
Volker Lendecke [Tue, 29 Jul 2014 10:23:04 +0000 (10:23 +0000)]
debug: Fix indentation in debug_parse_params

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolib: Remove unused serverid_register_msg_flags()
Volker Lendecke [Mon, 28 Jul 2014 12:27:29 +0000 (12:27 +0000)]
lib: Remove unused serverid_register_msg_flags()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agolibcli: Fix a typo
Volker Lendecke [Tue, 29 Jul 2014 10:05:42 +0000 (10:05 +0000)]
libcli: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove a redundant (and wrong) comment frop lpcfg_service_ok()
Michael Adam [Tue, 29 Jul 2014 10:19:23 +0000 (12:19 +0200)]
param: remove a redundant (and wrong) comment frop lpcfg_service_ok()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos3:param: remove unused function lp_string_set()
Michael Adam [Tue, 29 Jul 2014 10:09:39 +0000 (12:09 +0200)]
s3:param: remove unused function lp_string_set()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/param: change the default for "winbind expand groups" to "0"
Stefan Metzmacher [Thu, 24 Jul 2014 07:12:14 +0000 (09:12 +0200)]
lib/param: change the default for "winbind expand groups" to "0"

Expanding groups requires the usage of SAMR, which is often not possible
with the trust account credentials. This has caused a lot of trouble
in the past, as this is the only operation which requires a member to
contact a dc of a trusted domain directly, which is not always possible.
With this changed default, it should only be required to contact
a dc of our own domain. This is the correct behavior for a domain member.

As expanding groups is mostly cosmetic, we should avoid it.
This is similar to "winbind enum users" and "winbind enum groups",
which are also off by default.

Only some broken applications calculate the group memberships of
users by traversing groups, such applications will require
"winbind expand groups = 1".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 31 18:48:36 CEST 2014 on sn-devel-104

9 years agodebug: Remove thread-related code from debug.c
Volker Lendecke [Wed, 30 Jul 2014 10:19:58 +0000 (10:19 +0000)]
debug: Remove thread-related code from debug.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 31 16:20:53 CEST 2014 on sn-devel-104

9 years agosmbd4: Remove process_model_thread
Volker Lendecke [Wed, 30 Jul 2014 10:13:41 +0000 (10:13 +0000)]
smbd4: Remove process_model_thread

This code has not seen any use or development for a while. While probably
being a good source of inspiration, it will inevitably bit-rot. To really
get to a multi-threaded process model, many of the Samba libraries have
to be made thread-safe.

Why this patch? Right now I am trying to clean up our debug system,
and process_thread.c is the only reference to the _suspicious_ functions
in debug.c. The alternative would be to factor those out of debug, but
as this code is unused for so long, the alternative approach is to just
remove it.

If someone wants to restart development on a threaded process model,
the code is still around in the git history and can be resurrected easily.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoctdb-eventscripts: Remove special case for virtio_net
Martin Schwenke [Tue, 29 Jul 2014 05:08:36 +0000 (15:08 +1000)]
ctdb-eventscripts: Remove special case for virtio_net

The current check is incorrect in 2 ways:

* Commit be71a84565e9e7532a77c175732b764d1f42c1cd contained a thinko
  that stops virtio_net interfaces from simply being marked up

* virtio_net interfaces can actually be down

virtio_net has supported ethtool since Linux 2.6.29, so just remove
the special case.  This means that testing CTDB on very old virtual
machines is not supported.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jul 31 13:08:47 CEST 2014 on sn-devel-104

9 years agoparam: Add errors for when an s3 context is used incorrectly
Garming Sam [Fri, 11 Jul 2014 02:01:33 +0000 (14:01 +1200)]
param: Add errors for when an s3 context is used incorrectly

Change-Id: I176b4413769f41739639875ab874a3e340b6a184
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 31 10:41:58 CEST 2014 on sn-devel-104

9 years agoparam: get rid of unnecessary get_default_loadparm_service pointer
Garming Sam [Wed, 9 Jul 2014 01:04:00 +0000 (13:04 +1200)]
param: get rid of unnecessary get_default_loadparm_service pointer

Change-Id: I9f512be671e5cd738c43fd97c9c3e0b4ee7a2736
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove unused lp_do_parameter from s3 helpers
Garming Sam [Thu, 17 Apr 2014 01:59:30 +0000 (13:59 +1200)]
param: remove unused lp_do_parameter from s3 helpers

Change-Id: I0de55ee30beb6b94350700afcdb85155e913bda8
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove unnecessary lp_do_parameter call
Garming Sam [Thu, 17 Apr 2014 01:49:05 +0000 (13:49 +1200)]
param: remove unnecessary lp_do_parameter call

Change-Id: I0cd1842bac3fcb6dde7236b87d5d235f10277e60
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoparam: remove lp_get_parameter
Garming Sam [Wed, 9 Jul 2014 00:25:36 +0000 (12:25 +1200)]
param: remove lp_get_parameter

Ensure lpcfg_parm_struct, its counterpart is equivalent

Change-Id: I127ce5d3cf7fe02ebf161aa011ec3b41bc32a656
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: move all lp context setup to a single function
Garming Sam [Thu, 17 Apr 2014 01:48:24 +0000 (13:48 +1200)]
s3:param: move all lp context setup to a single function

Change-Id: Ife53e3946a4958d81cbe892bc554520561058c65
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: Ensure that the service pointers are not used directly.
Garming Sam [Mon, 7 Jul 2014 03:40:45 +0000 (15:40 +1200)]
s3:param: Ensure that the service pointers are not used directly.

Change-Id: I750301d80981546a84f17995883fae26398d17b8
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove init printer values from s3-helpers
Garming Sam [Thu, 27 Mar 2014 02:32:42 +0000 (15:32 +1300)]
param: remove init printer values from s3-helpers

Change-Id: I2c4a85b4f5039158924982a277be20ebc2d6302e
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: move init_printer_values to lib/param
Garming Sam [Thu, 27 Mar 2014 02:27:40 +0000 (15:27 +1300)]
param: move init_printer_values to lib/param

Change-Id: I45df7d589c742d6e5572b0950daed563533cca3c
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: change init_printer_values to take an lp ctx
Garming Sam [Thu, 27 Mar 2014 02:03:37 +0000 (15:03 +1300)]
param: change init_printer_values to take an lp ctx

Change-Id: I55cda94bbf1daf276ec0c45b056bd81645eaa25f
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: add the necessary new line for the debug message in handle_copy
Garming Sam [Thu, 27 Mar 2014 01:22:41 +0000 (14:22 +1300)]
param: add the necessary new line for the debug message in handle_copy

Change-Id: Ia6fc12b9d85032b6f501395cd82c31bcfe229822
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: add missing talloc_free in lpcfg_file_list_changed which are present in s3
Garming Sam [Tue, 6 May 2014 04:04:01 +0000 (16:04 +1200)]
param: add missing talloc_free in lpcfg_file_list_changed which are present in s3

Change-Id: Ib363069f5ecc4fc743aadf143efd640e00d74543
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: make is_default method static again
Garming Sam [Tue, 8 Jul 2014 23:44:51 +0000 (11:44 +1200)]
param: make is_default method static again

Change-Id: Icf509a5a8098efcc94e4372742ca9a20a987ad9e
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove unused dump_globals
Garming Sam [Thu, 27 Mar 2014 02:04:12 +0000 (15:04 +1300)]
param: remove unused dump_globals

Change-Id: Id55884c2809ada9c37a4ae306f3a09ecee0fe992
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: use lpcfg_dump_globals in s3 loadparm
Garming Sam [Wed, 26 Mar 2014 19:51:56 +0000 (08:51 +1300)]
param: use lpcfg_dump_globals in s3 loadparm

Change-Id: I7f7f5238a47e0c3634757b74f3f852ce36988614
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: rename dump_globals
Garming Sam [Thu, 20 Mar 2014 21:45:51 +0000 (10:45 +1300)]
param: rename dump_globals

Change-Id: Ia587b8c968dedfcf9b3374d4a4f87bfaa37b01be
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: allow dump_globals to check the actual defaults
Garming Sam [Thu, 20 Mar 2014 21:44:15 +0000 (10:44 +1300)]
param: allow dump_globals to check the actual defaults

Change-Id: Ia5f30b6922b2e836d3e93403c61458ee58d993fd
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove is_default method in s3
Garming Sam [Thu, 27 Mar 2014 02:33:03 +0000 (15:33 +1300)]
param: remove is_default method in s3

Change-Id: Ia9c7422c5f7b56eb81ad644b369bfa36849e963e
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: make is_default more generic
Garming Sam [Thu, 20 Mar 2014 21:27:46 +0000 (10:27 +1300)]
param: make is_default more generic

Change-Id: Ie380bb7083d96e4ebb1574b7d1e3df0b34f70352
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove unused service_ok function
Garming Sam [Thu, 20 Mar 2014 20:34:18 +0000 (09:34 +1300)]
param: remove unused service_ok function

Change-Id: I0736a3b9b73aa80f529327ec70e856dd7fc008c6
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: use lpcfg_service_ok in s3 loadparm
Garming Sam [Thu, 20 Mar 2014 20:33:01 +0000 (09:33 +1300)]
param: use lpcfg_service_ok in s3 loadparm

Change-Id: Ic157d3f5ec7ac9a72db86239e76cd743149cb8e0
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: add extra condition in lpcfg_service_ok
Garming Sam [Thu, 20 Mar 2014 20:30:26 +0000 (09:30 +1300)]
param: add extra condition in lpcfg_service_ok

Change-Id: Id9a95748904516fd34869fee61b1e85b6d14f083
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: remove lp_string_set from the s3_fns.
Garming Sam [Tue, 29 Jul 2014 10:05:22 +0000 (12:05 +0200)]
s3:param: remove lp_string_set from the s3_fns.

This is not used any more.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: remove unnecessary uses of lp_string_set
Garming Sam [Thu, 20 Mar 2014 20:10:52 +0000 (09:10 +1300)]
param: remove unnecessary uses of lp_string_set

Change-Id: I190e8b62dee24c998f388eae1cc9558e6b8bc925
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: add lp_ctx as a parameter to init_globals
Garming Sam [Thu, 20 Mar 2014 02:19:15 +0000 (15:19 +1300)]
s3:param: add lp_ctx as a parameter to init_globals

Change-Id: I8804923241d782eb82675c5a56d53b5ba720fdf0
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: use lpcfg_do_*_paramter instead of lp_do_parameter in do_parameter
Garming Sam [Thu, 20 Mar 2014 01:38:37 +0000 (14:38 +1300)]
s3:param: use lpcfg_do_*_paramter instead of lp_do_parameter in do_parameter

Change-Id: I08ab5d9db9323a2ef4fa2243ff0b0b7efe73a23b
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoparam: Use the correct flag locations with lpcfg_parm_is_cmdline
Garming Sam [Wed, 9 Jul 2014 01:15:33 +0000 (13:15 +1200)]
param: Use the correct flag locations with lpcfg_parm_is_cmdline

s3 flags are no longer being stored in the param table anymore.
They shouldn't be used in this manner anymore.

Change-Id: Ib97492fd9149e30d7756ca603f79321d7516f19b
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:param: simplify lp_do_parameter to use lpcfg functions
Garming Sam [Thu, 20 Mar 2014 02:16:37 +0000 (15:16 +1300)]
s3:param: simplify lp_do_parameter to use lpcfg functions

Change-Id: I907794fbbc15ecc4e88e0f6b0d510788e0fca745
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agosmbd: Change logging level for denied share access
Christof Schmitt [Wed, 30 Jul 2014 15:42:33 +0000 (08:42 -0700)]
smbd: Change logging level for denied share access

A user without access in the share acl can easily trigger those
warnings. Change the logging level, so that they do not appear with the
default logging level.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 31 01:17:30 CEST 2014 on sn-devel-104

9 years agos3:param: move a variable into scope in lp_file_list_changed
Michael Adam [Fri, 25 Jul 2014 23:30:17 +0000 (01:30 +0200)]
s3:param: move a variable into scope in lp_file_list_changed

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jul 30 15:59:11 CEST 2014 on sn-devel-104

9 years agolib/util: remove outdated comment from debug.c
Michael Adam [Mon, 28 Jul 2014 13:51:08 +0000 (15:51 +0200)]
lib/util: remove outdated comment from debug.c

These variables do not exist any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos3: net time - fix usage and core dump.
Jeremy Allison [Tue, 29 Jul 2014 21:12:31 +0000 (14:12 -0700)]
s3: net time - fix usage and core dump.

Bug 10728 - 'net time system' segfaults

https://bugzilla.samba.org/show_bug.cgi?id=10728

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jul 30 13:32:47 CEST 2014 on sn-devel-104

9 years agos3: xml-docs. Ensure users of 'net time' know the remote server must be specified...
Jeremy Allison [Tue, 29 Jul 2014 19:29:37 +0000 (12:29 -0700)]
s3: xml-docs. Ensure users of 'net time' know the remote server must be specified with -S.

Bug 10728 - 'net time system' segfaults

https://bugzilla.samba.org/show_bug.cgi?id=10728

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
9 years agotests: dnsserver: Remove duplicate empty test function
Amitay Isaacs [Mon, 28 Jul 2014 08:08:55 +0000 (18:08 +1000)]
tests: dnsserver: Remove duplicate empty test function

This test function is defined further in the file.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 30 07:00:57 CEST 2014 on sn-devel-104

9 years agos3: winbindd: On new client connect, prune idle or hung connections older than "winbi...
Jeremy Allison [Fri, 25 Jul 2014 19:46:46 +0000 (12:46 -0700)]
s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"

Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found

https://bugzilla.samba.org/show_bug.cgi?id=3204

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 29 23:31:14 CEST 2014 on sn-devel-104

9 years agos3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with...
Jeremy Allison [Fri, 25 Jul 2014 19:44:53 +0000 (12:44 -0700)]
s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with man page.

"This parameter specifies the number of seconds the winbindd
daemon will wait before disconnecting either a client connection
with no outstanding requests (idle) or a client connection with a
request that has remained outstanding (hung) for longer than this
number of seconds."

Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found

https://bugzilla.samba.org/show_bug.cgi?id=3204

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
9 years agotests: dnsserver: Add a update test with name set to '.'
Amitay Isaacs [Mon, 28 Jul 2014 08:09:37 +0000 (18:09 +1000)]
tests: dnsserver: Add a update test with name set to '.'

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 29 19:33:19 CEST 2014 on sn-devel-104