Jeremy Allison
2020-Dec-01 22:19 UTC
[Samba] Strange logs: check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file
On Tue, Dec 01, 2020 at 10:08:34PM +0000, Rowland penny via samba wrote:>could this have anything to do with it: > >4.12.0 >Default: usershare max shares = 0 > >4.13.2 >Default: usershare max shares = 100Good catch. Yes, that would cause the usershare load path to be executed now whereas it wasn't before. Relevent code: int load_usershare_service(const char *servicename) { SMB_STRUCT_STAT sbuf; const char *usersharepath = Globals.usershare_path; int max_user_shares = Globals.usershare_max_shares; int snum_template = -1; if (*usersharepath == 0 || max_user_shares == 0) { ^^^^^^^^^^^^^^^^^^^^^ 4.12 causes the return -1, 4.13 continues into the code. return -1; }
Andrew Bartlett
2020-Dec-01 22:23 UTC
[Samba] Strange logs: check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file
On Tue, 2020-12-01 at 14:19 -0800, Jeremy Allison via samba wrote:> On Tue, Dec 01, 2020 at 10:08:34PM +0000, Rowland penny via samba > wrote: > > > could this have anything to do with it: > > > > 4.12.0 > > Default: usershare max shares = 0 > > > > 4.13.2 > > Default: usershare max shares = 100 > > Good catch. Yes, that would cause > the usershare load path to be executed > now whereas it wasn't before.Even if we didn't change the default, Debian does. But the code should work of course, be it enabled by default or by the administrator... Andrew Bartlett -- Andrew Bartlett (he/him) https://samba.org/~abartlet/ Samba Team Member (since 2001) https://samba.org Samba Team Lead, Catalyst IT https://catalyst.net.nz/services/samba