Fix for Bug #15243 reloads services from files, resulting in registry shares being stripped from netshareenum responses.
MR with fix here: https://gitlab.com/samba-team/samba/-/merge_requests/2855
Gist of fix is to reload registry shares after the aforementioned services reload.
``` root@TN3[/]# net conf listshares global SHARE mnt EXT SMBPROTO ``` Shares are in registry ``` root@TN3[/]# smbclient -L //127.0.0.1 -U smbuser%Cats Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (TrueNAS Server) SMB1 disabled -- no workgroup available ``` Shares are not in netshareenum response
We probably need to add a regression test for this, to make sure we don't break it again. I'll take a look after the Christmas holidays.
The regression is not limited to registry shares, it also happens if the smb.conf is not (world) readable. Which means the reload of the smb.conf is also not possible. As a fix we should avoid a full reload_services(), because it is designed to be an smbd function, which has a lot of side effects, e.g. it tries to reopen the log files, which we don't want in the rpcd_classic, it should just use log.rpcd_classic
Okay. Do we maybe just need to replace reload_services() with lp_load_with_registry_shares()?
(In reply to Andrew Walker from comment #6) Yes, and move some stuff around in order to do everything as root. I've pushed my version to the merge request
(In reply to Stefan Metzmacher from comment #7) Great. Thanks for doing that!
This bug was referenced in samba master: a00c7395fbc7974a61a70ae54ea6ae6349933de2 f28553105be7465026bcc0fcbbed6a1a8c2133dd
Created attachment 17712 [details] Patches for v4-17-test
Created attachment 17713 [details] Patches for v4-16-test
Jule, please apply the patches to the corresponding branches. Thanks!
Pushed to autobuild-v4-{17,16}-test.
This bug was referenced in samba v4-16-test: cf2643e0209a080801daa6feb00a21a9bd5825b7 ccb8abb0e727941cb0b22cc55b2190644df81396 6434e2df11e7b5ee1d3dc11f35575808a1e6b50a
This bug was referenced in samba v4-17-test: 658a590b3532ffab79d463d28749a480b923384e a8934a92f1a166fb66e247b9fb2be5758f1a91fc b1d5552f2e2808db3eeb1e3492df87be12e6b99b
Closing out bug report. Thanks!
This bug was referenced in samba v4-17-stable (Release samba-4.17.5): 658a590b3532ffab79d463d28749a480b923384e a8934a92f1a166fb66e247b9fb2be5758f1a91fc b1d5552f2e2808db3eeb1e3492df87be12e6b99b
This bug was referenced in samba v4-16-stable (Release samba-4.16.9): cf2643e0209a080801daa6feb00a21a9bd5825b7 ccb8abb0e727941cb0b22cc55b2190644df81396 6434e2df11e7b5ee1d3dc11f35575808a1e6b50a