samba.git
2 months agolib/util: change file_save_mode() to use O_EXCL
Andrew Bartlett [Mon, 11 Nov 2019 00:52:22 +0000 (13:52 +1300)]
lib/util: change file_save_mode() to use O_EXCL

Almost all the callers are debug tools or developer debugging aids
and these callers clearly expect to create a new file.

Unchanged in behaviour is:
 - TLS certificate creation.  This already confirms the files do no exist
   prior to generation.

These will now no longer overwrite the given filename
 - net ads pac save
 - net eventlog export

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3-build: add missing gnutls dependency
Björn Baumbach [Fri, 15 Nov 2019 12:21:48 +0000 (13:21 +0100)]
s3-build: add missing gnutls dependency

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agothird_party: Update nss_wrapper to version 1.1.7
Andreas Schneider [Wed, 13 Nov 2019 14:41:47 +0000 (15:41 +0100)]
third_party: Update nss_wrapper to version 1.1.7

This adds missing support for Address Sanitzer.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 14 23:50:06 UTC 2019 on sn-devel-184

2 months agolib: Fix an error path memleak in schannel_get_creds_state()
Volker Lendecke [Wed, 13 Nov 2019 15:29:17 +0000 (16:29 +0100)]
lib: Fix an error path memleak in schannel_get_creds_state()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agovfs: Use dbwrap_delete() in acl_tdb_delete()
Volker Lendecke [Wed, 13 Nov 2019 15:02:11 +0000 (16:02 +0100)]
vfs: Use dbwrap_delete() in acl_tdb_delete()

Use the wrapper function that's already available for exactly this
purpose.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agovfs: Use dbwrap_store() in store_acl_blob_fsp()
Volker Lendecke [Wed, 13 Nov 2019 15:02:11 +0000 (16:02 +0100)]
vfs: Use dbwrap_store() in store_acl_blob_fsp()

Use the wrapper function that's already available for exactly this
purpose.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agovfs: Use direct struct assignment in store_acl_blob_fsp()
Volker Lendecke [Wed, 13 Nov 2019 14:59:54 +0000 (15:59 +0100)]
vfs: Use direct struct assignment in store_acl_blob_fsp()

2 lines less code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agopidl: Handle obtaining objects from a fixed-size array
Andrew Bartlett [Tue, 29 Oct 2019 21:19:05 +0000 (21:19 +0000)]
pidl: Handle obtaining objects from a fixed-size array

Previously we would assume the array head was the talloc context
however this is not the case if the array is a fixed size inline array
within the parent struct.

In that case the overall object's talloc context is the correct
context to reference.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Nov 14 17:36:49 UTC 2019 on sn-devel-184

2 months agopidl/python: allocate objects with ref pointers
Douglas Bagnall [Mon, 28 Oct 2019 22:58:32 +0000 (11:58 +1300)]
pidl/python: allocate objects with ref pointers

Struct members that are marked as ref pointers need to have an object
allocated for them.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2 months agopytests/segfault: pidl inline arrays
Douglas Bagnall [Tue, 29 Oct 2019 22:11:41 +0000 (22:11 +0000)]
pytests/segfault: pidl inline arrays

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2 months agopytests/segfaults: dcerpc ref elements segfault
Douglas Bagnall [Mon, 28 Oct 2019 23:02:04 +0000 (12:02 +1300)]
pytests/segfaults: dcerpc ref elements segfault

These are just a couple of examples.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2 months agopytests: rpc echo should not segfault
Douglas Bagnall [Wed, 23 Oct 2019 21:41:28 +0000 (10:41 +1300)]
pytests: rpc echo should not segfault

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2 months agos4/rpc/dcerpc_connect: no crash on NULL dest_host
Douglas Bagnall [Wed, 24 Jul 2019 05:50:35 +0000 (17:50 +1200)]
s4/rpc/dcerpc_connect: no crash on NULL dest_host

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2 months agoctdb-tests: Add tests for cmdline_add() api
Amitay Isaacs [Mon, 11 Nov 2019 07:32:49 +0000 (18:32 +1100)]
ctdb-tests: Add tests for cmdline_add() api

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): Thu Nov 14 12:03:46 UTC 2019 on sn-devel-184

2 months agoctdb-common: Add api to add new section/commands to cmdline
Amitay Isaacs [Mon, 11 Nov 2019 06:32:50 +0000 (17:32 +1100)]
ctdb-common: Add api to add new section/commands to cmdline

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agoctdb-common: Change cmdline implementation to support multiple sections
Amitay Isaacs [Mon, 11 Nov 2019 06:29:26 +0000 (17:29 +1100)]
ctdb-common: Change cmdline implementation to support multiple sections

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agoctdb-tests: Update cmdline tests for section name
Amitay Isaacs [Mon, 11 Nov 2019 06:05:53 +0000 (17:05 +1100)]
ctdb-tests: Update cmdline tests for section name

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agoctdb-common: Add section to group commands in cmdline
Amitay Isaacs [Mon, 11 Nov 2019 06:01:43 +0000 (17:01 +1100)]
ctdb-common: Add section to group commands in cmdline

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agoctdb-common: Generate usage message from cmdline_parse()
Amitay Isaacs [Mon, 9 Jul 2018 05:37:52 +0000 (15:37 +1000)]
ctdb-common: Generate usage message from cmdline_parse()

If any of the option parsing or command parsing fails, generate usage
message.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agolibcli:auth Check return code of netlogon_creds_aes_encrypt()
Andrew Bartlett [Wed, 13 Nov 2019 22:16:09 +0000 (11:16 +1300)]
libcli:auth Check return code of netlogon_creds_aes_encrypt()

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 14 09:25:36 UTC 2019 on sn-devel-184

2 months agolibcli:auth: Check return code of netlogon_creds_step_crypt()
Andreas Schneider [Wed, 13 Nov 2019 09:13:53 +0000 (10:13 +0100)]
libcli:auth: Check return code of netlogon_creds_step_crypt()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return code of netlogon_creds_step()
Andreas Schneider [Wed, 13 Nov 2019 09:12:41 +0000 (10:12 +0100)]
libcli:auth: Check return code of netlogon_creds_step()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agos4:librpc: Check return code of netlogon_creds_client_authenticator()
Andreas Schneider [Wed, 13 Nov 2019 09:06:20 +0000 (10:06 +0100)]
s4:librpc: Check return code of netlogon_creds_client_authenticator()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return code of netlogon_creds_client_authenticator()
Andreas Schneider [Wed, 13 Nov 2019 09:06:20 +0000 (10:06 +0100)]
libcli:auth: Check return code of netlogon_creds_client_authenticator()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agoauth:pycreds: Check return code of netlogon_creds_client_authenticator()
Andreas Schneider [Wed, 13 Nov 2019 09:06:20 +0000 (10:06 +0100)]
auth:pycreds: Check return code of netlogon_creds_client_authenticator()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Return NTSTATUS for netlogon_creds_client_authenticator()
Andreas Schneider [Wed, 13 Nov 2019 08:52:53 +0000 (09:52 +0100)]
libcli:auth: Return NTSTATUS for netlogon_creds_client_authenticator()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return status of netlogon_creds_first_step()
Andreas Schneider [Wed, 13 Nov 2019 08:44:32 +0000 (09:44 +0100)]
libcli:auth: Check return status of netlogon_creds_first_step()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return status of netlogon_creds_init_64bit()
Andreas Schneider [Wed, 13 Nov 2019 08:41:18 +0000 (09:41 +0100)]
libcli:auth: Check return status of netlogon_creds_init_64bit()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return value of netlogon_creds_init_128bit()
Andreas Schneider [Wed, 13 Nov 2019 08:39:19 +0000 (09:39 +0100)]
libcli:auth: Check return value of netlogon_creds_init_128bit()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agos4:torture: Remove calls to gnutls_global_(de)init() in backupkey test
Andreas Schneider [Wed, 13 Nov 2019 13:01:46 +0000 (14:01 +0100)]
s4:torture: Remove calls to gnutls_global_(de)init() in backupkey test

This is handled by the gnutls library constructor/destructor.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agos4:lib: Remove gnutls_global_(de)init() from libtls
Andreas Schneider [Wed, 13 Nov 2019 12:59:30 +0000 (13:59 +0100)]
s4:lib: Remove gnutls_global_(de)init() from libtls

This is handled by the gnutls library constructor/destructor.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agos4:rpc_server: Remove gnutls_global_(de)init()
Andreas Schneider [Wed, 13 Nov 2019 12:57:53 +0000 (13:57 +0100)]
s4:rpc_server: Remove gnutls_global_(de)init()

This is done by the gnutls library constructor/destructor.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return code of SMBOWFencrypt_ntv2()
Andreas Schneider [Wed, 13 Nov 2019 11:52:44 +0000 (12:52 +0100)]
libcli:auth: Check return code of SMBOWFencrypt_ntv2()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Return NTSTATUS for SMBOWFencrypt_ntv2()
Andreas Schneider [Wed, 13 Nov 2019 11:48:18 +0000 (12:48 +0100)]
libcli:auth: Return NTSTATUS for SMBOWFencrypt_ntv2()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Check return codes of SMBsesskeygen_ntv2()
Andreas Schneider [Wed, 13 Nov 2019 11:45:04 +0000 (12:45 +0100)]
libcli:auth: Check return codes of SMBsesskeygen_ntv2()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibcli:auth: Return NTSTATUS for SMBOWFencrypt_ntv2()
Andreas Schneider [Wed, 13 Nov 2019 11:40:02 +0000 (12:40 +0100)]
libcli:auth: Return NTSTATUS for SMBOWFencrypt_ntv2()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agolibrpc: Do not return an NDR table for a zero GUID
Andrew Bartlett [Wed, 13 Nov 2019 02:51:08 +0000 (15:51 +1300)]
librpc: Do not return an NDR table for a zero GUID

The source3 RPC server will do a lookup by GUID and should
not be returned a table for a zero GUID.

Thankfully such a pipe would also need to have been registered
but regardless this is not a determinsitic result so should
be avoided.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agoctdb-tcp: Simplify freeing of transport data on shutdown
Martin Schwenke [Tue, 12 Nov 2019 01:14:18 +0000 (12:14 +1100)]
ctdb-tcp: Simplify freeing of transport data on shutdown

The type-checking is superfluous and gets in the way of readability.

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 Nov 14 03:45:44 UTC 2019 on sn-devel-184

2 months agoctdb-daemon: Rename ctdb_context private_data to transport_data
Martin Schwenke [Tue, 12 Nov 2019 01:12:46 +0000 (12:12 +1100)]
ctdb-daemon: Rename ctdb_context private_data to transport_data

This gives a casual reader a useful clue.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 months agoctdb-daemon: Rename ctdb_node private_data to transport_data
Martin Schwenke [Tue, 12 Nov 2019 01:04:22 +0000 (12:04 +1100)]
ctdb-daemon: Rename ctdb_node private_data to transport_data

This gives a casual reader a useful clue.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 months agoctdb-tcp: Close inflight connecting TCP sockets after fork
Volker Lendecke [Thu, 7 Nov 2019 14:26:01 +0000 (15:26 +0100)]
ctdb-tcp: Close inflight connecting TCP sockets after fork

Commit c68b6f96f26 changed the talloc hierarchy such that outgoing TCP sockets
while sitting in the async connect() syscall are not freed via
ctdb_tcp_shutdown() anymore, they are hanging off a longer-running structure.
Free this structure as well.

If an outgoing TCP socket leaks into a long-running child process (possibly the
recovery daemon), this connection will never be closed as seen by the
destination node. Because with recent changes incoming connections will not be
accepted as long as any incoming connection is alive, with that socket leak
into the recovery daemon we will never again be able to successfully connect to
the node that is affected by this leak. Further attempts to connect will be
discarded by the destination as long as the recovery daemon keeps this socket
alive.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14175
RN: Avoid communication breakdown on node reconnect

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 months agosmbd: Make share_mode_do_locked() pass TDB_DATA instead of a record
Volker Lendecke [Fri, 1 Nov 2019 11:33:23 +0000 (12:33 +0100)]
smbd: Make share_mode_do_locked() pass TDB_DATA instead of a record

No callback used (and should not use) the record directly, this is all
handled within share_mode_lock.c

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): Wed Nov 13 21:41:09 UTC 2019 on sn-devel-184

2 months agogitlab-ci: Run samba-fileserver-heimdalkrb5
Christof Schmitt [Wed, 30 Oct 2019 21:24:58 +0000 (14:24 -0700)]
gitlab-ci: Run samba-fileserver-heimdalkrb5

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Nov 13 19:14:25 UTC 2019 on sn-devel-184

2 months agobootstrap: Add heimdal-multidev for Debian and Ubuntu
Christof Schmitt [Wed, 30 Oct 2019 20:49:55 +0000 (13:49 -0700)]
bootstrap: Add heimdal-multidev for Debian and Ubuntu

This is required for testing the build with the
configure option --with-system-heimdalkrb5.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agoautobuild: Add test for build with system heimdal library
Christof Schmitt [Wed, 30 Oct 2019 20:45:55 +0000 (13:45 -0700)]
autobuild: Add test for build with system heimdal library

The configure option --with-system-heimdalkrb5 requires --without-ad-dc.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agokrb5_plugin: Fix developer build with newer heimdal system library
Christof Schmitt [Mon, 11 Nov 2019 20:37:25 +0000 (13:37 -0700)]
krb5_plugin: Fix developer build with newer heimdal system library

Newer heimdal versions provide a different locator plugin interface. The
function pointer for the old method has been renamed. Use an ifdef to
initialize the correct pointer.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agokrb5_plugin: Use C99 initializer
Christof Schmitt [Mon, 11 Nov 2019 20:08:28 +0000 (13:08 -0700)]
krb5_plugin: Use C99 initializer

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agoselftest: system-heimdal: workaround upstream "host" canon bug
Isaac Boukris [Sat, 9 Nov 2019 15:36:32 +0000 (15:36 +0000)]
selftest: system-heimdal: workaround upstream "host" canon bug

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agowscript: Fix build with system heimdal
Christof Schmitt [Wed, 30 Oct 2019 20:15:48 +0000 (13:15 -0700)]
wscript: Fix build with system heimdal

Ubuntu has heimdal include files in /usr/include/heimdal. As the
kerberos include files are pulled into many files through indirect
includes, add the discovered include paths to EXTRA_INCLUDES to
always have them available.

Also set USING_SYSTEM_KRB5 when enabling the system heimdal build,
to correctly handle the inclusion of the krb5-types.h file.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agobootstrap: Remove nettle-devel from package list
Christof Schmitt [Wed, 30 Oct 2019 21:57:02 +0000 (14:57 -0700)]
bootstrap: Remove nettle-devel from package list

nettle is required as dependency for newer gnutls libraries. The gnutls
development package already depends on the nettle development package,
no need to explicitly list it.

Signed-off-by: Christof Schmit <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agoctdb-ib: Fix build errors for infiniband transport
Amitay Isaacs [Tue, 12 Nov 2019 03:14:53 +0000 (14:14 +1100)]
ctdb-ib: Fix build errors for infiniband transport

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): Wed Nov 13 13:31:10 UTC 2019 on sn-devel-184

2 months agobuild: Refuse to build if ADDITIONAL_LDFLAGS or ADDITIONAL_CFLAGS do not work
Andrew Bartlett [Tue, 12 Nov 2019 04:17:02 +0000 (17:17 +1300)]
build: Refuse to build if ADDITIONAL_LDFLAGS or ADDITIONAL_CFLAGS do not work

This avoids these being silently ignored.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 10:29:00 UTC 2019 on sn-devel-184

2 months agoheimdal_build: Recurse to bld.SAMBA_BINARY()
Andrew Bartlett [Mon, 4 Nov 2019 01:42:24 +0000 (14:42 +1300)]
heimdal_build: Recurse to bld.SAMBA_BINARY()

This reduces a little of the duplication added when it was thought
that having a distinct waf wrapper on heimdal might allow this to be
ported upstream.

It will also streamline building a dedicated fuzzing mode in Samba.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agobuild: Remove workaround for missing os.path.relpath in Python < 2.6
Andrew Bartlett [Mon, 4 Nov 2019 04:07:44 +0000 (17:07 +1300)]
build: Remove workaround for missing os.path.relpath in Python < 2.6

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agobuild: Only link against libcrypt where needed
Andrew Bartlett [Wed, 6 Nov 2019 02:44:45 +0000 (15:44 +1300)]
build: Only link against libcrypt where needed

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agondrdump: check bounds when passed functions/structs by integer
Andrew Bartlett [Mon, 11 Nov 2019 23:11:53 +0000 (12:11 +1300)]
ndrdump: check bounds when passed functions/structs by integer

The function or struct number should be >= 0 ans the underlying
number it is compared to is uint32_t.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Nov 13 01:55:33 UTC 2019 on sn-devel-184

2 months agondrdump: Fix new "struct" feature
Andrew Bartlett [Tue, 5 Nov 2019 03:15:38 +0000 (16:15 +1300)]
ndrdump: Fix new "struct" feature

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agopidl: Generate compatability wrappers for ndr_print functions
Andrew Bartlett [Sun, 3 Nov 2019 23:15:26 +0000 (12:15 +1300)]
pidl: Generate compatability wrappers for ndr_print functions

This creates wrappers that are compatible with the functions called by
ndrdump which have an extra "int flags" parameter for NDR_IN and
NDR_OUT.  This will make ndrdump of public structures work again.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agopidl: Generate the trailing ndr_table even if the UUID is not set
Andrew Bartlett [Sun, 3 Nov 2019 23:19:29 +0000 (12:19 +1300)]
pidl: Generate the trailing ndr_table even if the UUID is not set

This allows ndrdump to dump many more public structures because most
of these are not in files with a UUID as they are not RPC protocols.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agolibrpc: Allow registration of ndr tables with a zero UUID
Andrew Bartlett [Wed, 6 Nov 2019 22:30:52 +0000 (11:30 +1300)]
librpc: Allow registration of ndr tables with a zero UUID

This helps ndrdump find public structures to dump

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agobuild: Prepare for pidl to generate ndr_table entries for more IDL
Andrew Bartlett [Sun, 3 Nov 2019 23:20:19 +0000 (12:20 +1300)]
build: Prepare for pidl to generate ndr_table entries for more IDL

These IDL files will soon create ndr_table entries so need to be
linked into the ndr-table subsystem.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agos3-build: Skip building the ndr_table at the tail of ndr_libnetapi.c
Andrew Bartlett [Sun, 3 Nov 2019 23:12:02 +0000 (12:12 +1300)]
s3-build: Skip building the ndr_table at the tail of ndr_libnetapi.c

This is not a real protocol and all the functions are set to nopull,nopush
but do not supply replacement functions.

This is the best was I could find to skip compiling the table as otherwise
it would point to undefined functions.

This does not happen until we generate the ndr_table for idl files without
a UUID, but we will shortly do that.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agopidl: Allow the compilation of the ndr_table to be skiped
Andrew Bartlett [Sun, 3 Nov 2019 23:17:41 +0000 (12:17 +1300)]
pidl: Allow the compilation of the ndr_table to be skiped

libnetapi.idl defines a large number of functions a nopull,nopush and
no replacement is provided.

This will allow the ndr_table to be generated for all other IDL files
that may have public structures that could usefully be dumped by
ndrdump.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agobuild: Allow warning on compile of libnetapi PIDL
Andrew Bartlett [Wed, 6 Nov 2019 02:33:24 +0000 (15:33 +1300)]
build: Allow warning on compile of libnetapi PIDL

This not-protocol only uses the print functions, but this means some other functions
are now unused, and as this is a special case it is better to just allow warnings
here.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agolibrpc: Do not include the ndr_table for libnet_join.idl and libnetapi.idl in the...
Andrew Bartlett [Sun, 3 Nov 2019 22:52:27 +0000 (11:52 +1300)]
librpc: Do not include the ndr_table for libnet_join.idl and libnetapi.idl in the global list

These are not wire protocols, there are no structures to parse.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agolibrpc: Do not place the ndr_table for windows_event_ids.idl in the global list
Andrew Bartlett [Sun, 3 Nov 2019 22:51:11 +0000 (11:51 +1300)]
librpc: Do not place the ndr_table for windows_event_ids.idl in the global list

This is just a list of event IDs, there are no structures to parse.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

2 months agoselftest: Add expected-output tests for the ndrdump struct mode
Andrew Bartlett [Mon, 11 Nov 2019 03:39:13 +0000 (16:39 +1300)]
selftest: Add expected-output tests for the ndrdump struct mode

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agondrdump: add --stop-on-parse-failure
Douglas Bagnall [Wed, 30 Oct 2019 03:05:22 +0000 (03:05 +0000)]
ndrdump: add --stop-on-parse-failure

If a data stream fails to parse as an NDR object, the default ndrdump
action is to try to print those structures anyway, resulting perhaps in
a NULL dereference. Sometimes you don't want to see that because it isn't
very interesting and makes it harder to distinguish a crash in the parse
routines. So --stop-on-parse-failure will skip the print and validate
stages altogether if the parse failed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>

2 months agolibrpc: Match interface name and file name for bkupblobs.idl
Andrew Bartlett [Mon, 4 Nov 2019 20:46:13 +0000 (09:46 +1300)]
librpc: Match interface name and file name for bkupblobs.idl

This helps generate fuzzers for this IDL.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agolibrpc: Match interface name and file name for winsrepl.idl
Andrew Bartlett [Mon, 4 Nov 2019 21:12:01 +0000 (10:12 +1300)]
librpc: Match interface name and file name for winsrepl.idl

This helps generate fuzzers for this IDL.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agolibrpc: Fix typo in "quota" name in IDL
Douglas Bagnall [Fri, 1 Nov 2019 04:18:37 +0000 (17:18 +1300)]
librpc: Fix typo in "quota" name in IDL

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agosmbd: Remove write cache
Volker Lendecke [Mon, 27 May 2019 09:24:14 +0000 (11:24 +0200)]
smbd: Remove write cache

Since this was written, our write path has changed significantly. In
particular we have gained very flexible support for async I/O, with the
linux io_uring in the pipeline. Caching stuff in main memory and then
doing a blocking pwrite nowadays does not belong into the core smbd
code. If someone wants it back, it should be doable in a VFS module.

Removes: "write cache size" parameter.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 13 00:20:55 UTC 2019 on sn-devel-184

2 months agolib: Remove unused file_id_string()
Volker Lendecke [Sat, 9 Nov 2019 20:13:52 +0000 (21:13 +0100)]
lib: Remove unused file_id_string()

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 Nov 12 22:18:40 UTC 2019 on sn-devel-184

2 months agosmbd: Use file_id_str_buf() in share_mode_cleanup_disconnected()
Volker Lendecke [Sat, 9 Nov 2019 20:11:38 +0000 (21:11 +0100)]
smbd: Use file_id_str_buf() in share_mode_cleanup_disconnected()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in share_mode_memcache_fetch()
Volker Lendecke [Sat, 9 Nov 2019 20:08:15 +0000 (21:08 +0100)]
smbd: Use file_id_str_buf() in share_mode_memcache_fetch()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in share_mode_memcache_store()
Volker Lendecke [Sat, 9 Nov 2019 20:05:41 +0000 (21:05 +0100)]
smbd: Use file_id_str_buf() in share_mode_memcache_store()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agolib: Remove unused file_id_string_tos()
Volker Lendecke [Sat, 9 Nov 2019 20:01:12 +0000 (21:01 +0100)]
lib: Remove unused file_id_string_tos()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agotorture3: Use file_id_str_buf() in print_brl()
Volker Lendecke [Sat, 9 Nov 2019 19:58:26 +0000 (20:58 +0100)]
torture3: Use file_id_str_buf() in print_brl()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in linux_release_kernel_oplock()
Volker Lendecke [Sat, 9 Nov 2019 19:57:14 +0000 (20:57 +0100)]
smbd: Use file_id_str_buf() in linux_release_kernel_oplock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in linux_oplock_signal_handler()
Volker Lendecke [Sat, 9 Nov 2019 19:55:29 +0000 (20:55 +0100)]
smbd: Use file_id_str_buf() in linux_oplock_signal_handler()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in scavenger_add_timer()
Volker Lendecke [Sat, 9 Nov 2019 17:53:19 +0000 (18:53 +0100)]
smbd: Use file_id_str_buf() in scavenger_add_timer()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in file_find_dif()
Volker Lendecke [Sat, 9 Nov 2019 17:32:07 +0000 (18:32 +0100)]
smbd: Use file_id_str_buf() in file_find_dif()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in scavenger_timer()
Volker Lendecke [Sat, 9 Nov 2019 17:30:37 +0000 (18:30 +0100)]
smbd: Use file_id_str_buf() in scavenger_timer()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agosmbd: Use file_id_str_buf() in scavenger_schedule_disconnected()
Volker Lendecke [Sat, 9 Nov 2019 17:27:30 +0000 (18:27 +0100)]
smbd: Use file_id_str_buf() in scavenger_schedule_disconnected()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 months agos3: smbd: smb2 cleanup - restructure smbd_smb2_request_pending_timer() encrypt code...
Jeremy Allison [Thu, 7 Nov 2019 17:16:44 +0000 (09:16 -0800)]
s3: smbd: smb2 cleanup - restructure smbd_smb2_request_pending_timer() encrypt code to look the same as smbd_smb2_request_reply().

This makes code changes in both (if needed) much easier
to spot.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3: smbd: smb2 cleanup - remove variable tf_len - this is a constant SMB2_TF_HDR_SIZE.
Jeremy Allison [Thu, 7 Nov 2019 17:13:12 +0000 (09:13 -0800)]
s3: smbd: smb2 cleanup - remove variable tf_len - this is a constant SMB2_TF_HDR_SIZE.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3: smbd: SMB2 - Ensure we use the correct session_id if encrypting an interim response.
Jeremy Allison [Thu, 7 Nov 2019 20:02:13 +0000 (12:02 -0800)]
s3: smbd: SMB2 - Ensure we use the correct session_id if encrypting an interim response.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agoDetect when command line max protocol < min protocol
David Mulder [Fri, 8 Nov 2019 17:10:47 +0000 (17:10 +0000)]
Detect when command line max protocol < min protocol

Due to the increased default minimum protocol
level to SMB2, some users notice that
specifying smbclient -m NT1 fails with
NT_STATUS_CONNECTION_DISCONNECTED, with no SMB
traffic on the wire. Report when the max protocol
is set less than the min protocol.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Nov 12 17:52:28 UTC 2019 on sn-devel-184

2 months agos4-libcli: Remove unused header from composite/composite.c
Andrew Bartlett [Thu, 24 Oct 2019 17:59:45 +0000 (06:59 +1300)]
s4-libcli: Remove unused header from composite/composite.c

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Nov 10 22:27:47 UTC 2019 on sn-devel-184

2 months agoMake sure backup temp directory gets deleted on exception
Heiko Baumann [Tue, 3 Sep 2019 14:30:24 +0000 (16:30 +0200)]
Make sure backup temp directory gets deleted on exception

This fix ensures that the samba-tool backup temp directory is removed
if an exception occurs (e.g. LDAP_INVALID_CREDENTIALS).

Signed-off-by: Heiko Baumann <heibau@gmail.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 months agodns: Always return SOA record for records we should know
Samuel Cabrero [Tue, 8 Oct 2019 11:30:18 +0000 (13:30 +0200)]
dns: Always return SOA record for records we should know

Regression introduced by commit 4b54e14b7cf456e327b176b365e8471e0899210b,
where the number of returned records is not set by talloc_array_length
when the record is not found.

Found by DELL EMC at SDC SMB3 plugfest trying to perform a secure DNS
update.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Fri Nov  8 12:31:30 UTC 2019 on sn-devel-184

2 months agodns: Extend DNS tests to check the SOA record is always returned
Samuel Cabrero [Tue, 8 Oct 2019 11:29:28 +0000 (13:29 +0200)]
dns: Extend DNS tests to check the SOA record is always returned

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agoctdb: Use TALLOC_FREE() in a few places
Volker Lendecke [Thu, 7 Nov 2019 11:12:45 +0000 (12:12 +0100)]
ctdb: Use TALLOC_FREE() in a few places

We have a macro for NULLing out the pointer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Nov  8 01:35:11 UTC 2019 on sn-devel-184

2 months agos3:printing: Fix %J substition
Ralph Boehme [Thu, 31 Oct 2019 11:46:38 +0000 (12:46 +0100)]
s3:printing: Fix %J substition

print_run_command() uses lp_print_command() which internally performs basic
substition by calling talloc_sub_basic(). As a result. any of the variables in
the "basic set", including "%J" are already substituted.

To prevent the unwanted subtitution, we declare all affected configuration
options as const, which disabled the basic substition.

As a result print_run_command() can run manual substitution on all characters,
including %J, in the variadic argument list *before* calling lp_string() to run
basic substition which we had disabled before with the const.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov  7 16:01:21 UTC 2019 on sn-devel-184

2 months agos3:printing: add a DEBUG statement
Ralph Boehme [Thu, 31 Oct 2019 11:03:31 +0000 (12:03 +0100)]
s3:printing: add a DEBUG statement

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3:lib: factor out talloc_sub_advanced() from talloc_sub_full()
Ralph Boehme [Thu, 31 Oct 2019 10:57:39 +0000 (11:57 +0100)]
s3:lib: factor out talloc_sub_advanced() from talloc_sub_full()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3: rename talloc_sub_advanced() to talloc_sub_full()
Ralph Boehme [Thu, 31 Oct 2019 11:45:44 +0000 (12:45 +0100)]
s3: rename talloc_sub_advanced() to talloc_sub_full()

We currently have the following substitution functions:

  talloc_sub_basic()
  talloc_sub_advanced()

talloc_sub_basic() currently substitutes a subset of talloc_sub_advanced().

We'll need a function X that only substitutes what talloc_sub_advanced()
substitutes *without* what talloc_sub_basic() does.

To get there rename talloc_sub_advanced() to talloc_sub_full(). A subsequent
commit will then bring back talloc_sub_advanced() as described above.

Examples with fictional replacement letters A and B. Currently:

  talloc_sub_basic:    A
  talloc_sub_advanced: AB

New:

  talloc_sub_basic:    A
  talloc_sub_advanced:  B
  talloc_sub_full:     AB

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3: remove unused function standard_sub_advanced()
Ralph Boehme [Thu, 31 Oct 2019 09:19:13 +0000 (10:19 +0100)]
s3: remove unused function standard_sub_advanced()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3: replace standard_sub_advanced with talloc_sub_advanced in one place
Ralph Boehme [Thu, 31 Oct 2019 11:44:45 +0000 (12:44 +0100)]
s3: replace standard_sub_advanced with talloc_sub_advanced in one place

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3:printing: fix a long line
Ralph Boehme [Thu, 31 Oct 2019 11:43:25 +0000 (12:43 +0100)]
s3:printing: fix a long line

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>