s3:rpc_server/srvsvc: make sure we (re-)load all shares as root.
authorStefan Metzmacher <metze@samba.org>
Wed, 28 Dec 2022 12:50:45 +0000 (13:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 29 Dec 2022 21:14:02 +0000 (21:14 +0000)
commitf28553105be7465026bcc0fcbbed6a1a8c2133dd
tree499dd74eb0d4b8bd78232203a983eae39fc4379f
parenta00c7395fbc7974a61a70ae54ea6ae6349933de2
s3:rpc_server/srvsvc: make sure we (re-)load all shares as root.

This fixes a regression in commit f03665bb7e8ea97699062630f2aa1bac4c5dfc7f

The use of reload_services() has a lot of side effects, e.g. reopen of
log files and other things, which are only useful in smbd, but not in rpcd_classic.
It was also unloading the user and registry shares we loaded a few lines
above.

We need to do all (re-)loading as root, otherwise we won't be able
to read root only smb.conf files, access registry shares, ...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Walker <awalker@ixsystems.com>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 29 21:14:02 UTC 2022 on sn-devel-184
selftest/knownfail.d/registry_share [deleted file]
source3/rpc_server/srvsvc/srv_srvsvc_nt.c