/[smeserver]/rpms/e-smith-samba/sme10/e-smith-samba-2.6.0-bz10963-bz10576-minprot-SMB2.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme10/e-smith-samba-2.6.0-bz10963-bz10576-minprot-SMB2.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Sat Apr 17 01:32:00 2021 UTC (3 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-samba-2_6_0-28_el7_sme, e-smith-samba-2_6_0-22_el7_sme, e-smith-samba-2_6_0-25_el7_sme, e-smith-samba-2_6_0-23_el7_sme, e-smith-samba-2_6_0-26_el7_sme, e-smith-samba-2_6_0-24_el7_sme, e-smith-samba-2_6_0-27_el7_sme, e-smith-samba-2_6_0-20_el7_sme, e-smith-samba-2_6_0-21_el7_sme, HEAD
Changes since 1.3: +1 -9 lines
* Fri Apr 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-20.sme
- fix double entries for min protocol [SME: 11558]

1 jpp 1.1 diff -Nur e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11maxProtocol e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11maxProtocol
2     --- e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11maxProtocol 2016-02-05 12:16:12.000000000 -0500
3     +++ e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11maxProtocol 2020-06-23 13:57:15.530000000 -0400
4     @@ -1,12 +1,27 @@
5     {
6     # Normally this should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropiate protocol.
7     $OUT = "";
8     - if ($smb{ClientMaxProtocol})
9     - {
10     - $OUT .= "client max protocol = $smb{ClientMaxProtocol}\n";
11     - }
12     - if ($smb{ServerMaxProtocol})
13     - {
14     - $OUT .= "server max protocol = $smb{ServerMaxProtocol}";
15     - }
16     -}
17     + our %ProtocolOrder = ( CORE => 1, # samba client default without explicit option; not available for server
18     + COREPLUS => 2, # not available for server
19     + LANMAN1 => 3, #samba server default without explicit option
20     + LANMAN2 => 4,
21     + NT1 => 5, # CIFS or SMB1
22     + SMB2_02 => 6,
23     + SMB2_10 => 7,
24     + SMB2 => 7, # yes SMB2 default to 2_10
25     + SMB2_22 => 8,
26     + SMB2_24 => 9,
27     + SMB3_00 => 10,
28     + SMB3_02 => 11,
29     + SMB3_10 => 12,
30     + SMB3_11 => 13,
31     + 'SMB3' => 13 # yes SMB3 default to SMB3_11
32     + );
33     + $clientMaxProt = $smb{ClientMaxProtocol} || "SMB3";
34     + $serverMaxProt = $smb{ServerMaxProtocol} || "SMB3";
35     + #checking option is possible
36     + $clientMaxProt = ( exists($ProtocolOrder{$clientMaxProt}) ) ? $clientMaxProt : "SMB3";
37     + $serverMaxProt = ( exists($ProtocolOrder{$serverMaxProt}) && $ProtocolOrder{$serverMaxProt} >= 3) ? $serverMaxProt : "SMB3";
38     + $OUT .= "client max protocol = $clientMaxProt\n";
39     + $OUT .= "server max protocol = $serverMaxProt";
40     +}
41     diff -Nur e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11minProtocol e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11minProtocol
42     --- e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11minProtocol 1969-12-31 19:00:00.000000000 -0500
43     +++ e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11minProtocol 2020-06-23 13:57:34.819000000 -0400
44 jpp 1.4 @@ -0,0 +1,16 @@
45 jpp 1.1 +{
46     +# Normally this should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropiate protocol.
47     + $OUT = "";
48     + $clientMinProt = $smb{ClientMinProtocol} || "SMB2";
49     + $serverMinProt = $smb{ServerMinProtocol} || "SMB2";
50     + $clientMinProt = ( exists($ProtocolOrder{$clientMinProt}) ) ? $clientMinProt : "SMB2";
51     + $serverMinProt = ( exists($ProtocolOrder{$serverMinProt}) && $ProtocolOrder{$serverMinProt} >= 3) ? $serverMinProt : "SMB3";
52     + #checking min prot is not higher
53     + $clientMinProt = ( $ProtocolOrder{$clientMaxProt} >= $ProtocolOrder{$clientMinProt} ) ? $clientMinProt : $clientMaxProt;
54     + $serverMinProt = ( $ProtocolOrder{$serverMaxProt} >= $ProtocolOrder{$serverMinProt} ) ? $serverMinProt : $serverMaxProt;
55     +
56     + $OUT .= "client min protocol = $clientMinProt\n";
57     + $OUT .= "server min protocol = $serverMinProt";
58     +
59     +}
60     +
61     diff -Nur e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11smbPorts e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11smbPorts
62     --- e-smith-samba-2.6.0.old/root/etc/e-smith/templates/etc/smb.conf/11smbPorts 2007-12-15 10:53:08.000000000 -0500
63     +++ e-smith-samba-2.6.0/root/etc/e-smith/templates/etc/smb.conf/11smbPorts 2020-06-23 13:57:48.232000000 -0400
64     @@ -1,5 +1,7 @@
65     {
66 jpp 1.3 - my $smb_ports = $smb{SMBPorts} || 139;
67     + my $smb_ports = $smb{SMBPorts} || "139 445";
68 jpp 1.1
69 jpp 1.3 + $smb_ports = "$smb_ports 445" unless ( $smb_ports =~ /445/ || $ProtocolOrder{$serverMaxProt} <= 5 );
70 jpp 1.1 +
71     "smb ports = $smb_ports";
72     }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed