1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

119919 Commits

Author SHA1 Message Date
Douglas Bagnall
272e20adbb 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>
2019-11-14 16:12:40 +00:00
Douglas Bagnall
4dd725b1b5 pytests: rpc echo should not segfault
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2019-11-14 16:12:40 +00:00
Douglas Bagnall
220cf67776 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>
2019-11-14 16:12:40 +00:00
Amitay Isaacs
963a639101 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
2019-11-14 12:03:46 +00:00
Amitay Isaacs
e469d6c119 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>
2019-11-14 10:38:34 +00:00
Amitay Isaacs
977a6f7fad ctdb-common: Change cmdline implementation to support multiple sections
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2019-11-14 10:38:34 +00:00
Amitay Isaacs
7a008c6b74 ctdb-tests: Update cmdline tests for section name
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2019-11-14 10:38:34 +00:00
Amitay Isaacs
b2b24c91fa ctdb-common: Add section to group commands in cmdline
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2019-11-14 10:38:34 +00:00
Amitay Isaacs
29948d7b1e 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>
2019-11-14 10:38:34 +00:00
Andrew Bartlett
0361a26e39 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
2019-11-14 09:25:36 +00:00
Andreas Schneider
32e75bb4cc 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
05f59cbcf8 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
a64a5b7e17 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
0906848936 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
d3fffca5e9 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
7c7dc855ba 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
0ed92e3e60 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
e4ae1ba451 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
2c21cd6d49 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
fbfb11b0f7 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
0e159b725e 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
afb5cb669c 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>
2019-11-14 08:01:44 +00:00
Andreas Schneider
3db2ca2dcf 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>
2019-11-14 08:01:43 +00:00
Andreas Schneider
dc75a5f27e 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>
2019-11-14 08:01:43 +00:00
Andreas Schneider
0914824684 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>
2019-11-14 08:01:43 +00:00
Andreas Schneider
045b9eb3f0 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>
2019-11-14 08:01:43 +00:00
Andrew Bartlett
83b1c21dd0 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>
2019-11-14 08:01:43 +00:00
Martin Schwenke
e45feaf28d 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
2019-11-14 03:45:44 +00:00
Martin Schwenke
750f3938e4 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>
2019-11-14 02:20:46 +00:00
Martin Schwenke
53f8492caa 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>
2019-11-14 02:20:46 +00:00
Volker Lendecke
a6d99d9e5c ctdb-tcp: Close inflight connecting TCP sockets after fork
Commit c68b6f96f2 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>
2019-11-14 02:20:46 +00:00
Volker Lendecke
231397f45e 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
2019-11-13 21:41:09 +00:00
Christof Schmitt
5343cec5f0 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
2019-11-13 19:14:25 +00:00
Christof Schmitt
2efc243f1a 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>
2019-11-13 17:49:38 +00:00
Christof Schmitt
7965a204d6 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>
2019-11-13 17:49:38 +00:00
Christof Schmitt
85d2323620 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>
2019-11-13 17:49:38 +00:00
Christof Schmitt
1aef796e30 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>
2019-11-13 17:49:38 +00:00
Isaac Boukris
15ddd95d94 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>
2019-11-13 17:49:38 +00:00
Christof Schmitt
be2d90b60d 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>
2019-11-13 17:49:38 +00:00
Christof Schmitt
63f8d77327 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>
2019-11-13 17:49:38 +00:00
Amitay Isaacs
816205027a 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
2019-11-13 13:31:10 +00:00
Andrew Bartlett
86e418f992 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
2019-11-13 10:29:00 +00:00
Andrew Bartlett
dc5db1e8d8 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>
2019-11-13 08:42:30 +00:00
Andrew Bartlett
92ce387ed0 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>
2019-11-13 08:42:30 +00:00
Andrew Bartlett
dc5788056b 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>
2019-11-13 08:42:30 +00:00
Andrew Bartlett
01bb7cff02 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
2019-11-13 01:55:33 +00:00
Andrew Bartlett
3b9e983b64 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>
2019-11-13 00:32:37 +00:00
Andrew Bartlett
78521577eb 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>
2019-11-13 00:32:37 +00:00
Andrew Bartlett
1bd1ae0593 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>
2019-11-13 00:32:37 +00:00
Andrew Bartlett
7299b9ba90 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>
2019-11-13 00:32:37 +00:00