.special = NULL,
.enum_list = enum_protocol
},
+ {
+ .label = "max protocol",
+ .type = P_ENUM,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(srv_maxprotocol),
+ .special = NULL,
+ .enum_list = enum_protocol
+ },
+ {
+ .label = "protocol",
+ .type = P_ENUM,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(srv_maxprotocol),
+ .special = NULL,
+ .enum_list = enum_protocol
+ },
{
.label = "server min protocol",
.type = P_ENUM,
.special = NULL,
.enum_list = enum_protocol
},
+ {
+ .label = "min protocol",
+ .type = P_ENUM,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(srv_minprotocol),
+ .special = NULL,
+ .enum_list = enum_protocol
+ },
{
.label = "client max protocol",
.type = P_ENUM,
int lp_usernamelevel(void);
int lp_deadtime(void);
bool lp_getwd_cache(void);
-int lp_maxprotocol(void);
-int lp_minprotocol(void);
+int lp_srv_maxprotocol(void);
+int lp_srv_minprotocol(void);
int lp_security(void);
const char **lp_auth_methods(void);
bool lp_paranoid_server_security(void);
.label = "max protocol",
.type = P_ENUM,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(maxprotocol),
+ .offset = GLOBAL_VAR(srv_maxprotocol),
+ .special = NULL,
+ .enum_list = enum_protocol,
+ .flags = FLAG_ADVANCED,
+ },
+ {
+ .label = "server max protocol",
+ .type = P_ENUM,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(srv_maxprotocol),
.special = NULL,
.enum_list = enum_protocol,
.flags = FLAG_ADVANCED,
.label = "protocol",
.type = P_ENUM,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(maxprotocol),
+ .offset = GLOBAL_VAR(srv_maxprotocol),
.special = NULL,
.enum_list = enum_protocol,
.flags = FLAG_ADVANCED,
.label = "min protocol",
.type = P_ENUM,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(minprotocol),
+ .offset = GLOBAL_VAR(srv_minprotocol),
+ .special = NULL,
+ .enum_list = enum_protocol,
+ .flags = FLAG_ADVANCED,
+ },
+ {
+ .label = "server min protocol",
+ .type = P_ENUM,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(srv_minprotocol),
.special = NULL,
.enum_list = enum_protocol,
.flags = FLAG_ADVANCED,
Globals.max_log_size = 5000;
Globals.max_open_files = max_open_files();
Globals.open_files_db_hash_size = SMB_OPEN_DATABASE_TDB_HASH_SIZE;
- Globals.maxprotocol = PROTOCOL_NT1;
- Globals.minprotocol = PROTOCOL_CORE;
+ Globals.srv_maxprotocol = PROTOCOL_NT1;
+ Globals.srv_minprotocol = PROTOCOL_CORE;
Globals.security = SEC_USER;
Globals.paranoid_server_security = true;
Globals.bEncryptPasswords = true;
FN_GLOBAL_INTEGER(lp_usernamelevel, unamelevel)
FN_GLOBAL_INTEGER(lp_deadtime, deadtime)
FN_GLOBAL_BOOL(lp_getwd_cache, getwd_cache)
-static FN_GLOBAL_INTEGER(_lp_maxprotocol, maxprotocol)
-int lp_maxprotocol(void)
+static FN_GLOBAL_INTEGER(_lp_srv_maxprotocol, srv_maxprotocol)
+int lp_srv_maxprotocol(void)
{
- int ret = _lp_maxprotocol();
+ int ret = _lp_srv_maxprotocol();
if ((ret >= PROTOCOL_SMB2_02) && (lp_security() == SEC_SHARE)) {
DEBUG(2,("WARNING!!: \"security = share\" is incompatible "
"with the SMB2 protocol. Resetting to SMB1.\n" ));
- lp_do_parameter(-1, "max protocol", "NT1");
+ lp_do_parameter(-1, "server max protocol", "NT1");
return PROTOCOL_NT1;
}
return ret;
}
-FN_GLOBAL_INTEGER(lp_minprotocol, minprotocol)
+FN_GLOBAL_INTEGER(lp_srv_minprotocol, srv_minprotocol)
FN_GLOBAL_INTEGER(lp_security, security)
FN_GLOBAL_LIST(lp_auth_methods, AuthMethods)
FN_GLOBAL_BOOL(lp_paranoid_server_security, paranoid_server_security)
.unix_extensions = lp_unix_extensions,
.use_spnego = lp_use_spnego,
.use_mmap = lp_use_mmap,
+
+ .srv_minprotocol = lp_srv_minprotocol,
+ .srv_maxprotocol = lp_srv_maxprotocol,
};
const struct loadparm_s3_context *loadparm_s3_context(void)
/* Check for protocols, most desirable first */
for (protocol = 0; supported_protocols[protocol].proto_name; protocol++) {
i = 0;
- if ((supported_protocols[protocol].protocol_level <= lp_maxprotocol()) &&
- (supported_protocols[protocol].protocol_level >= lp_minprotocol()))
+ if ((supported_protocols[protocol].protocol_level <= lp_srv_maxprotocol()) &&
+ (supported_protocols[protocol].protocol_level >= lp_srv_minprotocol()))
while (i < num_cliprotos) {
if (strequal(cliprotos[i],supported_protocols[protocol].proto_name))
choice = i;
char *rhost;
int ret;
- if (lp_maxprotocol() >= PROTOCOL_SMB2_02) {
+ if (lp_srv_maxprotocol() >= PROTOCOL_SMB2_02) {
/*
* We're not making the decision here,
* we're just allowing the client
indyn = (const uint8_t *)req->in.vector[i+2].iov_base;
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
- if (lp_maxprotocol() < PROTOCOL_SMB2_24) {
+ if (lp_srv_maxprotocol() < PROTOCOL_SMB2_24) {
break;
}
- if (lp_minprotocol() > PROTOCOL_SMB2_24) {
+ if (lp_srv_minprotocol() > PROTOCOL_SMB2_24) {
break;
}
}
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
- if (lp_maxprotocol() < PROTOCOL_SMB2_22) {
+ if (lp_srv_maxprotocol() < PROTOCOL_SMB2_22) {
break;
}
- if (lp_minprotocol() > PROTOCOL_SMB2_22) {
+ if (lp_srv_minprotocol() > PROTOCOL_SMB2_22) {
break;
}
}
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
- if (lp_maxprotocol() < PROTOCOL_SMB2_10) {
+ if (lp_srv_maxprotocol() < PROTOCOL_SMB2_10) {
break;
}
- if (lp_minprotocol() > PROTOCOL_SMB2_10) {
+ if (lp_srv_minprotocol() > PROTOCOL_SMB2_10) {
break;
}
}
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
- if (lp_maxprotocol() < PROTOCOL_SMB2_02) {
+ if (lp_srv_maxprotocol() < PROTOCOL_SMB2_02) {
break;
}
- if (lp_minprotocol() > PROTOCOL_SMB2_02) {
+ if (lp_srv_minprotocol() > PROTOCOL_SMB2_02) {
break;
}
}
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
- if (lp_maxprotocol() < PROTOCOL_SMB2_10) {
+ if (lp_srv_maxprotocol() < PROTOCOL_SMB2_10) {
break;
}