srvsvc: Announce [username] in NetShareEnum
commitf23f9132f7c0205220e11732ee5b0c69ea8467dd
authorVolker Lendecke <vl@samba.org>
Wed, 18 May 2022 14:01:08 +0000 (18 16:01 +0200)
committerJule Anger <janger@samba.org>
Fri, 20 May 2022 09:10:43 +0000 (20 09:10 +0000)
treeb04078b4fe8bf4434a180f9abedd070e2dfb6424
parent344ff937f203a9545ab8a56710499bf2c25691ee
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

(cherry picked from commit 04e0e02c6951e327130210e44deb87b9a303cdb3)

Autobuild-User(v4-16-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-16-test): Fri May 20 09:10:43 UTC 2022 on sn-devel-184
selftest/knownfail.d/netshareenum_user [deleted file]
source3/rpc_server/srvsvc/srv_srvsvc_nt.c