From 2347f9315fbdb4390f5dc9271ea824ebfcd7caca Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 13 Nov 2020 12:34:50 +0100 Subject: [PATCH 01/11] loadparm: setup debug subsystem setting max_log_size from config BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit ab2c712c016f4e4dacd5064b9eb8f6417f4b9b60) --- lib/param/loadparm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index e041f4fb01b..006caabc092 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -3190,6 +3190,7 @@ static bool lpcfg_update(struct loadparm_context *lp_ctx) settings.debug_pid = lp_ctx->globals->debug_pid; settings.debug_uid = lp_ctx->globals->debug_uid; settings.debug_class = lp_ctx->globals->debug_class; + settings.max_log_size = lp_ctx->globals->max_log_size; debug_set_settings(&settings, lp_ctx->globals->logging, lp_ctx->globals->syslog, lp_ctx->globals->syslog_only); -- 2.26.2 From 3400cc39c7b423bb7e2dff0b84336516a114270c Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Nov 2020 15:46:47 +0100 Subject: [PATCH 02/11] debug: pass struct debug_class *config to reopen_one_log() Pass a pointer to the struct instead of all struct members individually. No change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 29cd139a32d5dbf36bef68eb9c7f1160201e3042) --- lib/util/debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/util/debug.c b/lib/util/debug.c index 08ffee35a1f..c17fa0c1db4 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1082,14 +1082,15 @@ static void debug_callback_log(const char *msg, int msg_level) Fix from dgibson@linuxcare.com. **************************************************************************/ -static bool reopen_one_log(int *fd, const char *logfile) +static bool reopen_one_log(struct debug_class *config) { - int old_fd = *fd; + int old_fd = config->fd; + const char *logfile = config->logfile; int new_fd; if (logfile == NULL) { debug_close_fd(old_fd); - *fd = -1; + config->fd = -1; return true; } @@ -1104,7 +1105,7 @@ static bool reopen_one_log(int *fd, const char *logfile) debug_close_fd(old_fd); smb_set_close_on_exec(new_fd); - *fd = new_fd; + config->fd = new_fd; return true; } @@ -1164,8 +1165,7 @@ bool reopen_logs_internal(void) state.reopening_logs = true; for (i = DBGC_ALL; i < debug_num_classes; i++) { - ok = reopen_one_log(&dbgc_config[i].fd, - dbgc_config[i].logfile); + ok = reopen_one_log(&dbgc_config[i]); if (!ok) { break; } -- 2.26.2 From 5b526adb47a216cf8a7fc5169611df3c7a71fb41 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Nov 2020 15:51:09 +0100 Subject: [PATCH 03/11] debug: pass struct debug_class *config to do_one_check_log_size() Pass a pointer to the struct instead of all struct members individually. No change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit b7ee36146458bcc2c944f5670b7632df8281ae61) --- lib/util/debug.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lib/util/debug.c b/lib/util/debug.c index c17fa0c1db4..7288602b96e 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1249,11 +1249,10 @@ bool need_to_check_log_size(void) Check to see if the log has grown to be too big. **************************************************************************/ -static void do_one_check_log_size(off_t maxlog, int *_fd, const char *logfile) +static void do_one_check_log_size(off_t maxlog, struct debug_class *config) { - char name[strlen(logfile) + 5]; + char name[strlen(config->logfile) + 5]; struct stat st; - int fd = *_fd; int ret; bool ok; @@ -1261,7 +1260,7 @@ static void do_one_check_log_size(off_t maxlog, int *_fd, const char *logfile) return; } - ret = fstat(fd, &st); + ret = fstat(config->fd, &st); if (ret != 0) { return; } @@ -1271,12 +1270,11 @@ static void do_one_check_log_size(off_t maxlog, int *_fd, const char *logfile) /* reopen_logs_internal() modifies *_fd */ (void)reopen_logs_internal(); - fd = *_fd; - if (fd <= 2) { + if (config->fd <= 2) { return; } - ret = fstat(fd, &st); + ret = fstat(config->fd, &st); if (ret != 0) { return; } @@ -1284,16 +1282,16 @@ static void do_one_check_log_size(off_t maxlog, int *_fd, const char *logfile) return; } - snprintf(name, sizeof(name), "%s.old", logfile); + snprintf(name, sizeof(name), "%s.old", config->logfile); - (void)rename(logfile, name); + (void)rename(config->logfile, name); ok = reopen_logs_internal(); if (ok) { return; } /* We failed to reopen a log - continue using the old name. */ - (void)rename(name, logfile); + (void)rename(name, config->logfile); } static void do_check_log_size(off_t maxlog) @@ -1307,9 +1305,7 @@ static void do_check_log_size(off_t maxlog) if (dbgc_config[i].logfile == NULL) { continue; } - do_one_check_log_size(maxlog, - &dbgc_config[i].fd, - dbgc_config[i].logfile); + do_one_check_log_size(maxlog, &dbgc_config[i]); } } -- 2.26.2 From 79ac113df542c0d4f5ba8745aff9a8afeb8a2074 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Nov 2020 16:04:03 +0100 Subject: [PATCH 04/11] debug: detect logrotation by checking inode number BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 3651a51e93b45104323d5db1d5ea704d4f71acf1) --- lib/util/debug.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/util/debug.c b/lib/util/debug.c index 7288602b96e..b19c739d4cd 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -113,6 +113,8 @@ struct debug_class { */ char *logfile; int fd; + /* inode number of the logfile to detect logfile rotation */ + ino_t ino; }; static const char *default_classname_table[] = { @@ -1086,7 +1088,9 @@ static bool reopen_one_log(struct debug_class *config) { int old_fd = config->fd; const char *logfile = config->logfile; + struct stat st; int new_fd; + int ret; if (logfile == NULL) { debug_close_fd(old_fd); @@ -1107,6 +1111,16 @@ static bool reopen_one_log(struct debug_class *config) smb_set_close_on_exec(new_fd); config->fd = new_fd; + ret = fstat(new_fd, &st); + if (ret != 0) { + log_overflow = true; + DBG_ERR("Unable to fstat() new log file '%s': %s\n", + logfile, strerror(errno)); + log_overflow = false; + return false; + } + + config->ino = st.st_ino; return true; } @@ -1254,17 +1268,26 @@ static void do_one_check_log_size(off_t maxlog, struct debug_class *config) char name[strlen(config->logfile) + 5]; struct stat st; int ret; + bool reopen = false; bool ok; if (maxlog == 0) { return; } - ret = fstat(config->fd, &st); + ret = stat(config->logfile, &st); if (ret != 0) { return; } - if (st.st_size < maxlog ) { + if (st.st_size >= maxlog ) { + reopen = true; + } + + if (st.st_ino != config->ino) { + reopen = true; + } + + if (!reopen) { return; } @@ -1276,8 +1299,12 @@ static void do_one_check_log_size(off_t maxlog, struct debug_class *config) } ret = fstat(config->fd, &st); if (ret != 0) { + config->ino = (ino_t)0; return; } + + config->ino = st.st_ino; + if (st.st_size < maxlog) { return; } -- 2.26.2 From 741f4c6bb82d37e8167dc9a79493b808bf95a833 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Nov 2020 17:53:57 +0100 Subject: [PATCH 05/11] s4: add samba server tevent trace helper stuff BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (backported from commit 68f71f227b17774a12c84575c1eecd82279fac95) [slow@samba.org: conflict due to rename source4/smbd/ -> source4/samba/ in master] --- source4/smbd/server_util.c | 94 ++++++++++++++++++++++++++++++++++++++ source4/smbd/server_util.h | 33 +++++++++++++ source4/smbd/wscript_build | 4 ++ 3 files changed, 131 insertions(+) create mode 100644 source4/smbd/server_util.c create mode 100644 source4/smbd/server_util.h diff --git a/source4/smbd/server_util.c b/source4/smbd/server_util.c new file mode 100644 index 00000000000..282ad9b17cd --- /dev/null +++ b/source4/smbd/server_util.c @@ -0,0 +1,94 @@ +/* + Unix SMB/CIFS implementation. + + Utility routines + + Copyright (C) 2020 Ralph Boehme + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "includes.h" +#include "lib/tevent/tevent.h" +#include "lib/util/unix_privs.h" +#include "server_util.h" + +struct samba_tevent_trace_state { + size_t events; + time_t last_logsize_check; +}; + +struct samba_tevent_trace_state *create_samba_tevent_trace_state( + TALLOC_CTX *mem_ctx) +{ + return talloc_zero(mem_ctx, struct samba_tevent_trace_state); +} + +void samba_tevent_trace_callback(enum tevent_trace_point point, + void *private_data) +{ + struct samba_tevent_trace_state *state = + talloc_get_type_abort(private_data, + struct samba_tevent_trace_state); + time_t now = time(NULL); + bool do_check_logs = false; + void *priv = NULL; + + switch (point) { + case TEVENT_TRACE_BEFORE_WAIT: + break; + default: + return; + } + + state->events++; + + /* + * Throttling by some random numbers. smbd uses a similar logic + * checking every 50 SMB requests. Assuming 4 events per request + * we get to the number of 200. + */ + if ((state->events % 200) == 0) { + do_check_logs = true; + } + /* + * Throttling by some delay, choosing 29 to avoid lockstep with + * the default tevent tickle timer. + */ + if ((state->last_logsize_check + 29) < now) { + do_check_logs = true; + } + + if (!do_check_logs) { + return; + } + + /* + * need_to_check_log_size() checks both the number of messages + * that have been logged and if the logging backend is actually + * going to file. We want to bypass the "number of messages" + * check, so we have to call force_check_log_size() before. + */ + force_check_log_size(); + if (!need_to_check_log_size()) { + return; + } + + priv = root_privileges(); + check_log_size(); + TALLOC_FREE(priv); + + state->last_logsize_check = now; + return; +} diff --git a/source4/smbd/server_util.h b/source4/smbd/server_util.h new file mode 100644 index 00000000000..08c09cc67c2 --- /dev/null +++ b/source4/smbd/server_util.h @@ -0,0 +1,33 @@ +/* + Unix SMB/CIFS implementation. + + Utility routines + + Copyright (C) 2020 Ralph Boehme + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef SAMBA_SERVER_UTIL_H +#define SAMBA_SERVER_UTIL_H + +struct samba_tevent_trace_state; + +struct samba_tevent_trace_state *create_samba_tevent_trace_state( + TALLOC_CTX *mem_ctx); + +void samba_tevent_trace_callback(enum tevent_trace_point point, + void *private_data); + +#endif diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build index ef0aaf773c1..146098ec8e4 100644 --- a/source4/smbd/wscript_build +++ b/source4/smbd/wscript_build @@ -17,6 +17,10 @@ bld.SAMBA_LIBRARY('process_model', enabled=bld.AD_DC_BUILD_IS_ENABLED() ) +bld.SAMBA_SUBSYSTEM('samba_server_util', + source='server_util.c', + deps='samba-util') + bld.SAMBA_BINARY('samba', source='server.c', subsystem_name='service', -- 2.26.2 From 9e48924f72ae217cae56350e5f2088c6c602dc60 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 26 Nov 2020 14:21:58 +0100 Subject: [PATCH 06/11] s4: install tevent tracing hooks to trigger logfile rotation BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 516c2a04a242a539f9fbddb2822295fee233644c) --- source4/smbd/process_prefork.c | 13 +++++++++++++ source4/smbd/server.c | 17 +++++++++++++++++ source4/smbd/wscript_build | 5 +++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c index 3c93fc0ee2a..a7558ed385b 100644 --- a/source4/smbd/process_prefork.c +++ b/source4/smbd/process_prefork.c @@ -45,6 +45,7 @@ #include "lib/util/tfork.h" #include "lib/messaging/irpc.h" #include "lib/util/util_process.h" +#include "server_util.h" #define min(a, b) (((a) < (b)) ? (a) : (b)) @@ -244,6 +245,7 @@ static void prefork_fork_master( struct tevent_context *ev2; struct task_server *task = NULL; struct process_details pd = initial_process_details; + struct samba_tevent_trace_state *samba_tevent_trace_state = NULL; int control_pipe[2]; t = tfork_create(); @@ -327,6 +329,17 @@ static void prefork_fork_master( */ ev2 = s4_event_context_init(NULL); + samba_tevent_trace_state = create_samba_tevent_trace_state(ev2); + if (samba_tevent_trace_state == NULL) { + TALLOC_FREE(ev); + TALLOC_FREE(ev2); + exit(127); + } + + tevent_set_trace_callback(ev2, + samba_tevent_trace_callback, + samba_tevent_trace_state); + /* setup this new connection: process will bind to it's sockets etc * * While we can use ev for the child, which has been re-initialised diff --git a/source4/smbd/server.c b/source4/smbd/server.c index ee2e7508bb3..cf3102e305a 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -46,6 +46,7 @@ #include "lib/util/tfork.h" #include "dsdb/samdb/ldb_modules/util.h" #include "lib/util/server_id.h" +#include "server_util.h" #ifdef HAVE_PTHREAD #include @@ -572,6 +573,7 @@ static int binary_smbd_main(const char *binary_name, }; struct server_state *state = NULL; struct tevent_signal *se = NULL; + struct samba_tevent_trace_state *samba_tevent_trace_state = NULL; setproctitle("root process"); @@ -729,6 +731,21 @@ static int binary_smbd_main(const char *binary_name, talloc_set_destructor(state->event_ctx, event_ctx_destructor); + samba_tevent_trace_state = create_samba_tevent_trace_state(state); + if (samba_tevent_trace_state == NULL) { + exit_daemon("Samba failed to setup tevent tracing state", + ENOTTY); + /* + * return is never reached but is here to satisfy static + * checkers + */ + return 1; + } + + tevent_set_trace_callback(state->event_ctx, + samba_tevent_trace_callback, + samba_tevent_trace_state); + if (opt_interactive) { /* terminate when stdin goes away */ stdin_event_flags = TEVENT_FD_READ; diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build index 146098ec8e4..14267c1c9a5 100644 --- a/source4/smbd/wscript_build +++ b/source4/smbd/wscript_build @@ -25,7 +25,8 @@ bld.SAMBA_BINARY('samba', source='server.c', subsystem_name='service', deps='''events process_model service samba-hostconfig samba-util POPT_SAMBA - popt gensec registry ntvfs share cluster COMMON_SCHANNEL SECRETS''', + popt gensec registry ntvfs share cluster COMMON_SCHANNEL SECRETS + samba_server_util''', pyembed=True, install_path='${SBINDIR}', enabled=bld.AD_DC_BUILD_IS_ENABLED() @@ -52,6 +53,6 @@ bld.SAMBA_MODULE('process_model_prefork', source='process_prefork.c', subsystem='process_model', init_function='process_model_prefork_init', - deps='MESSAGING events ldbsamba cluster samba-sockets process_model messages_dgm', + deps='MESSAGING events ldbsamba cluster samba-sockets process_model messages_dgm samba_server_util', internal_module=False ) -- 2.26.2 From 36748d1bc4b87f42e1776d6207383ce3517c1a08 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 20 Nov 2020 15:21:03 +0100 Subject: [PATCH 07/11] s4: replace low-level SIGUP handler with a tevent handler Replace the low-level signal handler for SIGHUP with a nice tevent signal handler. The low-level handler sig_hup() installed by setup_signals() remains being used during early startup before a tevent context is available. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 9f71e6173ab43a04804ba8061cb0e8ae6c0165bf) --- source4/smbd/server.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/source4/smbd/server.c b/source4/smbd/server.c index cf3102e305a..1e255b1500d 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -155,6 +155,19 @@ static void sigterm_signal_handler(struct tevent_context *ev, sig_term(SIGTERM); } +static void sighup_signal_handler(struct tevent_context *ev, + struct tevent_signal *se, + int signum, int count, void *siginfo, + void *private_data) +{ + struct server_state *state = talloc_get_type_abort( + private_data, struct server_state); + + DBG_DEBUG("Process %s got SIGHUP\n", state->binary_name); + + reopen_logs_internal(); +} + /* setup signal masks */ @@ -834,6 +847,22 @@ static int binary_smbd_main(const char *binary_name, return 1; } + se = tevent_add_signal(state->event_ctx, + state->event_ctx, + SIGHUP, + 0, + sighup_signal_handler, + state); + if (se == NULL) { + TALLOC_FREE(state); + exit_daemon("Initialize SIGHUP handler failed", ENOMEM); + /* + * return is never reached but is here to satisfy static + * checkers + */ + return 1; + } + if (lpcfg_server_role(cmdline_lp_ctx) != ROLE_ACTIVE_DIRECTORY_DC && !lpcfg_parm_bool(cmdline_lp_ctx, NULL, "server role check", "inhibit", false) -- 2.26.2 From a5389945e0cce72a7df32f688e047ba097e60515 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Nov 2020 16:44:04 +0100 Subject: [PATCH 08/11] s4: call reopen_logs_internal() in the SIGHUP handler of the prefork process model With debug_schedule_reopen_logs() the actual reopen only takes place at some point in the future when a DEBUG message is processed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 19413e76a46f07fdd46fde5e60707bb6845a782d) --- source4/smbd/process_prefork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c index a7558ed385b..68e5762694c 100644 --- a/source4/smbd/process_prefork.c +++ b/source4/smbd/process_prefork.c @@ -115,7 +115,7 @@ static void sighup_signal_handler(struct tevent_context *ev, int signum, int count, void *siginfo, void *private_data) { - debug_schedule_reopen_logs(); + reopen_logs_internal(); } static void sigterm_signal_handler(struct tevent_context *ev, -- 2.26.2 From fea5c418d5af2a10546aeebd638b0bed39075ee5 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 26 Nov 2020 15:23:58 +0100 Subject: [PATCH 09/11] s4/samba: call force_check_log_size() in prefork_reload_after_fork() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme (cherry picked from commit 82b64e930b0e2d3b2e5186017d9f8e420994136c) --- source4/smbd/process_prefork.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c index 68e5762694c..cc440b84527 100644 --- a/source4/smbd/process_prefork.c +++ b/source4/smbd/process_prefork.c @@ -155,6 +155,7 @@ static void prefork_reload_after_fork(void) if (!NT_STATUS_IS_OK(status)) { smb_panic("Failed to re-initialise imessaging after fork"); } + force_check_log_size(); } /* -- 2.26.2 From 52cd9b6ff891f6f4e7d2709a38f61eefec274ff6 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 26 Nov 2020 15:24:26 +0100 Subject: [PATCH 10/11] s4/samba: call force_check_log_size() in standard_accept_connection() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 6fa5fb8ef26dab862df5c46bb5e74f19839c30e2) --- source4/smbd/process_standard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 5e804807c93..992421f7626 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -408,6 +408,8 @@ static void standard_accept_connection( talloc_free(c); talloc_free(s); + force_check_log_size(); + /* setup this new connection. Cluster ID is PID based for this process model */ new_conn(ev, lp_ctx, sock2, cluster_id(pid, 0), private_data, process_context); -- 2.26.2 From bf6020432eb9faf1be140c60df6fce48f6eac09f Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 26 Nov 2020 15:24:44 +0100 Subject: [PATCH 11/11] s4/samba: call force_check_log_size() in standard_new_task() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248 RN: samba process does not honor max log size Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Dec 7 18:54:29 UTC 2020 on sn-devel-184 (cherry picked from commit 058f96f4c4eda42b404f0067521d3eafb495fe7d) --- source4/smbd/process_standard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 992421f7626..5af8710d26f 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -516,6 +516,8 @@ static void standard_new_task(struct tevent_context *ev, */ prctl_set_comment("%s[task]", service_name); + force_check_log_size(); + /* * Set up the process context to be passed through to the terminate * and accept_connection functions -- 2.26.2