The Samba-Bugzilla – Attachment 16967 Details for
Bug 14895
Log filling up with spam about printing despite it being disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
0001-smbd-check-lp_load_printers-before-reload-via-NetSha.patch (text/plain), 1.33 KB, created by
David Disseldorp
on 2021-11-08 11:56:48 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2021-11-08 11:56:48 UTC
Size:
1.33 KB
patch
obsolete
>From feacb7daa7e599d8c0ac381e3381ca204eab2b69 Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Mon, 8 Nov 2021 12:11:17 +0100 >Subject: [PATCH] smbd: check lp_load_printers before reload via NetShareEnum > >api_RNetShareEnum() unconditionally attempts to reload printers via >delete_and_reload_printers(). Add a lp_load_printers() check to >obey smb.conf "load printers = off" settings. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14895 > >Reported-by: Nate Stuyvesant <nstuyvesant@gmail.com> >Signed-off-by: David Disseldorp <ddiss@samba.org> >--- > source3/smbd/server_reload.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c >index 98ea2a4fda4..329edf640da 100644 >--- a/source3/smbd/server_reload.c >+++ b/source3/smbd/server_reload.c >@@ -58,10 +58,16 @@ void delete_and_reload_printers(void) > const char *pname; > bool ok; > time_t pcap_last_update; >- TALLOC_CTX *frame = talloc_stackframe(); >+ TALLOC_CTX *frame = NULL; > const struct loadparm_substitution *lp_sub = > loadparm_s3_global_substitution(); > >+ if (!lp_load_printers()) { >+ DBG_DEBUG("skipping printer reload: disabled\n"); >+ return; >+ } >+ >+ frame = talloc_stackframe(); > ok = pcap_cache_loaded(&pcap_last_update); > if (!ok) { > DEBUG(1, ("pcap cache not loaded\n")); >-- >2.31.1 >
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+
Actions:
View
Attachments on
bug 14895
: 16967