The branch, master has been updated via f4cad8b2bc3 smbd: check lp_load_printers before reload via NetShareEnum from 80115f9be1b gitlab-ci: Add Fedora 35 and drop Fedora 33
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f4cad8b2bc34ecf535deab8979a6e5f6b22233ff Author: David Disseldorp <dd...@samba.org> Date: Mon Nov 8 12:11:17 2021 +0100 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 <nstuyves...@gmail.com> Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Mon Nov 8 13:27:40 UTC 2021 on sn-devel-184 ----------------------------------------------------------------------- Summary of changes: source3/smbd/server_reload.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: 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")); -- Samba Shared Repository