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
s3:param: remove unused function lp_string_set()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
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>
libcli: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib: Remove unused serverid_register_msg_flags()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
debug: Fix indentation in debug_parse_params

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
debug: Move variables where they are used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
debug: Factor out debug_parse_param()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
debug: Add some readability to debug_logtype

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
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>
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>
debug: Make Debug1 static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
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>
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>
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>
lib: Use timeval_str_buf in timeval_string

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
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>
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>
debug: Use timeval_str_buf in dbghdrclass

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
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>