kai/samba-autobuild/.git
2 years agos3: VFS: shadow_copy2: Fix length comparison to ensure we don't overstep a length.
Jeremy Allison [Fri, 20 Jan 2017 19:48:40 +0000 (11:48 -0800)]
s3: VFS: shadow_copy2: Fix length comparison to ensure we don't overstep a length.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: VFS: shadow_copy2: Ensure pathnames for parameters are correctly relative and...
Jeremy Allison [Fri, 20 Jan 2017 19:45:54 +0000 (11:45 -0800)]
s3: VFS: shadow_copy2: Ensure pathnames for parameters are correctly relative and terminated.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: VFS: shadow_copy2: Correctly initialize timestamp and stripped variables.
Jeremy Allison [Fri, 20 Jan 2017 19:42:39 +0000 (11:42 -0800)]
s3: VFS: shadow_copy2: Correctly initialize timestamp and stripped variables.

Allow the called functions to be fixed to not touch them on error.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: smbd: Make set_conn_connectpath() call canonicalize_absolute_path().
Jeremy Allison [Tue, 17 Jan 2017 19:35:52 +0000 (11:35 -0800)]
s3: smbd: Make set_conn_connectpath() call canonicalize_absolute_path().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: smbtorture: Add new local test LOCAL-CANONICALIZE-PATH
Jeremy Allison [Fri, 27 Jan 2017 00:08:42 +0000 (16:08 -0800)]
s3: smbtorture: Add new local test LOCAL-CANONICALIZE-PATH

Tests new canonicalize_absolute_path() function.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: lib: Fix two old, old bugs in set_conn_connectpath(), now in canonicalize_absolut...
Jeremy Allison [Thu, 19 Jan 2017 23:18:41 +0000 (15:18 -0800)]
s3: lib: Fix two old, old bugs in set_conn_connectpath(), now in canonicalize_absolute_path().

Canonicalizing a path of /foo/bar/../baz would return /foo/barbaz
as moving forward 3 characters would delete the / character.

Canonicalizing /foo/.. would end up as '\0'.

Test to follow.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: lib: Add canonicalize_absolute_path().
Jeremy Allison [Tue, 17 Jan 2017 19:33:18 +0000 (11:33 -0800)]
s3: lib: Add canonicalize_absolute_path().

Resolves any invalid path components (.) (..)
in an absolute POSIX path.

We will be re-using this in several places.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agos3: smbd: Correctly canonicalize any incoming shadow copy path.
Jeremy Allison [Thu, 12 Jan 2017 00:30:38 +0000 (16:30 -0800)]
s3: smbd: Correctly canonicalize any incoming shadow copy path.

Converts to:

@GMT-token/path/last_component

from all incoming path types. Allows shadow_copy modules
to work when current directory is changed after removing
last component.

Ultimately when the VFS ABI is changed to add a timestamp
to struct smb_filename, this is where the parsing will be
done.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2 years agobuild: vfs_posix_eadb is only built with the AD DC enabled
Andrew Bartlett [Mon, 30 Jan 2017 10:18:12 +0000 (23:18 +1300)]
build: vfs_posix_eadb is only built with the AD DC enabled

This was found building a static smbd without the AD DC

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Jan 30 17:24:26 CET 2017 on sn-devel-144

2 years agos3:winbindd: document "winbind:ignore domains"
David Mulder [Mon, 23 Jan 2017 21:44:03 +0000 (14:44 -0700)]
s3:winbindd: document "winbind:ignore domains"

The "winbind:ignore domains" smb.conf option is undocumented but used frequently.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan 30 12:24:47 CET 2017 on sn-devel-144

2 years agos3/rpc_server/mdssvc: Generate flex/bison files in build
Noel Power [Tue, 17 Jan 2017 16:02:27 +0000 (16:02 +0000)]
s3/rpc_server/mdssvc: Generate flex/bison files in build

Build the generated files at build time instead of using a committed version
generated at some point in the past.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Jan 28 13:26:01 CET 2017 on sn-devel-144

2 years agovfs_fruit: checks wrong AAPL config state and so always uses readdirattr
Ralph Boehme [Thu, 26 Jan 2017 10:49:55 +0000 (11:49 +0100)]
vfs_fruit: checks wrong AAPL config state and so always uses readdirattr

readdirattr should only be enabled if the client enables it via AAPL
negotitiation, not for all clients when vfs_fruit is loaded.

Unfortunately the check in fruit_readdir_attr() is

  if (!config->use_aapl) {
    return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
  }

This uses the wrong config state "use_aapl" which is always true by
default (config option "fruit:aapl").

We must use "nego_aapl" instead which is only true if the client
really negotiated this feature.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jan 28 01:49:11 CET 2017 on sn-devel-144

2 years agoselftest: add test for global "smb encrypt=off"
Ralph Boehme [Wed, 18 Jan 2017 15:23:40 +0000 (16:23 +0100)]
selftest: add test for global "smb encrypt=off"

Test various combinations of having encryption globally turned off and
enabled (desired/required) on a share, with SMB1 UNIX Extensions and SMB3.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoselftest: disable SMB encryption in simpleserver environment
Ralph Boehme [Tue, 17 Jan 2017 16:23:51 +0000 (17:23 +0100)]
selftest: disable SMB encryption in simpleserver environment

Encryption is currently not tested in this env so we can safely turn it
off. The next commit will add a blackbox tests that test combinations of
having encryption globally turned off and enabled (desired/required) on
a share.

This also adds a new share "enc_desired" with "smb encrypt = desired"
which will be used by the test in the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodocs: impact of a global "smb encrypt=off" on a share with "smb encrypt=required"
Ralph Boehme [Mon, 16 Jan 2017 14:45:32 +0000 (15:45 +0100)]
docs: impact of a global "smb encrypt=off" on a share with "smb encrypt=required"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3/smbd: ensure global "smb encrypt = off" is effective for share with "smb encrypt...
Ralph Boehme [Mon, 16 Jan 2017 11:56:10 +0000 (12:56 +0100)]
s3/smbd: ensure global "smb encrypt = off" is effective for share with "smb encrypt = desired"

If encryption is disabled globally, per definition we shouldn't allow
enabling encryption on individual shares.

The behaviour of specifying

[Global]
  smb encrypt = off

[share]
  smb encrypt = desired

must be an unecrypted tree connect to the share "share".

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3/smbd: ensure global "smb encrypt = off" is effective for SMB 3.1.1 clients
Ralph Boehme [Thu, 5 Jan 2017 11:14:35 +0000 (12:14 +0100)]
s3/smbd: ensure global "smb encrypt = off" is effective for SMB 3.1.1 clients

If encryption is disabled globally, per definition we shouldn't allow
enabling encryption on individual shares.

The behaviour of setting

[Global]
  smb encrypt = off

[share]
  smb encrypt = required

must be to completely deny access to the share "share".

This was working correctly for clients when using SMB 3 dialects <
3.1.1, but not for 3.1.1 with a negprot encryption context.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3/smbd: ensure global "smb encrypt = off" is effective for SMB 1 clients
Ralph Boehme [Wed, 18 Jan 2017 15:19:15 +0000 (16:19 +0100)]
s3/smbd: ensure global "smb encrypt = off" is effective for SMB 1 clients

If encryption is disabled globally, per definition we shouldn't allow
enabling encryption on individual shares.

The behaviour of setting

[Global]
  smb encrypt = off

[share_required]
  smb encrypt = required

[share_desired]
  smb encrypt = desired

must be to completely deny access to the share "share_required" and an
unencrypted connection to "share_desired".

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodocs: Improve description of "unix_primary_group" parameter in idmap_ad manpage
John Mulligan [Fri, 13 Jan 2017 06:33:01 +0000 (07:33 +0100)]
docs: Improve description of "unix_primary_group" parameter in idmap_ad manpage

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

Signed-off-by: John Mulligan <jmulligan@nasuni.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jan 27 20:58:18 CET 2017 on sn-devel-144

2 years agoselftest/Samba3: use "server min protocol = SMB3_00" for "ktest"
Stefan Metzmacher [Wed, 25 Jan 2017 20:15:44 +0000 (21:15 +0100)]
selftest/Samba3: use "server min protocol = SMB3_00" for "ktest"

This verifies that clients can still connect with that setting.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 27 12:03:39 CET 2017 on sn-devel-144

2 years agos3:smbd: allow "server min protocol = SMB3_00" to go via "SMB 2.???" negprot
Stefan Metzmacher [Wed, 18 Jan 2017 07:37:30 +0000 (08:37 +0100)]
s3:smbd: allow "server min protocol = SMB3_00" to go via "SMB 2.???" negprot

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos3:libsmb: use a local got_kerberos_mechanism variable in cli_session_creds_prepare_k...
Stefan Metzmacher [Fri, 4 Nov 2016 11:57:28 +0000 (12:57 +0100)]
s3:libsmb: use a local got_kerberos_mechanism variable in cli_session_creds_prepare_krb5()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:client: don't use cli->use_kerberos && cli->got_kerberos_mechanism in smbspool.c
Stefan Metzmacher [Fri, 4 Nov 2016 11:53:43 +0000 (12:53 +0100)]
s3:client: don't use cli->use_kerberos && cli->got_kerberos_mechanism in smbspool.c

We already know if we want to use kerberos and there's no point
in altering the error message if we tried but failed to use kerberos.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agorpc_server: Allow to configure the port range for RPC services
Andreas Schneider [Mon, 16 Jan 2017 11:05:09 +0000 (12:05 +0100)]
rpc_server: Allow to configure the port range for RPC services

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agorpc_server: Use the RPC TCPIP ports of Windows
Andreas Schneider [Mon, 16 Jan 2017 10:43:12 +0000 (11:43 +0100)]
rpc_server: Use the RPC TCPIP ports of Windows

Since Windows Server 2008 Microsoft uses a different port range for RPC
services. Before it was 1024-65535 and they changed it to 49152-65535.

We should use the same range as these are the ports the firewall in AD
networks normally allow.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agowaf: backport finding of pkg-config
Uri Simchoni [Thu, 19 Jan 2017 05:46:57 +0000 (07:46 +0200)]
waf: backport finding of pkg-config

Allow the builder to customize the location of pkg-config
utility by setting PKGCONFIG environment variable.

This is backported from upstream waf.

Thanks to Zentaro Kavanagh <zentaro@google.com> for
pointing that out and proposing the fix.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 25 04:23:00 CET 2017 on sn-devel-144

2 years agos4-torture: add more NDR tests for GetCorePrinterDrivers
Günther Deschner [Fri, 25 Nov 2016 16:32:51 +0000 (17:32 +0100)]
s4-torture: add more NDR tests for GetCorePrinterDrivers

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 24 14:42:34 CET 2017 on sn-devel-144

2 years agolibrpc/ndr: add [to_null] keyword to szPackageId in spoolss_CorePrinterDriver.
Günther Deschner [Tue, 1 Nov 2016 17:19:02 +0000 (18:19 +0100)]
librpc/ndr: add [to_null] keyword to szPackageId in spoolss_CorePrinterDriver.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4-torture: add some NDR tests for validating ndr_push_charset behavior.
Günther Deschner [Fri, 13 Jan 2017 12:16:22 +0000 (13:16 +0100)]
s4-torture: add some NDR tests for validating ndr_push_charset behavior.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agopidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL
Günther Deschner [Mon, 23 Jan 2017 13:50:45 +0000 (14:50 +0100)]
pidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agolibrpc/ndr: add ndr_push_charset_to_null and increase library version (abi change)
Günther Deschner [Wed, 11 Jan 2017 15:57:49 +0000 (16:57 +0100)]
librpc/ndr: add ndr_push_charset_to_null and increase library version (abi change)

We were crashing earlier when calculating the length of NULL strings in
fixed size arrays (noticed while replying with an empty
spoolss_CorePrinterDriver struct within the spoolss_GetCorePrinterDrivers
call).

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agowinbind: Don't add duplicate IDs in wbinfo -r
Volker Lendecke [Wed, 18 Jan 2017 15:54:03 +0000 (16:54 +0100)]
winbind: Don't add duplicate IDs in wbinfo -r

We look at the netsamlogon_cache entry twice: Once in queryuser and
once in lookupusergroups_cached. This can add the group SID twice.

Use add_sid_to_array_unique to avoid this.

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): Tue Jan 24 02:36:19 CET 2017 on sn-devel-144

2 years agolibcli: Add an overflow check
Volker Lendecke [Wed, 18 Jan 2017 15:43:56 +0000 (16:43 +0100)]
libcli: Add an overflow check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibcli: Do not overwrite pointer on realloc failure
Volker Lendecke [Wed, 18 Jan 2017 15:43:35 +0000 (16:43 +0100)]
libcli: Do not overwrite pointer on realloc failure

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agowinbind: Fix a typo
Volker Lendecke [Fri, 13 Jan 2017 06:33:24 +0000 (07:33 +0100)]
winbind: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3/smbd: check for invalid access_mask smbd_calculate_access_mask()
Ralph Boehme [Mon, 23 Jan 2017 15:19:06 +0000 (16:19 +0100)]
s3/smbd: check for invalid access_mask smbd_calculate_access_mask()

This makes us pass "base.createx_access".

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoselftest: also run test base.createx_access against ad_dc
Ralph Boehme [Mon, 23 Jan 2017 16:35:51 +0000 (17:35 +0100)]
selftest: also run test base.createx_access against ad_dc

Fails currently, will be made to work in the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoAdd explicit dependency on samba-debug from libinterfaces and libserverrole.
Zentaro Kavanagh [Tue, 17 Jan 2017 20:40:01 +0000 (12:40 -0800)]
Add explicit dependency on samba-debug from libinterfaces and libserverrole.

Currently these dependencies are indirect via a SAMBA_SUBSYSTEM
which does not propagate private library information. This results
in these 2 libraries getting generated with no RPATH information
in the ELF header.

Additional discussion [1].

[1] -
https://lists.samba.org/archive/samba-technical/2017-January/118078.html

Signed-off-by: Zentaro Kavanagh <zentaro@google.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan 23 08:26:43 CET 2017 on sn-devel-144

2 years agoselftest: Remove unsued variables WINBINDD_PRIV_PIPE_DIR and wbsockprivdir
Andrew Bartlett [Tue, 3 Jan 2017 18:58:15 +0000 (07:58 +1300)]
selftest: Remove unsued variables WINBINDD_PRIV_PIPE_DIR and wbsockprivdir

I can not find anything that uses these in the testsuite

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Jan 22 22:15:01 CET 2017 on sn-devel-144

2 years agoparam: Remove winbindd privileged socket directory option
Andrew Bartlett [Tue, 3 Jan 2017 07:46:59 +0000 (20:46 +1300)]
param: Remove winbindd privileged socket directory option

This option is unused and has not been used since before Samba 4.3
when the source4/ winbindd code went away.

The associated dynconfig parameters used for the default are also removed.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib/util: Avoid a talloc in ms_fnmatch_protocol
Volker Lendecke [Tue, 25 Oct 2016 10:46:00 +0000 (12:46 +0200)]
lib/util: Avoid a talloc in ms_fnmatch_protocol

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos3/lib: Use ms_fnmatch_protocol in mask_match
Volker Lendecke [Tue, 25 Oct 2016 10:28:44 +0000 (12:28 +0200)]
s3/lib: Use ms_fnmatch_protocol in mask_match

This avoids the talloc/free through push_ucs2_talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib: Add "is_case_sensitive" to ms_fnmatch_protocol
Volker Lendecke [Tue, 25 Oct 2016 09:53:53 +0000 (11:53 +0200)]
lib: Add "is_case_sensitive" to ms_fnmatch_protocol

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib/util/charset: Optimize next_codepoint for the ascii case
Volker Lendecke [Tue, 25 Oct 2016 10:28:12 +0000 (12:28 +0200)]
lib/util/charset: Optimize next_codepoint for the ascii case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agos3/locking: Avoid a talloc for nonexisting fetch_share_mode_unlocked
Volker Lendecke [Mon, 24 Oct 2016 15:32:17 +0000 (17:32 +0200)]
s3/locking: Avoid a talloc for nonexisting fetch_share_mode_unlocked

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agosmbd: Streamline get_ea_names_from_file
Volker Lendecke [Thu, 20 Oct 2016 14:33:55 +0000 (16:33 +0200)]
smbd: Streamline get_ea_names_from_file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agosmbd: Fix an indentation
Volker Lendecke [Wed, 26 Oct 2016 10:20:39 +0000 (12:20 +0200)]
smbd: Fix an indentation

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agosmbd: Fix a few signed/unsigned hickups
Volker Lendecke [Wed, 26 Oct 2016 10:56:53 +0000 (12:56 +0200)]
smbd: Fix a few signed/unsigned hickups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib: Avoid a "includes.h"
Volker Lendecke [Tue, 25 Oct 2016 13:42:28 +0000 (15:42 +0200)]
lib: Avoid a "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agosmbd: Fix a typo
Volker Lendecke [Thu, 20 Oct 2016 14:48:12 +0000 (16:48 +0200)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib: Avoid an includes.h
Volker Lendecke [Sun, 1 Jan 2017 20:05:12 +0000 (20:05 +0000)]
lib: Avoid an includes.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agolib: Add lib/util/server_id.h
Volker Lendecke [Sun, 1 Jan 2017 20:00:55 +0000 (20:00 +0000)]
lib: Add lib/util/server_id.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 years agovfs_default: unlock the right file in copy chunk
Björn Jacke [Thu, 19 Jan 2017 20:51:41 +0000 (21:51 +0100)]
vfs_default: unlock the right file in copy chunk

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sat Jan 21 17:00:54 CET 2017 on sn-devel-144

2 years agoreplace: fix some trailing whitespaces
Björn Jacke [Thu, 8 Dec 2016 17:54:33 +0000 (18:54 +0100)]
replace: fix some trailing whitespaces

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2 years agovfs_fruit: fix a typo
Björn Jacke [Thu, 19 Jan 2017 22:49:54 +0000 (23:49 +0100)]
vfs_fruit: fix a typo

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2 years agos3/rpc_server/mdssvc: prefix public flex and bison global symbols
Ralph Boehme [Wed, 18 Jan 2017 18:18:40 +0000 (19:18 +0100)]
s3/rpc_server/mdssvc: prefix public flex and bison global symbols

This fixes a clash with a parser in Heimdal when building with
--nonshared-binary=smbd/smbd:

...
[3139/3620] Linking default/source3/smbd/smbd
...
default/source4/heimdal/lib/hx509/sel-lex_116.o: In function `yy_get_previous_state':
/usr/build/packages/samba-4.5/bin/../source4/heimdal/lib/hx509/sel-lex.c:1122:multiple definition of `yyin'
default/source3/rpc_server/mdssvc/sparql_lexer_28.o:/usr/build/packages/samba-4.5/bin/sparql_lexer.c:1149:first defined here
...

The fix is to use namespace prefixes in the parser and the lexer as
described here:
<https://www.gnu.org/software/bison/manual/html_node/Multiple-Parsers.html>

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Jan 21 13:13:19 CET 2017 on sn-devel-144

2 years agos3/rpc_server/mdssvc: use flex noyyalloc noyyrealloc
Ralph Boehme [Thu, 19 Jan 2017 06:39:37 +0000 (07:39 +0100)]
s3/rpc_server/mdssvc: use flex noyyalloc noyyrealloc

Redefine the symbols used for malloc and realloc in the flex source
instead of running sed over the generated one.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2 years agosmbcontrol: add ringbuf-log
Ralph Boehme [Sun, 8 Jan 2017 15:47:30 +0000 (16:47 +0100)]
smbcontrol: add ringbuf-log

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 20 22:33:14 CET 2017 on sn-devel-144

2 years agos4/messaging: register for MSG_REQ_RINGBUF_LOG
Ralph Boehme [Mon, 9 Jan 2017 21:33:55 +0000 (22:33 +0100)]
s4/messaging: register for MSG_REQ_RINGBUF_LOG

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agos3/debug: listen for MSG_REQ_RINGBUF_LOG
Ralph Boehme [Sun, 8 Jan 2017 13:08:27 +0000 (14:08 +0100)]
s3/debug: listen for MSG_REQ_RINGBUF_LOG

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agomessaging.idl: add ringbuf message types
Ralph Boehme [Mon, 9 Jan 2017 21:35:17 +0000 (22:35 +0100)]
messaging.idl: add ringbuf message types

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agodebug: add "ringbuf" backend logging to a ringbuffer
Ralph Boehme [Sat, 7 Jan 2017 13:36:24 +0000 (14:36 +0100)]
debug: add "ringbuf" backend logging to a ringbuffer

This is useful for debugging bugs that involve timing effects and are
not reproducible when logging at higher debug levels with the file
backend.

The log can be dumped to a file with gdb:

(gdb) dump binary memory samba.log debug_ringbuf debug_ringbuf+SIZE

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agodebug: parse, store and pass backend option
Ralph Boehme [Sat, 7 Jan 2017 18:34:46 +0000 (19:34 +0100)]
debug: parse, store and pass backend option

Will be used in the next commit by new "ringbuf" backend.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agoctdb-docs: Document configuration variable CTDB_NFS_CHECKS_DIR
Martin Schwenke [Fri, 20 Jan 2017 00:16:55 +0000 (11:16 +1100)]
ctdb-docs: Document configuration variable CTDB_NFS_CHECKS_DIR

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Jan 20 18:47:04 CET 2017 on sn-devel-144

2 years agoctdb-scripts: Avoid log noise when NFS checks directory is empty
Martin Schwenke [Thu, 19 Jan 2017 03:40:20 +0000 (14:40 +1100)]
ctdb-scripts: Avoid log noise when NFS checks directory is empty

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tests: Drop calls to ctdb_service_managed and ctdb_service_unmanaged
Amitay Isaacs [Thu, 19 Jan 2017 06:04:20 +0000 (17:04 +1100)]
ctdb-tests: Drop calls to ctdb_service_managed and ctdb_service_unmanaged

These functions have been removed as part of dropping
CTDB_SERVICE_AUTOSTARTSTOP functionality.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agos3/rpc_server: move rpc_modules.c to its own subsystem
Ralph Boehme [Mon, 16 Jan 2017 11:24:54 +0000 (12:24 +0100)]
s3/rpc_server: move rpc_modules.c to its own subsystem

The source file rpc_modules.c was used in two places which lead to the
following build error when configuring with '--nonshared-binary=smbd/smbd':

  ERROR: source source3/rpc_server/rpc_modules.c is in more than one
  subsystem of target 'smbd/smbd': ['RPC_SERVICE', 'MDSSD']

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 20 15:00:45 CET 2017 on sn-devel-144

2 years agolibgpo: Fix error check in gp_inifile_init_context_direct()
Günther Deschner [Thu, 19 Jan 2017 15:49:38 +0000 (16:49 +0100)]
libgpo: Fix error check in gp_inifile_init_context_direct()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3/winbindd: fix invalid free
Aurelien Aptel [Tue, 17 Jan 2017 13:39:03 +0000 (14:39 +0100)]
s3/winbindd: fix invalid free

coverity fix.

TALLOC_FREE() might be called on uninitialized 'rids' at the end of the
function in case of an early error. Initialize it to NULL to turn the
TALLOC_FREE() to a noop in this case.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 18 17:19:39 CET 2017 on sn-devel-144

2 years agoctdb-daemon: Remove stale eventd socket
Amitay Isaacs [Fri, 13 Jan 2017 05:00:45 +0000 (16:00 +1100)]
ctdb-daemon: Remove stale eventd socket

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jan 17 15:00:15 CET 2017 on sn-devel-144

2 years agoctdb-tests: Add "13.per_ip_routing shutdown" test
Martin Schwenke [Mon, 16 Jan 2017 00:08:51 +0000 (11:08 +1100)]
ctdb-tests: Add "13.per_ip_routing shutdown" test

Ensure that it doesn't mangle the rt_tables file.

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

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): Tue Jan 17 06:02:23 CET 2017 on sn-devel-144

2 years agoctdb-scripts: Fix regression when cleaning up routing table IDs
Martin Schwenke [Sun, 15 Jan 2017 20:24:15 +0000 (07:24 +1100)]
ctdb-scripts: Fix regression when cleaning up routing table IDs

Commit 0ca00267cd2620a14968961738bcd2a69b597e95 removed explicit
continuations in strings for awk programs.  In one case this causes a
disconnect between condition and action, where an implicit
continuation does not work.  This results in duplicate lines in the
rt_tables file.

Move the opening brace for the action to make the implicit
continuation work as expected.

An alternative would be to revert the removal of the explicit
continuations and add shellcheck tags.  However, that doesn't mean
that an author of future code will necessarily use explicit
continuations, so the same mistake might still be make in the future.

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

Reported-by: Barry Evans <bevans@pixitmedia.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Fix remaining uses of "ctdb gratiousarp"
Martin Schwenke [Mon, 16 Jan 2017 02:38:50 +0000 (13:38 +1100)]
ctdb-scripts: Fix remaining uses of "ctdb gratiousarp"

This changed to "ctdb gratarp" some time ago but the scripts were
never updated.

Fix the documentation for the ctdb tool too.

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

Reported-by: Ralph Böhme <slow@samba.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-common: Add wait_send/wait_recv to sock_daemon_funcs
Amitay Isaacs [Wed, 11 Jan 2017 09:37:00 +0000 (20:37 +1100)]
ctdb-common: Add wait_send/wait_recv to sock_daemon_funcs

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

To be able to terminate the daemon from within the implementation,
create a subreq using wait_send() provided by the implementation.
When the subreq is finished, it signals the sock_daemon code to terminate
the daemon.

This avoids the need to keep track of the top level tevent_req causing
layer violation and keeps the code flow straighforward.

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): Mon Jan 16 21:16:51 CET 2017 on sn-devel-144

2 years agoctdb-common: Avoid any processing after finishing tevent_req
Amitay Isaacs [Wed, 11 Jan 2017 08:54:36 +0000 (19:54 +1100)]
ctdb-common: Avoid any processing after finishing tevent_req

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoctdb-common: Pass tevent_req to the computation sub-functions
Amitay Isaacs [Thu, 12 Jan 2017 23:43:44 +0000 (10:43 +1100)]
ctdb-common: Pass tevent_req to the computation sub-functions

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoctdb-common: Use consistent naming for sock_daemon_run computation functions
Amitay Isaacs [Thu, 12 Jan 2017 23:40:43 +0000 (10:40 +1100)]
ctdb-common: Use consistent naming for sock_daemon_run computation functions

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoctdb-common: Correct name of sock_daemon_run_send/recv state structure
Amitay Isaacs [Wed, 11 Jan 2017 08:50:34 +0000 (19:50 +1100)]
ctdb-common: Correct name of sock_daemon_run_send/recv state structure

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoctdb-tests: Fix name of the variable representing init script
Amitay Isaacs [Mon, 16 Jan 2017 09:54:59 +0000 (20:54 +1100)]
ctdb-tests: Fix name of the variable representing init script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Jan 16 15:46:42 CET 2017 on sn-devel-144

2 years agoctdb-scripts: Drop configuration variable CTDB_SCRIPT_DEBUGLEVEL
Martin Schwenke [Mon, 9 Jan 2017 04:26:22 +0000 (15:26 +1100)]
ctdb-scripts: Drop configuration variable CTDB_SCRIPT_DEBUGLEVEL

The debug() function, which is the only user of this variable, is no
longer used.  It is also dropped.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Drop function ctdb_check_command()
Martin Schwenke [Mon, 9 Jan 2017 04:19:26 +0000 (15:19 +1100)]
ctdb-scripts: Drop function ctdb_check_command()

This is only used in 1 place, so just inline the check.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Inline simple uses of service_start() and service_stop()
Martin Schwenke [Sat, 17 Dec 2016 20:59:03 +0000 (07:59 +1100)]
ctdb-scripts: Inline simple uses of service_start() and service_stop()

This makes the scripts more readable.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Remove ctdb_service_start() and ctdb_service_stop()
Martin Schwenke [Sat, 17 Dec 2016 20:26:02 +0000 (07:26 +1100)]
ctdb-scripts: Remove ctdb_service_start() and ctdb_service_stop()

They contain too much unnecessary complexity, some of which was used
to support CTDB_SERVICE_AUTOSTARTSTOP.

Also removed unused functions for service management.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Drop unnecessary function ctdb_check_tcp_init()
Martin Schwenke [Sat, 17 Dec 2016 11:48:57 +0000 (22:48 +1100)]
ctdb-scripts: Drop unnecessary function ctdb_check_tcp_init()

The flag this sets is no longer used by ctdb_check_tcp_ports()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Simplify TCP port checking
Martin Schwenke [Sat, 17 Dec 2016 11:40:05 +0000 (22:40 +1100)]
ctdb-scripts: Simplify TCP port checking

Commit 86792724a2a911da9cd3e75622d35084c88eb8ce added complications on
top of the multiple TCP port checking methods that used to exist.
Life is simpler now and the cause of any failures is obvious.  So just
print a simple message if the port check fails.

Tweak tests to match changes.  Drop one test that becomes a duplicate.

Temporarily tweak ctdb_check_command() so that it passes shellcheck
tests.  It will be removed anyway in a subsequent commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Drop configuration variable CTDB_SERVICE_AUTOSTARTSTOP
Martin Schwenke [Sat, 17 Dec 2016 19:21:27 +0000 (06:21 +1100)]
ctdb-scripts: Drop configuration variable CTDB_SERVICE_AUTOSTARTSTOP

This has bit-rotted, at least for NFS.  It can be fixed but it is
better to remove it because it adds a lot of unnecessary complexity.

Variable event_name becomes unused so remove it.  Also remove
associated tests.

To continue to manage/unmanage services while CTDB is running:

* Start service by hand and then flag it as managed

* Mark service as unmanaged and shut it down by hand

In some cases CTDB does something fancy - e.g. start Samba under
"nice", so care is needed.  One technique is to disable the
eventscript, mark as managed, run the startup event by hand and then
re-enable the eventscript.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agowinbind: Fix CID 1398534 Dereference before null check
Jeremy Allison [Wed, 11 Jan 2017 19:52:44 +0000 (11:52 -0800)]
winbind: Fix CID 1398534 Dereference before null check

Make all query_user_list backends consistent.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 13 13:33:37 CET 2017 on sn-devel-144

2 years agoctdb-tests: Add takeover helper tests with banned/disconnected nodes
Martin Schwenke [Wed, 11 Jan 2017 08:20:08 +0000 (19:20 +1100)]
ctdb-tests: Add takeover helper tests with banned/disconnected nodes

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Jan 12 23:11:28 CET 2017 on sn-devel-144

2 years agoctdb-takeover: Handle case where there are no RELEASE_IPs to send
Martin Schwenke [Wed, 11 Jan 2017 19:52:32 +0000 (06:52 +1100)]
ctdb-takeover: Handle case where there are no RELEASE_IPs to send

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-takeover: Known and available IP lists should be the same size as nodemap
Amitay Isaacs [Wed, 11 Jan 2017 05:49:33 +0000 (16:49 +1100)]
ctdb-takeover: Known and available IP lists should be the same size as nodemap

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agolib: talloc: Make it clear that talloc_get_size(NULL) returns 0.
Jeremy Allison [Wed, 11 Jan 2017 19:48:25 +0000 (11:48 -0800)]
lib: talloc: Make it clear that talloc_get_size(NULL) returns 0.

This *isn't* a behavior change, as the previous code could potentially
return the size of null_context, which (currently) is defined as
a named talloc region of ZERO size, but this makes it very clear
what the ABI behavior should be.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 12 19:23:25 CET 2017 on sn-devel-144

2 years agoauth/gensec: convert external.c to provide update_send/recv
Stefan Metzmacher [Fri, 30 Dec 2016 00:53:27 +0000 (01:53 +0100)]
auth/gensec: convert external.c to provide update_send/recv

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth/gensec: convert ncalrpc.c to provide update_send/recv
Stefan Metzmacher [Fri, 30 Dec 2016 00:35:18 +0000 (01:35 +0100)]
auth/gensec: convert ncalrpc.c to provide update_send/recv

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth/gensec: convert schannel.c to provide update_send/recv
Stefan Metzmacher [Fri, 30 Dec 2016 00:30:13 +0000 (01:30 +0100)]
auth/gensec: convert schannel.c to provide update_send/recv

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoauth/gensec: remove unused prototype headers
Stefan Metzmacher [Mon, 23 Dec 2013 08:13:33 +0000 (09:13 +0100)]
auth/gensec: remove unused prototype headers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoscript/autobuild.py: try to make TMPDIR handling more verbose
Stefan Metzmacher [Wed, 11 Jan 2017 13:13:00 +0000 (14:13 +0100)]
script/autobuild.py: try to make TMPDIR handling more verbose

This hopefully gives some hints regarding flakey tests where
the tmpdir is not available.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoscript/autobuild.py: add a do_print() wrapper function that flushes after each message
Stefan Metzmacher [Wed, 11 Jan 2017 14:02:17 +0000 (15:02 +0100)]
script/autobuild.py: add a do_print() wrapper function that flushes after each message

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoscript/autobuild.py: export PYTHONUNBUFFERED=1
Stefan Metzmacher [Wed, 11 Jan 2017 13:48:45 +0000 (14:48 +0100)]
script/autobuild.py: export PYTHONUNBUFFERED=1

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoscript/autobuild.py: cleanup the task subdirs when they're done.
Stefan Metzmacher [Wed, 11 Jan 2017 13:42:08 +0000 (14:42 +0100)]
script/autobuild.py: cleanup the task subdirs when they're done.

This hopefully reduces the used space on the memdisk.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3-spoolss: globally set print server environment/architecture.
Günther Deschner [Mon, 21 Nov 2016 11:46:02 +0000 (12:46 +0100)]
s3-spoolss: globally set print server environment/architecture.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>