diff options
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 807d074082..ced8223833 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -380,6 +380,7 @@ struct global { int ismb2_max_read; int ismb2_max_write; int ismb2_max_trans; + int ismb2_max_credits; char *ncalrpc_dir; }; @@ -2635,6 +2636,15 @@ static struct parm_struct parm_table[] = { .enum_list = NULL, .flags = FLAG_ADVANCED, }, + { + .label = "smb2 max credits", + .type = P_INTEGER, + .p_class = P_GLOBAL, + .ptr = &Globals.ismb2_max_credits, + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, {N_("Printing Options"), P_SEP, P_SEPARATOR}, @@ -5404,9 +5414,10 @@ static void init_globals(bool reinit_globals) Globals.bMapUntrustedToDomain = false; Globals.bMulticastDnsRegister = true; - Globals.ismb2_max_read = 1024*1024; - Globals.ismb2_max_write = 1024*1024; - Globals.ismb2_max_trans = 1024*1024; + Globals.ismb2_max_read = DEFAULT_SMB2_MAX_READ; + Globals.ismb2_max_write = DEFAULT_SMB2_MAX_WRITE; + Globals.ismb2_max_trans = DEFAULT_SMB2_MAX_TRANSACT; + Globals.ismb2_max_credits = DEFAULT_SMB2_MAX_CREDITS; string_set(&Globals.ncalrpc_dir, get_dyn_NCALRPCDIR()); @@ -5777,7 +5788,13 @@ FN_GLOBAL_INTEGER(lp_config_backend, &Globals.ConfigBackend) FN_GLOBAL_INTEGER(lp_smb2_max_read, &Globals.ismb2_max_read) FN_GLOBAL_INTEGER(lp_smb2_max_write, &Globals.ismb2_max_write) FN_GLOBAL_INTEGER(lp_smb2_max_trans, &Globals.ismb2_max_trans) - +int lp_smb2_max_credits(void) +{ + if (Globals.ismb2_max_credits == 0) { + Globals.ismb2_max_credits = DEFAULT_SMB2_MAX_CREDITS; + } + return Globals.ismb2_max_credits; +} FN_LOCAL_STRING(lp_preexec, szPreExec) FN_LOCAL_STRING(lp_postexec, szPostExec) FN_LOCAL_STRING(lp_rootpreexec, szRootPreExec) |