srvsvc: Announce [username] in NetShareEnum master origin/HEAD origin/master
authorVolker Lendecke <vl@samba.org>
Wed, 18 May 2022 14:01:08 +0000 (16:01 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 18 May 2022 17:42:20 +0000 (17:42 +0000)
commit04e0e02c6951e327130210e44deb87b9a303cdb3
treee55b7fcf733649c2efa13165e10111a02c691271
parent20cbade5b164c0e9eec744bd5a564110923a0c61
srvsvc: Announce [username] in NetShareEnum

This patch has two flaws: First, it does not cover api_RNetShareEnum()
for SMB1, and the second one is: To make this elegant, we would have
to restructure our share handling. It is really only listing shares
for which we have to pull in everything from smb.conf, registry,
usershares and potentially printers. What we should do is modify our
loadparm handling to only load share definitions on demand and for
listing shares handle all the potential sources specially. Add code
that walks the registry shares without adding them to our services
list and so on.

This patch is the quick&dirty way to fix the bug, the alternative
would be weeks or more. And hopefully nobody notices the SMB1
problem...

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15062

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 May 18 17:42:20 UTC 2022 on sn-devel-184
selftest/knownfail.d/netshareenum_user [deleted file]
source3/rpc_server/srvsvc/srv_srvsvc_nt.c