summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7130cf0f49..b4cf4930cd 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -68,7 +68,7 @@
BOOL in_client = False; /* Not in the client by default */
BOOL bLoaded = False;
-extern int DEBUGLEVEL;
+extern int DEBUGLEVEL_CLASS[DBGC_LAST];
extern pstring user_socket_options;
extern pstring global_myname;
pstring global_scope = "";
@@ -189,6 +189,7 @@ typedef struct
int security;
int maxdisksize;
int lpqcachetime;
+ int iMaxSmbdProcesses;
int iTotalPrintJobs;
int syslog;
int os_level;
@@ -528,6 +529,7 @@ static BOOL handle_source_env(char *pszParmValue, char **ptr);
static BOOL handle_netbios_name(char *pszParmValue, char **ptr);
static BOOL handle_winbind_id(char *pszParmValue, char **ptr);
static BOOL handle_wins_server_list(char *pszParmValue, char **ptr);
+static BOOL handle_debug_list( char *pszParmValue, char **ptr );
static void set_server_role(void);
static void set_default_server_announce_type(void);
@@ -750,8 +752,8 @@ static struct parm_struct parm_table[] = {
#endif /* WITH_SSL */
{"Logging Options", P_SEP, P_SEPARATOR},
- {"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL, NULL, NULL, FLAG_BASIC},
- {"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL, NULL, NULL, 0},
+ {"log level", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0},
+ {"debuglevel", P_INTEGER, P_GLOBAL, &DEBUGLEVEL_CLASS[DBGC_ALL], handle_debug_list, NULL, 0},
{"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0},
{"syslog only", P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0},
{"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0},
@@ -796,6 +798,7 @@ static struct parm_struct parm_table[] = {
{"keepalive", P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, 0},
{"lpq cache time", P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, 0},
+ {"max smbd processes", P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, 0},
{"max connections", P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL, NULL, FLAG_SHARE},
{"max disk size", P_INTEGER, P_GLOBAL, &Globals.maxdisksize, NULL, NULL, 0},
{"max open files", P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, 0},
@@ -1195,6 +1198,7 @@ static void init_globals(void)
Globals.max_xmit = 65535;
Globals.max_mux = 50; /* This is *needed* for profile support. */
Globals.lpqcachetime = 10;
+ Globals.iMaxSmbdProcesses = 0;/* no limit specified */
Globals.iTotalPrintJobs = 0; /* no limit specified */
Globals.pwordlevel = 0;
Globals.unamelevel = 0;
@@ -1520,6 +1524,7 @@ FN_GLOBAL_INTEGER(lp_maxprotocol, &Globals.maxprotocol)
FN_GLOBAL_INTEGER(lp_security, &Globals.security)
FN_GLOBAL_INTEGER(lp_maxdisksize, &Globals.maxdisksize)
FN_GLOBAL_INTEGER(lp_lpqcachetime, &Globals.lpqcachetime)
+FN_GLOBAL_INTEGER(lp_max_smbd_processes, &Globals.iMaxSmbdProcesses)
FN_GLOBAL_INTEGER(lp_totalprintjobs, &Globals.iTotalPrintJobs)
FN_GLOBAL_INTEGER(lp_syslog, &Globals.syslog)
FN_GLOBAL_INTEGER(lp_client_code_page, &Globals.client_code_page)
@@ -2443,6 +2448,18 @@ static BOOL handle_wins_server_list( char *pszParmValue, char **ptr )
/***************************************************************************
+ Handle the DEBUG level list
+***************************************************************************/
+static BOOL handle_debug_list( char *pszParmValueIn, char **ptr )
+{
+ pstring pszParmValue;
+
+ pstrcpy(pszParmValue, pszParmValueIn);
+ return debug_parse_levels( pszParmValue );
+}
+
+
+/***************************************************************************
initialise a copymap
***************************************************************************/
static void init_copymap(service * pservice)