diff options
author | Jeremy Allison <jra@samba.org> | 2020-12-02 11:47:02 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-12-08 10:21:11 +0000 |
commit | 54d3d3cbf49b660f7e93aa45caa94fa6821c0999 (patch) | |
tree | 6522209130dd262b455fe2f630322da62f01f77e /source3 | |
parent | f7490ec9d94edfc9cdc79e70580b3b226a2022d5 (diff) | |
download | samba-54d3d3cbf49b660f7e93aa45caa94fa6821c0999.tar.gz |
s3: smbd: Quiet log messages from usershares for an unknown share.
No need to log missing shares/sharenames at debug level zero.
Keep the debug level zero for all other usershare problems.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14590
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Rowland penny <rpenny@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 4 20:54:06 UTC 2020 on sn-devel-184
(cherry picked from commit 8a0a7359faba642baf55a8f98ff78c0d0884d0f0)
Autobuild-User(v4-13-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-13-test): Tue Dec 8 10:21:11 UTC 2020 on sn-devel-184
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 6674485738a..a3abaa2ec67 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3418,6 +3418,11 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i open and fstat. Ensure this isn't a symlink link. */ if (sys_lstat(fname, &lsbuf, false) != 0) { + if (errno == ENOENT) { + /* Unknown share requested. Just ignore. */ + goto out; + } + /* Only log messages for meaningful problems. */ DEBUG(0,("process_usershare_file: stat of %s failed. %s\n", fname, strerror(errno) )); goto out; @@ -3623,6 +3628,11 @@ int load_usershare_service(const char *servicename) int max_user_shares = Globals.usershare_max_shares; int snum_template = -1; + if (servicename[0] == '\0') { + /* Invalid service name. */ + return -1; + } + if (*usersharepath == 0 || max_user_shares == 0) { return -1; } |