The Samba-Bugzilla – Attachment 15755 Details for
Bug 14253
smbclient should not always warn about missing directories or messaging context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.12 and 4.11
0001-lib-util-Log-mkdir-error-on-correct-debug-levels.patch (text/plain), 1.49 KB, created by
Andreas Schneider
on 2020-01-27 16:20:30 UTC
(
hide
)
Description:
patch for 4.12 and 4.11
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2020-01-27 16:20:30 UTC
Size:
1.49 KB
patch
obsolete
>From c50d91d16292a13d29b1125c0aa85c7a7963de5f Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Mon, 27 Jan 2020 14:58:10 +0100 >Subject: [PATCH] lib:util: Log mkdir error on correct debug levels >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >For smbd we want an error and for smbclient we only want it in NOTICE >debug level. >The default log level of smbclient is log level 1 so we need notice to >not spam the user. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14253 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> > >Autobuild-User(master): Günther Deschner <gd@samba.org> >Autobuild-Date(master): Mon Jan 27 15:55:24 UTC 2020 on sn-devel-184 > >(cherry picked from commit 0ad6a243b259d284064c0c5abcc7d430d55be7e1) >--- > lib/util/util.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/lib/util/util.c b/lib/util/util.c >index 3bdeded5c1b..0d9ffe5cb7b 100644 >--- a/lib/util/util.c >+++ b/lib/util/util.c >@@ -353,9 +353,12 @@ _PUBLIC_ bool directory_create_or_exist(const char *dname, > old_umask = umask(0); > ret = mkdir(dname, dir_perms); > if (ret == -1 && errno != EEXIST) { >- DBG_WARNING("mkdir failed on directory %s: %s\n", >+ int dbg_level = geteuid() == 0 ? DBGLVL_ERR : DBGLVL_NOTICE; >+ >+ DBG_PREFIX(dbg_level, >+ ("mkdir failed on directory %s: %s\n", > dname, >- strerror(errno)); >+ strerror(errno))); > umask(old_umask); > return false; > } >-- >2.25.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:
asn
:
review?
(
gd
)
ab
:
review+
Actions:
View
Attachments on
bug 14253
: 15755