Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
77159b4d
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
77159b4d
编写于
8月 31, 2007
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Fix warnings shown by newer version of sparse
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
26f57364
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
32 addition
and
37 deletion
+32
-37
fs/cifs/connect.c
fs/cifs/connect.c
+28
-33
fs/cifs/dir.c
fs/cifs/dir.c
+1
-1
fs/cifs/inode.c
fs/cifs/inode.c
+2
-2
fs/cifs/link.c
fs/cifs/link.c
+1
-1
未找到文件。
fs/cifs/connect.c
浏览文件 @
77159b4d
...
...
@@ -2972,36 +2972,32 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
SecurityBlob
->
DomainName
.
Length
=
0
;
SecurityBlob
->
DomainName
.
MaximumLength
=
0
;
}
else
{
__u16
len
=
cifs_strtoUCS
((
__le16
*
)
bcc_ptr
,
domain
,
64
,
__u16
ln
=
cifs_strtoUCS
((
__le16
*
)
bcc_ptr
,
domain
,
64
,
nls_codepage
);
l
e
n
*=
2
;
ln
*=
2
;
SecurityBlob
->
DomainName
.
MaximumLength
=
cpu_to_le16
(
l
e
n
);
cpu_to_le16
(
ln
);
SecurityBlob
->
DomainName
.
Buffer
=
cpu_to_le32
(
SecurityBlobLength
);
bcc_ptr
+=
len
;
SecurityBlobLength
+=
len
;
SecurityBlob
->
DomainName
.
Length
=
cpu_to_le16
(
len
);
bcc_ptr
+=
ln
;
SecurityBlobLength
+=
ln
;
SecurityBlob
->
DomainName
.
Length
=
cpu_to_le16
(
ln
);
}
if
(
user
==
NULL
)
{
SecurityBlob
->
UserName
.
Buffer
=
0
;
SecurityBlob
->
UserName
.
Length
=
0
;
SecurityBlob
->
UserName
.
MaximumLength
=
0
;
}
else
{
__u16
len
=
cifs_strtoUCS
((
__le16
*
)
bcc_ptr
,
user
,
64
,
__u16
ln
=
cifs_strtoUCS
((
__le16
*
)
bcc_ptr
,
user
,
64
,
nls_codepage
);
l
e
n
*=
2
;
ln
*=
2
;
SecurityBlob
->
UserName
.
MaximumLength
=
cpu_to_le16
(
l
e
n
);
cpu_to_le16
(
ln
);
SecurityBlob
->
UserName
.
Buffer
=
cpu_to_le32
(
SecurityBlobLength
);
bcc_ptr
+=
len
;
SecurityBlobLength
+=
len
;
SecurityBlob
->
UserName
.
Length
=
cpu_to_le16
(
len
);
bcc_ptr
+=
ln
;
SecurityBlobLength
+=
ln
;
SecurityBlob
->
UserName
.
Length
=
cpu_to_le16
(
ln
);
}
/* SecurityBlob->WorkstationName.Length =
...
...
@@ -3045,33 +3041,32 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
SecurityBlob
->
DomainName
.
Length
=
0
;
SecurityBlob
->
DomainName
.
MaximumLength
=
0
;
}
else
{
__u16
l
e
n
;
__u16
ln
;
negotiate_flags
|=
NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED
;
strncpy
(
bcc_ptr
,
domain
,
63
);
l
e
n
=
strnlen
(
domain
,
64
);
ln
=
strnlen
(
domain
,
64
);
SecurityBlob
->
DomainName
.
MaximumLength
=
cpu_to_le16
(
l
e
n
);
cpu_to_le16
(
ln
);
SecurityBlob
->
DomainName
.
Buffer
=
cpu_to_le32
(
SecurityBlobLength
);
bcc_ptr
+=
l
e
n
;
SecurityBlobLength
+=
l
e
n
;
SecurityBlob
->
DomainName
.
Length
=
cpu_to_le16
(
l
e
n
);
bcc_ptr
+=
ln
;
SecurityBlobLength
+=
ln
;
SecurityBlob
->
DomainName
.
Length
=
cpu_to_le16
(
ln
);
}
if
(
user
==
NULL
)
{
SecurityBlob
->
UserName
.
Buffer
=
0
;
SecurityBlob
->
UserName
.
Length
=
0
;
SecurityBlob
->
UserName
.
MaximumLength
=
0
;
}
else
{
__u16
l
e
n
;
__u16
ln
;
strncpy
(
bcc_ptr
,
user
,
63
);
len
=
strnlen
(
user
,
64
);
SecurityBlob
->
UserName
.
MaximumLength
=
cpu_to_le16
(
len
);
ln
=
strnlen
(
user
,
64
);
SecurityBlob
->
UserName
.
MaximumLength
=
cpu_to_le16
(
ln
);
SecurityBlob
->
UserName
.
Buffer
=
cpu_to_le32
(
SecurityBlobLength
);
bcc_ptr
+=
l
e
n
;
SecurityBlobLength
+=
l
e
n
;
SecurityBlob
->
UserName
.
Length
=
cpu_to_le16
(
l
e
n
);
bcc_ptr
+=
ln
;
SecurityBlobLength
+=
ln
;
SecurityBlob
->
UserName
.
Length
=
cpu_to_le16
(
ln
);
}
/* BB fill in our workstation name if known BB */
...
...
@@ -3138,8 +3133,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
}
else
{
remaining_words
=
BCC
(
smb_buffer_response
)
/
2
;
}
len
=
UniStrnlen
((
wchar_t
*
)
bcc_ptr
,
remaining_words
-
1
);
len
=
UniStrnlen
((
wchar_t
*
)
bcc_ptr
,
remaining_words
-
1
);
/* We look for obvious messed up bcc or strings in response so we do not go off
the end since (at least) WIN2K and Windows XP have a major bug in not null
terminating last Unicode string in response */
...
...
@@ -3223,7 +3218,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
<=
BCC
(
smb_buffer_response
))
{
if
(
ses
->
serverOS
)
kfree
(
ses
->
serverOS
);
ses
->
serverOS
=
kzalloc
(
len
+
1
,
GFP_KERNEL
);
ses
->
serverOS
=
kzalloc
(
len
+
1
,
GFP_KERNEL
);
strncpy
(
ses
->
serverOS
,
bcc_ptr
,
len
);
bcc_ptr
+=
len
;
...
...
fs/cifs/dir.c
浏览文件 @
77159b4d
...
...
@@ -397,7 +397,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
/* BB Do not bother to decode buf since no
local inode yet to put timestamps in,
but we can reuse it safely */
int
bytes_written
;
unsigned
int
bytes_written
;
struct
win_dev
*
pdev
;
pdev
=
(
struct
win_dev
*
)
buf
;
if
(
S_ISCHR
(
mode
))
{
...
...
fs/cifs/inode.c
浏览文件 @
77159b4d
...
...
@@ -1478,7 +1478,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
atomic_dec
(
&
open_file
->
wrtPending
);
cFYI
(
1
,
(
"SetFSize for attrs rc = %d"
,
rc
));
if
((
rc
==
-
EINVAL
)
||
(
rc
==
-
EOPNOTSUPP
))
{
int
bytes_written
;
unsigned
int
bytes_written
;
rc
=
CIFSSMBWrite
(
xid
,
pTcon
,
nfid
,
0
,
attrs
->
ia_size
,
&
bytes_written
,
NULL
,
NULL
,
...
...
@@ -1511,7 +1511,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
if
(
rc
==
0
)
{
int
bytes_written
;
unsigned
int
bytes_written
;
rc
=
CIFSSMBWrite
(
xid
,
pTcon
,
netfid
,
0
,
attrs
->
ia_size
,
...
...
fs/cifs/link.c
浏览文件 @
77159b4d
...
...
@@ -237,7 +237,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
char
*
tmp_path
=
NULL
;
char
*
tmpbuffer
;
unsigned
char
*
referrals
=
NULL
;
int
num_referrals
=
0
;
unsigned
int
num_referrals
=
0
;
int
len
;
__u16
fid
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录