From 76745313b16c07092b0198da4d4fc05b38e600f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Oct 2001 05:53:15 +0000 Subject: Fixed bug when status=no and max smbd processes > 0. Jeremy. (This used to be commit d1adaee373f08020d350af2aa65b7651da94bdae) --- source3/smbd/process.c | 6 ++++++ source3/utils/testparm.c | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'source3') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 4b0da0b466..4b7e80811c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -804,6 +804,12 @@ static BOOL smbd_process_limit(void) total_smbds = 1; /* In case we need to create the entry. */ + if (!conn_tdb_ctx()) { + DEBUG(0,("smbd_process_limit: max smbd processes parameter set with status parameter not \ +set. Ignoring max smbd restriction.\n")); + return False; + } + if (tdb_change_int_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, 1) == -1) return True; diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 09948b8635..9397ea2520 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -157,6 +157,11 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ } } + if (lp_status(-1) && lp_max_smbd_processes()) { + printf("ERROR: the 'max smbd processes' parameter is set and the 'status' parameter is set to 'no'.\n"); + ret = 1; + } + return ret; } -- cgit