samba.git
4 years agoctdb-daemon: Respect CTDB_CTRL_FLAG_ATTACH_RECOVERY when attaching databases
Martin Schwenke [Wed, 26 Feb 2020 00:50:09 +0000 (11:50 +1100)]
ctdb-daemon: Respect CTDB_CTRL_FLAG_ATTACH_RECOVERY when attaching databases

This is currently only set by the recovery daemon when it attaches
missing databases, so there is no obvious behaviour change.  However,
attaching missing databases can now be moved to the recovery helper as
long as it sets this flag.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recovery: Use CTDB_CTRL_FLAG_ATTACH_RECOVERY to attach during recovery
Martin Schwenke [Fri, 21 Feb 2020 00:13:05 +0000 (11:13 +1100)]
ctdb-recovery: Use CTDB_CTRL_FLAG_ATTACH_RECOVERY to attach during recovery

ctdb_ctrl_createdb() is only called by the recovery daemon, so this is
a safe, temporary change.  This is temporary because
ctdb_ctrl_createdb(), create_missing_remote_databases() and
create_missing_local_databases() will all go away soon.

Note that this doesn't cause a change in behaviour.  The main daemon
will still only defer attaches from non-recoverd processes during
recovery.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-protocol: Add control flag CTDB_CTRL_FLAG_ATTACH_RECOVERY
Martin Schwenke [Fri, 21 Feb 2020 00:04:14 +0000 (11:04 +1100)]
ctdb-protocol: Add control flag CTDB_CTRL_FLAG_ATTACH_RECOVERY

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Remove unused old client database functions
Martin Schwenke [Wed, 26 Feb 2020 06:03:49 +0000 (17:03 +1100)]
ctdb-daemon: Remove unused old client database functions

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Fix database attach deferral logic
Martin Schwenke [Thu, 20 Feb 2020 02:48:13 +0000 (13:48 +1100)]
ctdb-daemon: Fix database attach deferral logic

Commit 3cc230b5eeca749ab68d19cfda969f72c269f1f6 says:

  Dont allow clients to connect to databases untile we are well past
  and through the initial recovery phase

It is unclear what this commit was attempting to do.  The commit
message implies that more attaches should be deferred but the code
change adds a conjunction that causes less attaches to be deferred.
In particular, no attaches will be deferred after startup is complete.
This seems wrong.

To implement what seems to be stated in the commit message an "or"
needs to be used so that non-recovery daemon attaches are deferred
either when in recovery or before startup is complete.  Making this
change highlights that attaches need to be allowed during the
"startup" event because this is when smbd is started.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recovery: Refactor banning a node into separate computation
Amitay Isaacs [Mon, 2 Mar 2020 05:16:26 +0000 (16:16 +1100)]
ctdb-recovery: Refactor banning a node into separate computation

If a node is marked for banning, confirm that it's not become inactive
during the recovery.  If yes, then don't ban the node.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recovery: Don't trust nodemap obtained from local node
Amitay Isaacs [Tue, 18 Feb 2020 05:17:00 +0000 (16:17 +1100)]
ctdb-recovery: Don't trust nodemap obtained from local node

It's possible to have a node stopped, but recovery master not yet
updated flags on the local ctdb daemon when recovery is started.  So do
not trust the list of active nodes obtained from the local node.  Query
the connected nodes to calculate the list of active nodes.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recovery: Consolidate node state
Amitay Isaacs [Mon, 2 Mar 2020 04:07:21 +0000 (15:07 +1100)]
ctdb-recovery: Consolidate node state

This avoids passing multiple arguments to async computation.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-recovery: Fetched vnnmap is never used, so don't fetch it
Amitay Isaacs [Mon, 2 Mar 2020 02:59:42 +0000 (13:59 +1100)]
ctdb-recovery: Fetched vnnmap is never used, so don't fetch it

New vnnmap is constructed using the information from all the connected
nodes.  So there is no need to fetch the vnnmap from recovery master.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agos3: libsmbclient.h: add missing time.h include
Aurelien Aptel [Fri, 13 Mar 2020 12:42:53 +0000 (13:42 +0100)]
s3: libsmbclient.h: add missing time.h include

A recent change added a struct with timespec members in the public
libsmbclient header. This type is defined in time.h which was not
included thus making users of libsmbclient not build properly.

    /.../libsmbclient.h:158:18: error: field 'btime_ts' has incomplete type
      struct timespec btime_ts;

Fixes: bf13fe0f222 ("s3: libsmbclient: Add internal/external structures needed for readdirplus.")
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Mar 23 20:47:44 UTC 2020 on sn-devel-184

4 years agos4-librpc: Simplify bytes or unicode input checking in python GUID() bindings
Andrew Bartlett [Sat, 14 Mar 2020 21:47:32 +0000 (10:47 +1300)]
s4-librpc: Simplify bytes or unicode input checking in python GUID() bindings

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

This was

  (PyUnicode_Check(pystr) || PyBytes_Check(pystr))

This allows us to end the use of Python 2/3 compatability macros.

The one caller will be simplified in the next commit

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <nopower@samba.org>
4 years agopy3: Remove #define IsPy3Bytes PyBytes_Check
Andrew Bartlett [Sat, 14 Mar 2020 21:40:46 +0000 (10:40 +1300)]
py3: Remove #define IsPy3Bytes PyBytes_Check

This allows us to end the use of Python 2/3 compatability macros.

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

This allows us to end the use of Python 2/3 compatability macros.

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

This allows us to end the use of Python 2/3 compatability macros.

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

This allows us to end the use of Python 2/3 compatability macros.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
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>