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 @@ -1825,9 +1825,8 @@ static int match_session(struct cifs_ses *ses,
1825
1825
struct smb3_fs_context * ctx ,
1826
1826
bool match_super )
1827
1827
{
1828
- if (ctx -> sectype != Unspecified &&
1829
- ctx -> sectype != ses -> sectype )
1830
- return 0 ;
1828
+ struct TCP_Server_Info * server = ses -> server ;
1829
+ enum securityEnum ctx_sec , ses_sec ;
1831
1830
1832
1831
if (!match_super && ctx -> dfs_root_ses != ses -> dfs_root_ses )
1833
1832
return 0 ;
@@ -1839,11 +1838,20 @@ static int match_session(struct cifs_ses *ses,
1839
1838
if (ses -> chan_max < ctx -> max_channels )
1840
1839
return 0 ;
1841
1840
1842
- switch (ses -> sectype ) {
1841
+ ctx_sec = server -> ops -> select_sectype (server , ctx -> sectype );
1842
+ ses_sec = server -> ops -> select_sectype (server , ses -> sectype );
1843
+
1844
+ if (ctx_sec != ses_sec )
1845
+ return 0 ;
1846
+
1847
+ switch (ctx_sec ) {
1848
+ case IAKerb :
1843
1849
case Kerberos :
1844
1850
if (!uid_eq (ctx -> cred_uid , ses -> cred_uid ))
1845
1851
return 0 ;
1846
1852
break ;
1853
+ case NTLMv2 :
1854
+ case RawNTLMSSP :
1847
1855
default :
1848
1856
/* NULL username means anonymous session */
1849
1857
if (ses -> user_name == NULL ) {
You can’t perform that action at this time.
0 commit comments