[PATCH] s4-srvsvc: Do not return hidden shares in dcesrv_srvsvc_NetShareEnumAll

brendan powers brendan0powers at gmail.com
Thu Apr 28 10:42:52 MDT 2011


I've looked over this part of the code again and I believe I have a
better understanding of how it works. It seems that the shares are in
fact being marked as hidden. The function dcesrv_common_get_share_type
does this. That is the function I used to determine if I should remove
a share from the list in my patch, so I know that it is working.
However, these shares are still visible from a windows client.

I have also done a bit more research on how Windows does this. It
seems they do set the hidden flag, instead of just not including
shares in the list.

On Fri, Dec 17, 2010 at 1:11 AM, Andrew Bartlett <abartlet at samba.org> wrote:
> On Tue, 2010-12-07 at 15:03 -0500, brendan powers wrote:
>> Hello, I am trying to solve a problem where samba4 did not seem to
>> honor the browsable = no option. I've tracked it down to the
>> dcesrv_srvsvc_NetShareEnumAll function. This function does not check
>> if a share is hidden before returning it. The
>> dcesrv_srvsvc_NetShareEnum function does though. In the provided
>> patch, I've modified dcesrv_srvsvc_NetShareEnumAll to not return
>> hidden shares. However, I'm not sure this is the right approach. Can
>> someone who is familiar with this part of the code look it over?
>
> Tridge and I looked at it, and the only concern he had was to ensure
> that the different types of hidden shares were dealt with correctly.
>
> That is, should we hide these totally, or just mark them as 'hidden'?
>
> Andrew Bartlett
>
> --
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> Samba Developer, Cisco Inc.
>
>


More information about the samba-technical mailing list