[Samba] Strange logs: check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file
Jeremy Allison
jra at samba.org
Tue Dec 1 22:19:41 UTC 2020
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.
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;
}
More information about the samba
mailing list