Fixed bug when status=no and max smbd processes > 0.
authorJeremy Allison <jra@samba.org>
Thu, 11 Oct 2001 05:53:15 +0000 (05:53 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 11 Oct 2001 05:53:15 +0000 (05:53 +0000)
Jeremy.

source/smbd/process.c
source/utils/testparm.c

index 4b0da0b4663f214ec90304f461e5b73759ffb731..4b7e80811c4b305f1ef6f88faffc3c5121e3de85 100644 (file)
@@ -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;
 
index 09948b86359074d647f10553b9cc019378ec6769..9397ea252016f5af9eec516f37a9f54adc93102f 100644 (file)
@@ -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;
 }