Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
26b994fa
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
26b994fa
编写于
8月 06, 2008
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Code cleanup in old sessionsetup code
Remove some long lines Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
95089910
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
78 deletion
+80
-78
fs/cifs/CHANGES
fs/cifs/CHANGES
+8
-0
fs/cifs/connect.c
fs/cifs/connect.c
+72
-78
未找到文件。
fs/cifs/CHANGES
浏览文件 @
26b994fa
Version 1.54
------------
Fix premature write failure on congested networks (we would give up
on EAGAIN from the socket too quickly on large writes).
Cifs_mkdir and cifs_create now respect the setgid bit on parent dir.
Fix endian problems in acl (mode from/to cifs acl) on bigendian
architectures.
Version 1.53
Version 1.53
------------
------------
DFS support added (Microsoft Distributed File System client support needed
DFS support added (Microsoft Distributed File System client support needed
...
...
fs/cifs/connect.c
浏览文件 @
26b994fa
...
@@ -3620,97 +3620,91 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
...
@@ -3620,97 +3620,91 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
}
}
first_time
=
1
;
first_time
=
1
;
}
}
if
(
!
rc
)
{
pSesInfo
->
flags
=
0
;
if
(
rc
)
pSesInfo
->
capabilities
=
pSesInfo
->
server
->
capabilities
;
goto
ss_err_exit
;
if
(
linuxExtEnabled
==
0
)
pSesInfo
->
capabilities
&=
(
~
CAP_UNIX
);
pSesInfo
->
flags
=
0
;
pSesInfo
->
capabilities
=
pSesInfo
->
server
->
capabilities
;
if
(
linuxExtEnabled
==
0
)
pSesInfo
->
capabilities
&=
(
~
CAP_UNIX
);
/* pSesInfo->sequence_number = 0;*/
/* pSesInfo->sequence_number = 0;*/
cFYI
(
1
,
cFYI
(
1
,
(
"Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d"
,
(
"Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d"
,
pSesInfo
->
server
->
secMode
,
pSesInfo
->
server
->
secMode
,
pSesInfo
->
server
->
capabilities
,
pSesInfo
->
server
->
capabilities
,
pSesInfo
->
server
->
timeAdj
));
pSesInfo
->
server
->
timeAdj
));
if
(
experimEnabled
<
2
)
if
(
experimEnabled
<
2
)
rc
=
CIFS_SessSetup
(
xid
,
pSesInfo
,
first_time
,
nls_info
);
rc
=
CIFS_SessSetup
(
xid
,
pSesInfo
,
else
if
(
extended_security
first_time
,
nls_info
);
&&
(
pSesInfo
->
capabilities
&
CAP_EXTENDED_SECURITY
)
else
if
(
extended_security
&&
(
pSesInfo
->
server
->
secType
==
NTLMSSP
))
{
&&
(
pSesInfo
->
capabilities
rc
=
-
EOPNOTSUPP
;
&
CAP_EXTENDED_SECURITY
)
}
else
if
(
extended_security
&&
(
pSesInfo
->
server
->
secType
==
NTLMSSP
))
{
&&
(
pSesInfo
->
capabilities
&
CAP_EXTENDED_SECURITY
)
rc
=
-
EOPNOTSUPP
;
&&
(
pSesInfo
->
server
->
secType
==
RawNTLMSSP
))
{
}
else
if
(
extended_security
cFYI
(
1
,
(
"NTLMSSP sesssetup"
));
&&
(
pSesInfo
->
capabilities
&
CAP_EXTENDED_SECURITY
)
rc
=
CIFSNTLMSSPNegotiateSessSetup
(
xid
,
pSesInfo
,
&
ntlmv2_flag
,
&&
(
pSesInfo
->
server
->
secType
==
RawNTLMSSP
))
{
nls_info
);
cFYI
(
1
,
(
"NTLMSSP sesssetup"
));
if
(
!
rc
)
{
rc
=
CIFSNTLMSSPNegotiateSessSetup
(
xid
,
if
(
ntlmv2_flag
)
{
pSesInfo
,
char
*
v2_response
;
&
ntlmv2_flag
,
cFYI
(
1
,
(
"more secure NTLM ver2 hash"
));
nls_info
);
if
(
CalcNTLMv2_partial_mac_key
(
pSesInfo
,
if
(
!
rc
)
{
nls_info
))
{
if
(
ntlmv2_flag
)
{
rc
=
-
ENOMEM
;
char
*
v2_response
;
goto
ss_err_exit
;
cFYI
(
1
,
(
"more secure NTLM ver2 hash"
));
}
else
if
(
CalcNTLMv2_partial_mac_key
(
pSesInfo
,
v2_response
=
kmalloc
(
16
+
64
/* blob*/
,
nls_info
))
{
GFP_KERNEL
);
rc
=
-
ENOMEM
;
if
(
v2_response
)
{
goto
ss_err_exit
;
CalcNTLMv2_response
(
pSesInfo
,
}
else
v2_response
);
v2_response
=
kmalloc
(
16
+
64
/* blob */
,
GFP_KERNEL
);
/* if (first_time)
if
(
v2_response
)
{
cifs_calculate_ntlmv2_mac_key */
CalcNTLMv2_response
(
pSesInfo
,
kfree
(
v2_response
);
v2_response
);
/* if (first_time)
cifs_calculate_ntlmv2_mac_key(
pSesInfo->server->mac_signing_key,
response, ntlm_session_key,*/
kfree
(
v2_response
);
/* BB Put dummy sig in SessSetup PDU? */
/* BB Put dummy sig in SessSetup PDU? */
}
else
{
rc
=
-
ENOMEM
;
goto
ss_err_exit
;
}
}
else
{
}
else
{
SMBNTencrypt
(
pSesInfo
->
password
,
rc
=
-
ENOMEM
;
pSesInfo
->
server
->
cryptKey
,
goto
ss_err_exit
;
ntlm_session_key
);
if
(
first_time
)
cifs_calculate_mac_key
(
&
pSesInfo
->
server
->
mac_signing_key
,
ntlm_session_key
,
pSesInfo
->
password
);
}
}
}
else
{
SMBNTencrypt
(
pSesInfo
->
password
,
pSesInfo
->
server
->
cryptKey
,
ntlm_session_key
);
if
(
first_time
)
cifs_calculate_mac_key
(
&
pSesInfo
->
server
->
mac_signing_key
,
ntlm_session_key
,
pSesInfo
->
password
);
}
/* for better security the weaker lanman hash not sent
/* for better security the weaker lanman hash not sent
in AuthSessSetup so we no longer calculate it */
in AuthSessSetup so we no longer calculate it */
rc
=
CIFSNTLMSSPAuthSessSetup
(
xid
,
rc
=
CIFSNTLMSSPAuthSessSetup
(
xid
,
pSesInfo
,
pSesInfo
,
ntlm_session_key
,
ntlm_session_key
,
ntlmv2_flag
,
ntlmv2_flag
,
nls_info
);
nls_info
);
}
}
}
else
{
/* old style NTLM 0.12 session setup */
}
else
{
/* old style NTLM 0.12 session setup */
SMBNTencrypt
(
pSesInfo
->
password
,
pSesInfo
->
server
->
cryptKey
,
SMBNTencrypt
(
pSesInfo
->
password
,
ntlm_session_key
);
pSesInfo
->
server
->
cryptKey
,
ntlm_session_key
);
if
(
first_time
)
if
(
first_time
)
cifs_calculate_mac_key
(
cifs_calculate_mac_key
(
&
pSesInfo
->
server
->
mac_signing_key
,
&
pSesInfo
->
server
->
mac_signing_key
,
ntlm_session_key
,
pSesInfo
->
password
);
ntlm_session_key
,
pSesInfo
->
password
);
rc
=
CIFSSessSetup
(
xid
,
pSesInfo
,
rc
=
CIFSSessSetup
(
xid
,
pSesInfo
,
ntlm_session_key
,
nls_info
);
ntlm_session_key
,
nls_info
);
}
}
if
(
rc
)
{
if
(
rc
)
{
cERROR
(
1
,
(
"Send error in SessSetup = %d"
,
rc
));
cERROR
(
1
,
(
"Send error in SessSetup = %d"
,
rc
));
}
else
{
}
else
{
cFYI
(
1
,
(
"CIFS Session Established successfully"
));
cFYI
(
1
,
(
"CIFS Session Established successfully"
));
pSesInfo
->
status
=
CifsGood
;
pSesInfo
->
status
=
CifsGood
;
}
}
}
ss_err_exit:
ss_err_exit:
return
rc
;
return
rc
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录