The Samba-Bugzilla – Attachment 16359 Details for
Bug 14590
When usershares are enabled requesting an unknown share causes misleading log entries.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.12.next, 4.13.next.
0001-s3-smbd-Quiet-log-messages-from-usershares-for-an-un.patch (text/plain), 1.74 KB, created by
Jeremy Allison
on 2020-12-04 21:54:55 UTC
(
hide
)
Description:
git-am fix for 4.12.next, 4.13.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2020-12-04 21:54:55 UTC
Size:
1.74 KB
patch
obsolete
>From 3a090d91c6790f2decc0c7125132041e65ddb2d5 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 2 Dec 2020 11:47:02 -0800 >Subject: [PATCH] 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) >--- > source3/param/loadparm.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c >index d8e9d9a7bb5..b83f91ffefb 100644 >--- a/source3/param/loadparm.c >+++ b/source3/param/loadparm.c >@@ -3421,6 +3421,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; >@@ -3626,6 +3631,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; > } >-- >2.27.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
rpenny
:
review+
abartlet
:
review+
Actions:
View
Attachments on
bug 14590
: 16359