Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ef571cad
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
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看板
提交
ef571cad
编写于
7月 24, 2008
作者:
S
Shirish Pargaonkar
提交者:
Steve French
7月 24, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Fix warnings from checkpatch
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
b1910ad6
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
31 addition
and
33 deletion
+31
-33
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+2
-2
fs/cifs/cifsacl.c
fs/cifs/cifsacl.c
+19
-19
fs/cifs/cifsencrypt.c
fs/cifs/cifsencrypt.c
+1
-2
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+3
-3
fs/cifs/cifspdu.h
fs/cifs/cifspdu.h
+4
-4
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+2
-3
未找到文件。
fs/cifs/cifs_debug.c
浏览文件 @
ef571cad
...
...
@@ -208,10 +208,10 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
seq_puts
(
m
,
" type: CDROM "
);
else
seq_printf
(
m
,
" type: %d "
,
dev_type
);
if
(
tcon
->
tidStatus
==
CifsNeedReconnect
)
{
if
(
tcon
->
tidStatus
==
CifsNeedReconnect
)
seq_puts
(
m
,
"
\t
DISCONNECTED "
);
}
}
read_unlock
(
&
GlobalSMBSeslock
);
seq_putc
(
m
,
'\n'
);
...
...
fs/cifs/cifsacl.c
浏览文件 @
ef571cad
...
...
@@ -56,7 +56,7 @@ int match_sid(struct cifs_sid *ctsid)
struct
cifs_sid
*
cwsid
;
if
(
!
ctsid
)
return
(
-
1
)
;
return
-
1
;
for
(
i
=
0
;
i
<
NUM_WK_SIDS
;
++
i
)
{
cwsid
=
&
(
wksidarr
[
i
].
cifssid
);
...
...
@@ -87,11 +87,11 @@ int match_sid(struct cifs_sid *ctsid)
}
cFYI
(
1
,
(
"matching sid: %s
\n
"
,
wksidarr
[
i
].
sidname
));
return
(
0
)
;
/* sids compare/match */
return
0
;
/* sids compare/match */
}
cFYI
(
1
,
(
"No matching sid"
));
return
(
-
1
)
;
return
-
1
;
}
/* if the two SIDs (roughly equivalent to a UUID for a user or group) are
...
...
@@ -102,16 +102,16 @@ int compare_sids(const struct cifs_sid *ctsid, const struct cifs_sid *cwsid)
int
num_subauth
,
num_sat
,
num_saw
;
if
((
!
ctsid
)
||
(
!
cwsid
))
return
(
0
)
;
return
0
;
/* compare the revision */
if
(
ctsid
->
revision
!=
cwsid
->
revision
)
return
(
0
)
;
return
0
;
/* compare all of the six auth values */
for
(
i
=
0
;
i
<
6
;
++
i
)
{
if
(
ctsid
->
authority
[
i
]
!=
cwsid
->
authority
[
i
])
return
(
0
)
;
return
0
;
}
/* compare all of the subauth values if any */
...
...
@@ -121,11 +121,11 @@ int compare_sids(const struct cifs_sid *ctsid, const struct cifs_sid *cwsid)
if
(
num_subauth
)
{
for
(
i
=
0
;
i
<
num_subauth
;
++
i
)
{
if
(
ctsid
->
sub_auth
[
i
]
!=
cwsid
->
sub_auth
[
i
])
return
(
0
)
;
return
0
;
}
}
return
(
1
)
;
/* sids compare/match */
return
1
;
/* sids compare/match */
}
...
...
@@ -284,7 +284,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
size
=
1
+
1
+
2
+
4
+
1
+
1
+
6
+
(
psid
->
num_subauth
*
4
);
pntace
->
size
=
cpu_to_le16
(
size
);
return
(
size
)
;
return
size
;
}
...
...
@@ -425,7 +425,7 @@ static int set_chmod_dacl(struct cifs_acl *pndacl, struct cifs_sid *pownersid,
pndacl
->
size
=
cpu_to_le16
(
size
+
sizeof
(
struct
cifs_acl
));
pndacl
->
num_aces
=
cpu_to_le32
(
3
);
return
(
0
)
;
return
0
;
}
...
...
@@ -509,7 +509,7 @@ static int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len,
sizeof(struct cifs_sid)); */
return
(
0
)
;
return
0
;
}
...
...
@@ -526,7 +526,7 @@ static int build_sec_desc(struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
struct
cifs_acl
*
ndacl_ptr
=
NULL
;
/* no need for SACL ptr */
if
((
inode
==
NULL
)
||
(
pntsd
==
NULL
)
||
(
pnntsd
==
NULL
))
return
(
-
EIO
)
;
return
-
EIO
;
owner_sid_ptr
=
(
struct
cifs_sid
*
)((
char
*
)
pntsd
+
le32_to_cpu
(
pntsd
->
osidoffset
));
...
...
@@ -549,7 +549,7 @@ static int build_sec_desc(struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
/* copy security descriptor control portion and owner and group sid */
copy_sec_desc
(
pntsd
,
pnntsd
,
sidsoffset
);
return
(
rc
)
;
return
rc
;
}
...
...
@@ -628,11 +628,11 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
cFYI
(
DBG2
,
(
"set ACL for %s from mode 0x%x"
,
path
,
inode
->
i_mode
));
if
(
!
inode
)
return
(
rc
)
;
return
rc
;
sb
=
inode
->
i_sb
;
if
(
sb
==
NULL
)
return
(
rc
)
;
return
rc
;
cifs_sb
=
CIFS_SB
(
sb
);
xid
=
GetXid
();
...
...
@@ -651,7 +651,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
if
(
rc
!=
0
)
{
cERROR
(
1
,
(
"Unable to open file to set ACL"
));
FreeXid
(
xid
);
return
(
rc
)
;
return
rc
;
}
}
...
...
@@ -664,7 +664,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
FreeXid
(
xid
);
return
(
rc
)
;
return
rc
;
}
/* Translate the CIFS ACL (simlar to NTFS ACL) for a file into mode bits */
...
...
@@ -714,7 +714,7 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode)
if
(
!
pnntsd
)
{
cERROR
(
1
,
(
"Unable to allocate security descriptor"
));
kfree
(
pntsd
);
return
(
-
ENOMEM
)
;
return
-
ENOMEM
;
}
rc
=
build_sec_desc
(
pntsd
,
pnntsd
,
inode
,
nmode
);
...
...
@@ -731,6 +731,6 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode)
kfree
(
pntsd
);
}
return
(
rc
)
;
return
rc
;
}
#endif
/* CONFIG_CIFS_EXPERIMENTAL */
fs/cifs/cifsencrypt.c
浏览文件 @
ef571cad
...
...
@@ -310,9 +310,8 @@ void calc_lanman_hash(struct cifsSesInfo *ses, char *lnm_session_key)
utf8 and other multibyte codepages each need their own strupper
function since a byte at a time will ont work. */
for
(
i
=
0
;
i
<
CIFS_ENCPWD_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
CIFS_ENCPWD_SIZE
;
i
++
)
password_with_pad
[
i
]
=
toupper
(
password_with_pad
[
i
]);
}
SMBencrypt
(
password_with_pad
,
ses
->
server
->
cryptKey
,
lnm_session_key
);
/* clear password before we return/free memory */
...
...
fs/cifs/cifsglob.h
浏览文件 @
ef571cad
...
...
@@ -27,7 +27,7 @@
#define MAX_SES_INFO 2
#define MAX_TCON_INFO 4
#define MAX_TREE_SIZE
2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1
#define MAX_TREE_SIZE
(2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1)
#define MAX_SERVER_SIZE 15
#define MAX_SHARE_SIZE 64
/* used to be 20, this should still be enough */
#define MAX_USERNAME_SIZE 32
/* 32 is to allow for 15 char names + null
...
...
@@ -537,8 +537,8 @@ require use of the stronger protocol */
#endif
/* WEAK_PW_HASH */
#define CIFSSEC_MUST_SEAL 0x40040
/* not supported yet */
#define CIFSSEC_DEF
CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2
#define CIFSSEC_MAX
CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2
#define CIFSSEC_DEF
(CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2)
#define CIFSSEC_MAX
(CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2)
#define CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_LANMAN | CIFSSEC_MAY_PLNTXT | CIFSSEC_MAY_KRB5)
/*
*****************************************************************
...
...
fs/cifs/cifspdu.h
浏览文件 @
ef571cad
...
...
@@ -31,7 +31,7 @@
#else
#define CIFS_PROT 0
#endif
#define POSIX_PROT
CIFS_PROT+1
#define POSIX_PROT
(CIFS_PROT+1)
#define BAD_PROT 0xFFFF
/* SMB command codes */
...
...
@@ -341,7 +341,7 @@
#define CREATE_COMPLETE_IF_OPLK 0x00000100
/* should be zero */
#define CREATE_NO_EA_KNOWLEDGE 0x00000200
#define CREATE_EIGHT_DOT_THREE 0x00000400
/* doc says this is obsolete
"open for recovery" flag
-
should
"open for recovery" flag should
be zero in any case */
#define CREATE_OPEN_FOR_RECOVERY 0x00000400
#define CREATE_RANDOM_ACCESS 0x00000800
...
...
@@ -414,8 +414,8 @@ struct smb_hdr {
__u8
WordCount
;
}
__attribute__
((
packed
));
/* given a pointer to an smb_hdr retrieve the value of byte count */
#define BCC(smb_var) (
*(__u16 *)((char *)smb_var + sizeof(struct smb_hdr) + (2 * smb_var->WordCount)))
#define BCC_LE(smb_var) (
*(__le16 *)((char *)smb_var + sizeof(struct smb_hdr) + (2 * smb_var->WordCount)))
#define BCC(smb_var) (*(__u16 *)((char *)smb_var + sizeof(struct smb_hdr) + (2 * smb_var->WordCount)))
#define BCC_LE(smb_var) (*(__le16 *)((char *)smb_var + sizeof(struct smb_hdr) + (2 * smb_var->WordCount)))
/* given a pointer to an smb_hdr retrieve the pointer to the byte area */
#define pByteArea(smb_var) ((unsigned char *)smb_var + sizeof(struct smb_hdr) + (2 * smb_var->WordCount) + 2)
...
...
fs/cifs/cifssmb.c
浏览文件 @
ef571cad
...
...
@@ -686,12 +686,11 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
SecurityBlob
,
count
-
16
,
&
server
->
secType
);
if
(
rc
==
1
)
{
if
(
rc
==
1
)
rc
=
0
;
}
else
{
else
rc
=
-
EINVAL
;
}
}
}
else
server
->
capabilities
&=
~
CAP_EXTENDED_SECURITY
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录