1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

param: move SMB2 defaults to lib/param and use in loadparm_init

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Garming Sam 2014-01-16 13:32:42 +13:00 committed by Andrew Bartlett
parent 89ff7b0d85
commit 6e954a5605
3 changed files with 10 additions and 9 deletions

View File

@ -2206,7 +2206,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "enable privileges", "True");
lpcfg_do_global_parameter(lp_ctx, "smb2 max write", "1048576");
lpcfg_do_global_parameter_var(lp_ctx, "smb2 max write", "%u", DEFAULT_SMB2_MAX_WRITE);
lpcfg_do_global_parameter(lp_ctx, "passdb backend", "tdbsam");
@ -2216,7 +2216,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "mangled names", "True");
lpcfg_do_global_parameter(lp_ctx, "smb2 max credits", "8192");
lpcfg_do_global_parameter_var(lp_ctx, "smb2 max credits", "%u", DEFAULT_SMB2_MAX_CREDITS);
lpcfg_do_global_parameter(lp_ctx, "ldap ssl", "start tls");
@ -2304,9 +2304,9 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "lpq cache time", "30");
lpcfg_do_global_parameter(lp_ctx, "smb2 max trans", "1048576");
lpcfg_do_global_parameter_var(lp_ctx, "smb2 max trans", "%u", DEFAULT_SMB2_MAX_TRANSACT);
lpcfg_do_global_parameter(lp_ctx, "smb2 max read", "1048576");
lpcfg_do_global_parameter_var(lp_ctx, "smb2 max read", "%u", DEFAULT_SMB2_MAX_READ);
lpcfg_do_global_parameter(lp_ctx, "durable handles", "yes");

View File

@ -208,6 +208,12 @@ enum case_handling {CASE_LOWER,CASE_UPPER};
#define GUEST_ACCOUNT "nobody"
#endif
/* SMB2 defaults */
#define DEFAULT_SMB2_MAX_READ (1024*1024)
#define DEFAULT_SMB2_MAX_WRITE (1024*1024)
#define DEFAULT_SMB2_MAX_TRANSACT (1024*1024)
#define DEFAULT_SMB2_MAX_CREDITS 8192
#define LOADPARM_EXTRA_LOCALS \
bool valid; \
int usershare; \

View File

@ -207,9 +207,4 @@
#define CLIENT_NDR_PADDING_SIZE 8
#define SERVER_NDR_PADDING_SIZE 8
#define DEFAULT_SMB2_MAX_READ (1024*1024)
#define DEFAULT_SMB2_MAX_WRITE (1024*1024)
#define DEFAULT_SMB2_MAX_TRANSACT (1024*1024)
#define DEFAULT_SMB2_MAX_CREDITS 8192
#endif