Files
smeserver-samba/root/etc/e-smith/templates/etc/smb.conf/11maxProtocol

28 lines
1.5 KiB
Plaintext

{
# Normally this should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropiate protocol.
$OUT = "";
our %ProtocolOrder = ( CORE => 1, # samba client default without explicit option; not available for server
COREPLUS => 2, # not available for server
LANMAN1 => 3, #samba server default without explicit option
LANMAN2 => 4,
NT1 => 5, # CIFS or SMB1
SMB2_02 => 6,
SMB2_10 => 7,
SMB2 => 7, # yes SMB2 default to 2_10
SMB2_22 => 8,
SMB2_24 => 9,
SMB3_00 => 10,
SMB3_02 => 11,
SMB3_10 => 12,
SMB3_11 => 13,
'SMB3' => 13 # yes SMB3 default to SMB3_11
);
$clientMaxProt = $smb{ClientMaxProtocol} || "SMB3";
$serverMaxProt = $smb{ServerMaxProtocol} || "SMB3";
#checking option is possible
$clientMaxProt = ( exists($ProtocolOrder{$clientMaxProt}) ) ? $clientMaxProt : "SMB3";
$serverMaxProt = ( exists($ProtocolOrder{$serverMaxProt}) && $ProtocolOrder{$serverMaxProt} >= 3) ? $serverMaxProt : "SMB3";
$OUT .= "client max protocol = $clientMaxProt\n";
$OUT .= "server max protocol = $serverMaxProt";
}