File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1873,9 +1873,8 @@ static int match_session(struct cifs_ses *ses,
1873
1873
struct smb3_fs_context * ctx ,
1874
1874
bool match_super )
1875
1875
{
1876
- if (ctx -> sectype != Unspecified &&
1877
- ctx -> sectype != ses -> sectype )
1878
- return 0 ;
1876
+ struct TCP_Server_Info * server = ses -> server ;
1877
+ enum securityEnum ctx_sec , ses_sec ;
1879
1878
1880
1879
if (!match_super && ctx -> dfs_root_ses != ses -> dfs_root_ses )
1881
1880
return 0 ;
@@ -1887,11 +1886,20 @@ static int match_session(struct cifs_ses *ses,
1887
1886
if (ses -> chan_max < ctx -> max_channels )
1888
1887
return 0 ;
1889
1888
1890
- switch (ses -> sectype ) {
1889
+ ctx_sec = server -> ops -> select_sectype (server , ctx -> sectype );
1890
+ ses_sec = server -> ops -> select_sectype (server , ses -> sectype );
1891
+
1892
+ if (ctx_sec != ses_sec )
1893
+ return 0 ;
1894
+
1895
+ switch (ctx_sec ) {
1896
+ case IAKerb :
1891
1897
case Kerberos :
1892
1898
if (!uid_eq (ctx -> cred_uid , ses -> cred_uid ))
1893
1899
return 0 ;
1894
1900
break ;
1901
+ case NTLMv2 :
1902
+ case RawNTLMSSP :
1895
1903
default :
1896
1904
/* NULL username means anonymous session */
1897
1905
if (ses -> user_name == NULL ) {
You can’t perform that action at this time.
0 commit comments