samba.git
4 years agopidl: Remove reference to PyInt_Type from error string when we wanted a sensible...
Andrew Bartlett [Sat, 14 Mar 2020 21:15:15 +0000 (10:15 +1300)]
pidl: Remove reference to PyInt_Type from error string when we wanted a sensible Long

PyInt_Type is no longer a thing in Python3, we will remove the compatability
reference shortly.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years agopidl: Remove duplicate "if (PyLong_Check($cvar)" clauses
Andrew Bartlett [Sat, 14 Mar 2020 21:10:24 +0000 (10:10 +1300)]
pidl: Remove duplicate "if (PyLong_Check($cvar)" clauses

Since we moved to Python3, these have been dead code, and it is clearer
now that we have removed the compatability define.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years agopy3: Remove #define PyInt_Check PyLong_Check
Andrew Bartlett [Sat, 14 Mar 2020 21:04:52 +0000 (10:04 +1300)]
py3: Remove #define PyInt_Check PyLong_Check

This will allow us to remove some unused code in the PIDL-generated
python bindings.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
4 years agoautobuild: Merge samba-simpleserver into samba-nt4
Andrew Bartlett [Sat, 21 Mar 2020 19:15:30 +0000 (08:15 +1300)]
autobuild: Merge samba-simpleserver into samba-nt4

This saves CI resources (20mins build time) at the expense of making
the samba-nt4 job take 45min (5 min longer).

The new maximum job time is 1:15 by samba-o3 on the different hosts.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar 23 14:45:59 UTC 2020 on sn-devel-184

4 years agoselftest: Run smb2.compound_find against filesrever only, not nt4_dc and ad_dc
Andrew Bartlett [Sat, 21 Mar 2020 19:29:33 +0000 (08:29 +1300)]
selftest: Run smb2.compound_find against filesrever only, not nt4_dc and ad_dc

This is a slow test of SMB2 protocol features, it needs not to be repeated.  It only
got run against both by accident at the original merge and then extended to
run on the [compount_find] share (with smbd:find async delay usec = 10000)
but really does not need to be run three times.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoautobuild: Merge the samba-ktest-heimdal and samba-fileserver jobs
Andrew Bartlett [Thu, 12 Mar 2020 03:07:01 +0000 (16:07 +1300)]
autobuild: Merge the samba-ktest-heimdal and samba-fileserver jobs

This avoids a full compile of Samba just to test Kerberos with a system Heimdal
while still providing an environment to test other fileserver features.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years ago.gitlab-ci.yml: Move the short samba-xc job into "others"
Andrew Bartlett [Thu, 12 Mar 2020 00:43:45 +0000 (13:43 +1300)]
.gitlab-ci.yml: Move the short samba-xc job into "others"

This job is over in 8mins total and much of that is spent setting up.

It can safely be combined with the others in "others"

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agobuild: Require --without-ad-dc for --without-ads
Andrew Bartlett [Wed, 24 Jul 2019 04:22:12 +0000 (16:22 +1200)]
build: Require --without-ad-dc for --without-ads

Building an AD DC while setting --without-ads makes no sense and just wastes compile time on our build hosts.

To allow samba-nt4 to build --without-ad-dc we set rpc.spoolss.notify
(which is built on the NTVFS fileserver for the callbacks) to run in
the ad_member environment rather than nt4_dc and ad_dc.

This is also just more realistic in any case.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3: Remove tevent_wait code. The last user was fsp->deferred_close.
Jeremy Allison [Wed, 18 Mar 2020 23:09:50 +0000 (16:09 -0700)]
s3: Remove tevent_wait code. The last user was fsp->deferred_close.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Mar 23 12:06:45 UTC 2020 on sn-devel-184

4 years agos3: VFS: Remove deferred_close from struct files_struct.
Jeremy Allison [Wed, 18 Mar 2020 23:07:56 +0000 (16:07 -0700)]
s3: VFS: Remove deferred_close from struct files_struct.

Bump up the VFS number to 43. Samba 4.13 will ship with that.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Remove all references to fsp->deferred_close.
Jeremy Allison [Wed, 18 Mar 2020 23:01:18 +0000 (16:01 -0700)]
s3: smbd: Remove all references to fsp->deferred_close.

We are now free to remove it from struct files_struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Convert async SMB2 close to use the wait_queue idiom.
Jeremy Allison [Wed, 18 Mar 2020 22:59:03 +0000 (15:59 -0700)]
s3: smbd: Convert async SMB2 close to use the wait_queue idiom.

Use the same mechanism to wait for aio on a handle used by
SMB1 reply_tdis(), reply_ulogoffX(), reply_exit(), reply_close()
and SMB2 tree disconnect.

This removes the last user of fsp->deferred_close, allowing
us to remove it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Remove old async versions of SMB1 reply_close().
Jeremy Allison [Wed, 18 Mar 2020 22:21:43 +0000 (15:21 -0700)]
s3: smbd: Remove old async versions of SMB1 reply_close().

Use the common pattern to wait for aio.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Add async internals of reply_close().
Jeremy Allison [Wed, 18 Mar 2020 22:09:51 +0000 (15:09 -0700)]
s3: smbd: Add async internals of reply_close().

Waits until all aio requests on the closing fsps
before returning to the client.

Slightly modified version of the existing async
reply_close code, updated to use the wait_queue
pattern standardized in reply_tdis, reply_ulogoffX
and reply_exit.

Done this way (commented out) so it is a clean
diff and it's clear what is being added.

The next commit will remove the old version.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: In asnyc do_smb1_close() use the utility function meant for async SMB1...
Jeremy Allison [Wed, 18 Mar 2020 21:32:30 +0000 (14:32 -0700)]
s3: smbd: In asnyc do_smb1_close() use the utility function meant for async SMB1 replies.

Don't use the raw call.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Update reply_close() to modern DBG_ coding style.
Jeremy Allison [Wed, 18 Mar 2020 21:29:30 +0000 (14:29 -0700)]
s3: smbd: Update reply_close() to modern DBG_ coding style.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: In SMB1 reply_close() rename all uses of 'struct smb_request' to smb1req.
Jeremy Allison [Wed, 18 Mar 2020 21:06:38 +0000 (14:06 -0700)]
s3: smbd: In SMB1 reply_close() rename all uses of 'struct smb_request' to smb1req.

Will make further changes easier to see, as we now use
req for tevent_req structs.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agoidl/drsblobs: do not overwrite number of schedules == 1
Douglas Bagnall [Mon, 9 Mar 2020 22:31:12 +0000 (11:31 +1300)]
idl/drsblobs: do not overwrite number of schedules == 1

If the struct has zero or two schedules, that is what it has, and we
should let that be.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Mar 22 06:19:51 UTC 2020 on sn-devel-184

4 years agodsdb: Allow delete (directly and over DRS) of an object with a link to itself
Andrew Bartlett [Mon, 2 Mar 2020 05:01:29 +0000 (18:01 +1300)]
dsdb: Allow delete (directly and over DRS) of an object with a link to itself

Previously this would fail with Unsupported critical extension 1.3.6.1.4.1.7165.4.3.2

Reported by Alexander Harm.  Many thanks for helping make Samba better
and for your patience with patches and providing debugging information.

REF: https://lists.samba.org/archive/samba/2020-February/228153.html
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14306

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agodsdb: Add test for the case of a link pointing back at its own object
Andrew Bartlett [Mon, 2 Mar 2020 04:44:10 +0000 (17:44 +1300)]
dsdb: Add test for the case of a link pointing back at its own object

This type of object was not possible to delete in Samba without first removing
the link.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoselftest: Add test for dangling backlink to ourself, a missing and a real object
Andrew Bartlett [Tue, 3 Mar 2020 02:51:22 +0000 (15:51 +1300)]
selftest: Add test for dangling backlink to ourself, a missing and a real object

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoselftest: Add test for dangling backlinks to objects that do not exist
Andrew Bartlett [Mon, 2 Mar 2020 23:36:42 +0000 (12:36 +1300)]
selftest: Add test for dangling backlinks to objects that do not exist

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoldb build: Remove some PEP8 warnings from wscript
Gary Lockyer [Mon, 16 Mar 2020 21:12:49 +0000 (10:12 +1300)]
ldb build: Remove some PEP8 warnings from wscript

Fix indentation of list members and fix lines > 79 characters to remove
PEP8 warnings.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoldb tests: Confirm lmdb free list handling
Gary Lockyer [Mon, 16 Mar 2020 02:18:12 +0000 (15:18 +1300)]
ldb tests: Confirm lmdb free list handling

Add cmocka tests to confirm lmdb's handling of the free list.

As a result of lmdb's MVCC (Multiversion Concurrency Control) long
running read transactions or stale readers (read transactions where the
process exited without ending the transaction) can cause the database to
run out of space.

Items in the free list are only reused when they would not be visible in
a read transaction.  So long running read transactions prevent entries
in the free list being reused, and the database can run out of space.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove dead code
Samuel Cabrero [Tue, 28 May 2019 15:15:19 +0000 (17:15 +0200)]
s3:rpc_server: Remove dead code

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Fri Mar 20 17:11:28 UTC 2020 on sn-devel-184

4 years agos3:rpc_server: Remove unused RPC module init and shutdown callbacks
Samuel Cabrero [Tue, 28 May 2019 14:54:52 +0000 (16:54 +0200)]
s3:rpc_server: Remove unused RPC module init and shutdown callbacks

The setup function registers the endpoint server and RPC core routines
initialize and shutdown it.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Do not generate and build s3 RPC server code
Samuel Cabrero [Tue, 28 May 2019 15:01:36 +0000 (17:01 +0200)]
s3:rpc_server: Do not generate and build s3 RPC server code

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Do not include s3 autogenerated headers
Samuel Cabrero [Tue, 28 May 2019 14:12:51 +0000 (16:12 +0200)]
s3:rpc_server: Do not include s3 autogenerated headers

Prototype is generated by the server compat parser.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove api_struct
Samuel Cabrero [Tue, 28 May 2019 14:32:39 +0000 (16:32 +0200)]
s3:rpc_server: Remove api_struct

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove dead code and unused struct members
Samuel Cabrero [Thu, 7 Mar 2019 10:37:48 +0000 (11:37 +0100)]
s3:rpc_server: Remove dead code and unused struct members

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove s3 rpc server loop
Samuel Cabrero [Thu, 28 Feb 2019 13:04:08 +0000 (14:04 +0100)]
s3:rpc_server: Remove s3 rpc server loop

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove call to s3 rpc services shutdown code
Samuel Cabrero [Mon, 9 Sep 2019 16:22:43 +0000 (18:22 +0200)]
s3:rpc_server: Remove call to s3 rpc services shutdown code

The rpc_<service>_shutdown function unregisters the legacy api_struct
from the local dispatch table, which is not longer used as local
dispatching is done through dcesrv_interface and will be removed in
following commits.

The dcesrv_shutdown_registered_ep_servers will unregister endpoint servers.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Switch to core dcerpc server loop
Samuel Cabrero [Thu, 5 Dec 2019 10:45:54 +0000 (11:45 +0100)]
s3:rpc_server: Switch to core dcerpc server loop

This commit finally switches the RPC server implementation.

At the same we have to do other related changes to keep code compiling
and test environments running.

First avoid moving the session_info into the allocated pipes_struct memory
context as it is owned now by the core RPC server, and the s3compat pidl
compiler will update the pipes_struct session_info before dispatching
the call with dcesrv_call->auth_state->session_info.

Also, fix a segfault in the endpoint mapper daemon when it tries to delete
the endpoints previously registered over a NCALRPC connection.

If we have:

rpc_server : epmapper = external
rpc_server : lsarpc = external
rpc_daemon : epmd = fork
rpc_daemon : lsasd = fork

The sequence is:

* The endpoint mapper starts (start_epmd in source3/smbd/server.c)
* The lsarpc daemon starts (start_lsasd in source3/smbd/server.c)
  * The lsarpc daemon creates the sockets and registers its endpoints
    (rpc_ep_register in source3/rpc_server/lsasd.c)
  * The endpoint registration code opens a NCALRPC connection to the
    endpoint mapper daemon (ep_register in source3/librpc/rpc/dcerpc_ep.c)
    and keeps it open to re-register if the endpoint mapper daemon dies
    (rpc_ep_register_loop in source3/rpc_server/rpc_ep_register.c)
* When the endpoint mapper daemon accepts a NCALRPC connection it sets a
  termination function (srv_epmapper_delete_endpoints)
* Suppose the lsarpc daemon exits. The NCALRPC connection termination
  function is called.
* The termination function tries to delete all endpoints registered by that
  connection by calling _epm_Delete
* _epm_Delete calls is_privileged_pipe which access to
  pipes_struct->session_info.

As the call to _epm_Delete occurs outside of the PIDL generated code,
the pipes_stuct->session_info is NULL. This commit also sets
pipes_struct->session_info from the dcerpc_connection before calling
_epm_Delete. As the core rpc server supports security context multiplexing we
need to pass the dcesrv_connection to the termination function and let the
implementation pick a auth context. In the case of the endpoint mapper
the termination function has to pick one of type NCALRPC_AS_SYSTEM to
check if the connection is privileged and delete the endpoints
registered by the connection being closed.

Finally, the samba.tests.dcerpc.raw_protocol testsuite passes against
the ad_member environment.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Update winspool generated server stub
Samuel Cabrero [Thu, 28 Feb 2019 12:04:02 +0000 (13:04 +0100)]
s3:rpc_server: Update winspool generated server stub

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:winbindd: Dispatch RPC calls through interface local handler
Samuel Cabrero [Tue, 22 Oct 2019 16:28:44 +0000 (18:28 +0200)]
s3:winbindd: Dispatch RPC calls through interface local handler

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Dispatch local calls through interfaces local handler
Samuel Cabrero [Tue, 28 May 2019 10:05:45 +0000 (12:05 +0200)]
s3:rpc_server: Dispatch local calls through interfaces local handler

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Generate local dispatching function
Samuel Cabrero [Tue, 28 May 2019 10:02:09 +0000 (12:02 +0200)]
pidl:NDR/ServerCompat: Generate local dispatching function

To be used in rpcint_binding_handle, prepare to remove legacy api_struct
and S3 pidl generated code.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Initialize and allocate out vars
Samuel Cabrero [Mon, 11 Mar 2019 13:10:28 +0000 (14:10 +0100)]
pidl:NDR/ServerCompat: Initialize and allocate out vars

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Add dispatch, reply, pull and push functions to header
Samuel Cabrero [Thu, 28 Feb 2019 12:03:33 +0000 (13:03 +0100)]
pidl:NDR/ServerCompat: Add dispatch, reply, pull and push functions to header

Will be used by winspool to forward selected opnums to spoolss.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Retrieve and setup pipes struct before dispatch
Samuel Cabrero [Wed, 27 Feb 2019 22:28:25 +0000 (23:28 +0100)]
pidl:NDR/ServerCompat: Retrieve and setup pipes struct before dispatch

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Store dcesrv context and endpoint in ncacn_conn
Samuel Cabrero [Wed, 27 Feb 2019 22:44:16 +0000 (23:44 +0100)]
s3:rpc_server: Store dcesrv context and endpoint in ncacn_conn

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Retrieve dcesrv_context from parent context to open NP
Samuel Cabrero [Wed, 27 Feb 2019 20:36:22 +0000 (21:36 +0100)]
s3:rpc_server: Retrieve dcesrv_context from parent context to open NP

Get the dcesrv_context from parent context and use it to search the
endpoint serving the named pipe. Once we have the endpoint pass it to
the make_internal_rpc_pipe_socketpair function.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Set a dcerpc_ncacn_conn termination function
Samuel Cabrero [Wed, 27 Feb 2019 20:03:30 +0000 (21:03 +0100)]
s3:rpc_server: Set a dcerpc_ncacn_conn termination function

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Retrieve the dcesrv_endpoint from prefork listen data
Samuel Cabrero [Wed, 27 Feb 2019 19:21:44 +0000 (20:21 +0100)]
s3:rpc_server: Retrieve the dcesrv_endpoint from prefork listen data

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Drop dcerpc_binding_vector usage in the server side
Samuel Cabrero [Wed, 27 Feb 2019 18:32:26 +0000 (19:32 +0100)]
s3:rpc_server: Drop dcerpc_binding_vector usage in the server side

The endpoint mapper entry is built using the dcesrv_endpoint and the
interfaces registered into it instead of using the
dcerpc_binding_vector.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Remove unused members from dcerpc_ncacn_listen_state
Samuel Cabrero [Wed, 27 Feb 2019 19:49:56 +0000 (20:49 +0100)]
s3:rpc_server: Remove unused members from dcerpc_ncacn_listen_state

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Create ncacn_np sockets through endpoint initialization
Samuel Cabrero [Wed, 27 Feb 2019 18:13:57 +0000 (19:13 +0100)]
s3:rpc_server: Create ncacn_np sockets through endpoint initialization

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Setup ncacn_np sockets through endpoint initialization
Samuel Cabrero [Wed, 27 Feb 2019 17:58:15 +0000 (18:58 +0100)]
s3:rpc_server: Setup ncacn_np sockets through endpoint initialization

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Listen in different socket for ncalrpc when role is AD DC
Samuel Cabrero [Mon, 18 Nov 2019 11:46:04 +0000 (12:46 +0100)]
s3:rpc_server: Listen in different socket for ncalrpc when role is AD DC

If smbd and samba processes use DEFAULT as socket name they will race to
accept the NCALRPC connections.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Create ncalrpc socket through endpoint initialization
Samuel Cabrero [Wed, 27 Feb 2019 17:32:45 +0000 (18:32 +0100)]
s3:rpc_server: Create ncalrpc socket through endpoint initialization

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Setup ncalrpc sockets through endpoint initialization
Samuel Cabrero [Wed, 27 Feb 2019 17:20:11 +0000 (18:20 +0100)]
s3:rpc_server: Setup ncalrpc sockets through endpoint initialization

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Create ncacn_ip_tcp sockets through enpoint init
Samuel Cabrero [Wed, 27 Feb 2019 17:05:08 +0000 (18:05 +0100)]
s3:rpc_server: Create ncacn_ip_tcp sockets through enpoint init

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Setup ncacn_ip_tcp sockets through endpoint init
Samuel Cabrero [Wed, 27 Feb 2019 16:52:21 +0000 (17:52 +0100)]
s3:rpc_server: Setup ncacn_ip_tcp sockets through endpoint init

The listener is created in the endpoint memory context. If the endpoint
is freed, the listener will be freed too and the socket closed.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize spoolssd connection endpoints
Samuel Cabrero [Wed, 27 Feb 2019 15:28:28 +0000 (16:28 +0100)]
s3:rpc_server: Initialize spoolssd connection endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize mdssd connection endpoints
Samuel Cabrero [Wed, 27 Feb 2019 15:06:44 +0000 (16:06 +0100)]
s3:rpc_server: Initialize mdssd connection endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize fssd connection endpoints
Samuel Cabrero [Wed, 27 Feb 2019 14:49:01 +0000 (15:49 +0100)]
s3:rpc_server: Initialize fssd connection endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize lsasd connection endpoints
Samuel Cabrero [Wed, 27 Feb 2019 14:45:52 +0000 (15:45 +0100)]
s3:rpc_server: Initialize lsasd connection endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize epmd connection endpoints
Samuel Cabrero [Wed, 27 Feb 2019 13:42:07 +0000 (14:42 +0100)]
s3:rpc_server: Initialize epmd connection endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize the embedded services endpoints
Samuel Cabrero [Wed, 27 Feb 2019 13:36:30 +0000 (14:36 +0100)]
s3:rpc_server: Initialize the embedded services endpoints

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Add a function to create the endpoints sockets
Samuel Cabrero [Wed, 27 Feb 2019 13:21:01 +0000 (14:21 +0100)]
s3:rpc_server: Add a function to create the endpoints sockets

The pidl-generated initialization function for each endpoint server will
register the RPC interface in all endpoints defined in the idl file.

The interface registration code will create the endpoint if it does not
exists (as an endpoint can serve multiple interfaces) and will add it to
the endpoint list exiting in the dcesrv_context.

This commit adds a generic dcesrv_create_endpoint_sockets function which
will be preforking external daemons to create the sockets regardless the
endpoint transport. This function will only create the sockets, the
external preforking daemon is who will start listening.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Add a function to setup the endpoints
Samuel Cabrero [Wed, 27 Feb 2019 13:01:11 +0000 (14:01 +0100)]
s3:rpc_server: Add a function to setup the endpoints

The pidl-generated initialization function for each endpoint server will
register the RPC interface in all endpoints defined in the idl file.

The interface registration code will create the endpoint if it does not
exists (as an endpoint can serve multiple interfaces) and will add it to
the endpoint list exiting in the dcesrv_context.

This commit adds a generic dcesrv_setup_endpoint_sockets function which
will be used by embedded services and non-preforking external daemons to
setup the sockets regardless the transport.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Implement association group find callback
Samuel Cabrero [Fri, 4 Oct 2019 12:05:53 +0000 (14:05 +0200)]
s3:rpc_server: Implement association group find callback

Keep the s3 server behaviour for now and return always the same
association group ID, 0x53F0.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Setup dcesrv_context callbacks
Samuel Cabrero [Fri, 25 Jan 2019 08:50:15 +0000 (09:50 +0100)]
s3:rpc_server: Setup dcesrv_context callbacks

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:winbindd: Initialize dcesrv_context and ep servers in winbindd daemon
Samuel Cabrero [Thu, 28 Feb 2019 12:36:09 +0000 (13:36 +0100)]
s3:winbindd: Initialize dcesrv_context and ep servers in winbindd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered ep servers in external mdssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 17:00:55 +0000 (18:00 +0100)]
s3:rpc_server: Init registered ep servers in external mdssd daemon

Initialize and shutdown the endpoint servers registed by the mdssd
daemon. The pidl-generated init function will register the
api_struct for backward compatibility until completely removed.

The common server exit routine will shutdown all registered endpoint
servers, and the pidl-generated shutdown function will unregister the
api_struct.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered ep servers in external fssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 16:59:38 +0000 (17:59 +0100)]
s3:rpc_server: Init registered ep servers in external fssd daemon

Initialize and shutdown the endpoint servers registed by the fssd
daemon. The pidl-generated init function will register the
api_struct for backward compatibility until completely removed.

The common server exit routine will shutdown all registered endpoint
servers, and the pidl-generated shutdown function will unregister the
api_struct.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered ep servers in external lsasd daemon
Samuel Cabrero [Tue, 26 Feb 2019 16:57:58 +0000 (17:57 +0100)]
s3:rpc_server: Init registered ep servers in external lsasd daemon

Initialize and shutdown the endpoint servers registed by the lsasd
daemon. The pidl-generated init function will register the
api_struct for backward compatibility until completely removed.

The common server exit routine will shutdown all registered endpoint
servers, and the pidl-generated shutdown function will unregister the
api_struct.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered ep servers in external spoolssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 16:55:07 +0000 (17:55 +0100)]
s3:rpc_server: Init registered ep servers in external spoolssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered ep servers in external epmd daemon
Samuel Cabrero [Tue, 26 Feb 2019 16:15:37 +0000 (17:15 +0100)]
s3:rpc_server: Init registered ep servers in external epmd daemon

Initialize and shutdown the endpoint servers registed by the endpoint
mapper daemon. The pidl-generated init function will register the
api_struct for backward compatibility until completely removed.

The common server exit routine will shutdown all registered endpoint
servers, and the pidl-generated shutdown function will unregister the
api_struct.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Init registered endpoint servers for embedded services
Samuel Cabrero [Tue, 26 Feb 2019 16:53:18 +0000 (17:53 +0100)]
s3:rpc_server: Init registered endpoint servers for embedded services

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Register and unregister legacy api_struct cmds
Samuel Cabrero [Tue, 26 Feb 2019 16:37:52 +0000 (17:37 +0100)]
pidl:NDR/ServerCompat: Register and unregister legacy api_struct cmds

Next commits will initialize the registered enpoint servers in S3 RPC
server, removing the rpc_{interface}_init calls. The legacy api_struct
registration will be registered by the enpoint server initialization
code generated by PIDL.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Reinitialize dcesrv_context in external spoolssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 15:58:10 +0000 (16:58 +0100)]
s3:rpc_server: Reinitialize dcesrv_context in external spoolssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Reinitialize dcesrv_context in external lsasd daemon
Samuel Cabrero [Tue, 26 Feb 2019 15:56:42 +0000 (16:56 +0100)]
s3:rpc_server: Reinitialize dcesrv_context in external lsasd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Reinitialize dcesrv_context in external mdssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 14:52:43 +0000 (15:52 +0100)]
s3:rpc_server: Reinitialize dcesrv_context in external mdssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Reinitialize dcesrv_context in external fssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 14:47:06 +0000 (15:47 +0100)]
s3:rpc_server: Reinitialize dcesrv_context in external fssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Reinitialize dcesrv_context in external epmd daemon
Samuel Cabrero [Tue, 26 Feb 2019 13:18:34 +0000 (14:18 +0100)]
s3:rpc_server: Reinitialize dcesrv_context in external epmd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Shutdown registered enpoint servers on server exit
Samuel Cabrero [Thu, 19 Mar 2020 12:00:52 +0000 (13:00 +0100)]
s3:rpc_server: Shutdown registered enpoint servers on server exit

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Initialize global dcesrv_context for embedded services
Samuel Cabrero [Tue, 26 Feb 2019 12:58:43 +0000 (13:58 +0100)]
s3:rpc_server: Initialize global dcesrv_context for embedded services

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Add global dcesrv_context init and shutdown functions
Samuel Cabrero [Wed, 30 Oct 2019 16:00:05 +0000 (17:00 +0100)]
s3:rpc_server: Add global dcesrv_context init and shutdown functions

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:winbindd: Register endpoint servers in winbindd daemon
Samuel Cabrero [Thu, 28 Feb 2019 12:32:53 +0000 (13:32 +0100)]
s3:winbindd: Register endpoint servers in winbindd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers in external mdssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 12:52:39 +0000 (13:52 +0100)]
s3:rpc_server: Register endpoint servers in external mdssd daemon

The parent calls the setup function to register the endpoint server, as
it has to be registered to initialize the endpoints (create the sockets).

Delete the setup call from forker childs as it is already registered by
the parent.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers in external spoolssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 12:51:23 +0000 (13:51 +0100)]
s3:rpc_server: Register endpoint servers in external spoolssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers in external fssd daemon
Samuel Cabrero [Tue, 26 Feb 2019 12:50:37 +0000 (13:50 +0100)]
s3:rpc_server: Register endpoint servers in external fssd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers in external lsasd daemon
Samuel Cabrero [Tue, 26 Feb 2019 12:48:33 +0000 (13:48 +0100)]
s3:rpc_server: Register endpoint servers in external lsasd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers in external epmd daemon
Samuel Cabrero [Tue, 26 Feb 2019 12:40:44 +0000 (13:40 +0100)]
s3:rpc_server: Register endpoint servers in external epmd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Register endpoint servers for embedded services
Samuel Cabrero [Fri, 15 Nov 2019 13:26:28 +0000 (14:26 +0100)]
s3:rpc_server: Register endpoint servers for embedded services

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Provide LSA ncacn_np secondary endpoint and LSA over Netlogon
Samuel Cabrero [Thu, 14 Feb 2019 13:21:25 +0000 (14:21 +0100)]
s3:rpc_server: Provide LSA ncacn_np secondary endpoint and LSA over Netlogon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftests: Tests only appropiate RPC interfaces are available in smb pipes
Samuel Cabrero [Tue, 26 Nov 2019 13:16:14 +0000 (14:16 +0100)]
selftests: Tests only appropiate RPC interfaces are available in smb pipes

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftests: Test lsa over netlogon in nt4 dc environment
Samuel Cabrero [Fri, 15 Nov 2019 13:24:31 +0000 (14:24 +0100)]
selftests: Test lsa over netlogon in nt4 dc environment

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:rpc_server: Include generated boilerplate code
Samuel Cabrero [Fri, 22 Feb 2019 17:30:45 +0000 (18:30 +0100)]
s3:rpc_server: Include generated boilerplate code

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopidl:NDR/ServerCompat: Compat server PIDL parser
Samuel Cabrero [Tue, 15 Jan 2019 16:55:07 +0000 (17:55 +0100)]
pidl:NDR/ServerCompat: Compat server PIDL parser

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: Run python.samba.tests.dcerpc.raw_protocol against S3 ad_member
Samuel Cabrero [Thu, 3 Oct 2019 12:18:17 +0000 (14:18 +0200)]
selftest: Run python.samba.tests.dcerpc.raw_protocol against S3 ad_member

The goal is to pass the raw protocol testsuite against s3 RPC server.
To do so we need to enable epmd and lsasd daemons, as the testsuite
connects to the endpoint mapper and lsa endpoints using NCACN_IP_TCP
and NCACN_NP transports.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agogitlab-ci: Add Fedora 32 (Beta)
Andreas Schneider [Thu, 19 Mar 2020 09:32:17 +0000 (10:32 +0100)]
gitlab-ci: Add Fedora 32 (Beta)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 20 15:19:50 UTC 2020 on sn-devel-184

4 years agogitlab-ci: Remove Fedora 30
Andreas Schneider [Thu, 19 Mar 2020 09:28:23 +0000 (10:28 +0100)]
gitlab-ci: Remove Fedora 30

It is pretty similar to Fedora 31, so remove it safe some CI resources.
We will add Fedora 32 next.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agogitlab-ci: Remove Fedora 29 which is already EOL
Andreas Schneider [Thu, 19 Mar 2020 09:23:02 +0000 (10:23 +0100)]
gitlab-ci: Remove Fedora 29 which is already EOL

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agothird_party: Update nss_wrapper to version 1.1.10
Andreas Schneider [Mon, 16 Mar 2020 16:00:16 +0000 (17:00 +0100)]
third_party: Update nss_wrapper to version 1.1.10

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 20 12:41:36 UTC 2020 on sn-devel-184

4 years agobootstrap: Add podman command to readme
Andreas Schneider [Tue, 17 Mar 2020 16:39:48 +0000 (17:39 +0100)]
bootstrap: Add podman command to readme

Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agolibsmb: Don't try to find posix stat info in SMBC_getatr()
Volker Lendecke [Thu, 19 Mar 2020 10:01:41 +0000 (11:01 +0100)]
libsmb: Don't try to find posix stat info in SMBC_getatr()

This wrongly used "frame" instead of "fname", which can never have
worked. A first attempt to fix in 51551e0d53fa6 caused a few followup
patches in an attempt to clean up the test failures 51551e0d53fa6
introduced. They were reverted after a few discussions. So rather than
changing behaviour, just remove the code that introduced the valgrind
error again.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 20 05:06:07 UTC 2020 on sn-devel-184

4 years agos4/param: py_sid shouldn't be decref'ed after insertion into dict
Noel Power [Mon, 16 Mar 2020 16:00:24 +0000 (16:00 +0000)]
s4/param: py_sid shouldn't be decref'ed after insertion into dict

This was causing samba.tests.net_join_no_spnego(ad_dc) to
core dumps sometimes on tumbleweed with python3.8

with...

===============================================================
INTERNAL ERROR: Signal 11 in pid 1781 (4.12.0)
If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
===============================================================
smb_panic_default: PANIC (pid 1781): internal error
BACKTRACE: 64 stack frames:

7128  #0 bin/shared/libsamba-util.so.0(log_stack_trace+0x1f) [0x7fa541c5b220]
7129  #1 bin/shared/libsamba-util.so.0(+0x1efc8) [0x7fa541c5afc8]
7130  #2 bin/shared/libsamba-util.so.0(log_stack_trace+0) [0x7fa541c5b201]
7131  #3 bin/shared/libsamba-util.so.0(+0x1eed9) [0x7fa541c5aed9]
7132  #4 bin/shared/libsamba-util.so.0(+0x1eeee) [0x7fa541c5aeee]
7133  #5 /lib64/libc.so.6(+0x3bf20) [0x7fa542631f20]
7134  #6 /usr/lib64/libpython3.8.so.1.0(PyObject_GC_UnTrack+0xd) [0x7fa542386c1d]
7135  #7 /usr/lib64/libpython3.8.so.1.0(+0x12d599) [0x7fa542387599]
7136  #8 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4d6d) [0x7fa5424269ed]
7137  #9 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x30c) [0x7fa5423eaf5c]
7138  #10 /usr/lib64/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x18e) [0x7fa5423ebcbe]
7139  #11 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4a3a) [0x7fa5424266ba]
etc....

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar 19 22:23:52 UTC 2020 on sn-devel-184

4 years agos4/param: treat NULL value passed to dict_insert as error
Noel Power [Mon, 16 Mar 2020 15:54:00 +0000 (15:54 +0000)]
s4/param: treat NULL value passed to dict_insert as error

insert_dict is used as a convenience to decrement the values to
prevent leaks with orpahaned PyObjects and avoid excessive creation of
temp variables.

        if (!dict_insert(parameters,
                         "rootdn",
                         PyUnicode_FromString(settings->root_dn_str))) {
                status = NT_STATUS_UNSUCCESSFUL;
                goto out;
        }

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>