Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d12fd121
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d12fd121
编写于
10月 03, 2007
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Cleanup formatting
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
d0d66c44
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
46 deletion
+51
-46
fs/cifs/cifsacl.c
fs/cifs/cifsacl.c
+39
-39
fs/cifs/xattr.c
fs/cifs/xattr.c
+12
-7
未找到文件。
fs/cifs/cifsacl.c
浏览文件 @
d12fd121
...
...
@@ -30,12 +30,12 @@
/* security id for everyone */
static
const
struct
cifs_sid
sid_everyone
=
{
1
,
1
,
{
0
,
0
,
0
,
0
,
0
,
0
},
{}};
{
1
,
1
,
{
0
,
0
,
0
,
0
,
0
,
0
},
{}
};
/* group users */
static
const
struct
cifs_sid
sid_user
=
{
1
,
2
,
{
0
,
0
,
0
,
0
,
0
,
5
},
{}};
{
1
,
2
,
{
0
,
0
,
0
,
0
,
0
,
5
},
{}
};
static
void
parse_ace
(
struct
cifs_ace
*
pace
,
char
*
end_of_acl
)
static
void
parse_ace
(
struct
cifs_ace
*
pace
,
char
*
end_of_acl
)
{
int
i
;
int
num_subauth
;
...
...
@@ -50,27 +50,27 @@ static void parse_ace(struct cifs_ace * pace, char * end_of_acl)
num_subauth
=
cpu_to_le32
(
pace
->
num_subauth
);
if
(
num_subauth
)
{
psub_auth
=
(
__u32
*
)((
char
*
)
pace
+
sizeof
(
struct
cifs_ace
));
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,
(
"ACE revision %d num_subauth %d"
,
pace
->
revision
,
pace
->
num_subauth
));
for
(
i
=
0
;
i
<
num_subauth
;
++
i
)
{
cFYI
(
1
,
(
"ACE sub_auth[%d]: 0x%x"
,
i
,
le32_to_cpu
(
psub_auth
[
i
])));
}
/* BB add length check to make sure that we do not have huge
num auths and therefore go off the end */
cFYI
(
1
,
(
"RID %d"
,
le32_to_cpu
(
psub_auth
[
num_subauth
-
1
])));
#endif
}
return
;
}
static
void
parse_ntace
(
struct
cifs_ntace
*
pntace
,
char
*
end_of_acl
)
{
/* validate that we do not go past end of acl */
#ifdef CONFIG_CIFS_DEBUG2
cFYI
(
1
,
(
"ACE revision %d num_subauth %d"
,
pace
->
revision
,
pace
->
num_subauth
));
for
(
i
=
0
;
i
<
num_subauth
;
++
i
)
{
cFYI
(
1
,
(
"ACE sub_auth[%d]: 0x%x"
,
i
,
le32_to_cpu
(
psub_auth
[
i
])));
}
/* BB add length check to make sure that we do not have huge
num auths and therefore go off the end */
cFYI
(
1
,
(
"RID %d"
,
le32_to_cpu
(
psub_auth
[
num_subauth
-
1
])));
#endif
}
return
;
}
static
void
parse_ntace
(
struct
cifs_ntace
*
pntace
,
char
*
end_of_acl
)
{
/* validate that we do not go past end of acl */
if
(
end_of_acl
<
(
char
*
)
pntace
+
sizeof
(
struct
cifs_ntace
))
{
cERROR
(
1
,
(
"ACL too small to parse NT ACE"
));
return
;
...
...
@@ -86,7 +86,7 @@ static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl)
static
void
parse_dacl
(
struct
cifs_acl
*
pdacl
,
char
*
end_of_acl
)
static
void
parse_dacl
(
struct
cifs_acl
*
pdacl
,
char
*
end_of_acl
)
{
int
i
;
int
num_aces
=
0
;
...
...
@@ -118,11 +118,11 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl)
ppace
=
kmalloc
(
num_aces
*
sizeof
(
struct
cifs_ace
*
),
GFP_KERNEL
);
/*
cifscred->cecount = pdacl->num_aces;
cifscred->ntaces = kmalloc(num_aces *
sizeof(struct cifs_ntace *), GFP_KERNEL);
cifscred->aces = kmalloc(num_aces *
sizeof(struct cifs_ace *), GFP_KERNEL);*/
/*
cifscred->cecount = pdacl->num_aces;
cifscred->ntaces = kmalloc(num_aces *
sizeof(struct cifs_ntace *), GFP_KERNEL);
cifscred->aces = kmalloc(num_aces *
sizeof(struct cifs_ace *), GFP_KERNEL);*/
for
(
i
=
0
;
i
<
num_aces
;
++
i
)
{
...
...
@@ -134,12 +134,12 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl)
parse_ntace
(
ppntace
[
i
],
end_of_acl
);
parse_ace
(
ppace
[
i
],
end_of_acl
);
/*
memcpy((void *)(&(cifscred->ntaces[i])),
(void *)ppntace[i],
sizeof(struct cifs_ntace));
memcpy((void *)(&(cifscred->aces[i])),
(void *)ppace[i],
sizeof(struct cifs_ace)); */
/*
memcpy((void *)(&(cifscred->ntaces[i])),
(void *)ppntace[i],
sizeof(struct cifs_ntace));
memcpy((void *)(&(cifscred->aces[i])),
(void *)ppace[i],
sizeof(struct cifs_ace)); */
acl_base
=
(
char
*
)
ppntace
[
i
];
acl_size
=
cpu_to_le32
(
ppntace
[
i
]
->
size
);
...
...
@@ -176,12 +176,12 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
for
(
i
=
0
;
i
<
num_subauth
;
++
i
)
{
cFYI
(
1
,
(
"SID sub_auth[%d]: 0x%x "
,
i
,
le32_to_cpu
(
psub_auth
[
i
])));
le32_to_cpu
(
psub_auth
[
i
])));
}
/* BB add length check to make sure that we do not have huge
/* BB add length check to make sure that we do not have huge
num auths and therefore go off the end */
cFYI
(
1
,
(
"RID 0x%x"
,
cFYI
(
1
,
(
"RID 0x%x"
,
le32_to_cpu
(
psid
->
sub_auth
[
psid
->
num_subauth
])));
#endif
}
...
...
fs/cifs/xattr.c
浏览文件 @
d12fd121
...
...
@@ -261,21 +261,26 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
cifs_sb
->
local_nls
,
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
/* else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
#ifdef CONFIG_CIFS_EXPERIMENTAL
else
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_CIFS_ACL
)
{
__u16
fid
;
int
oplock
=
FALSE
;
rc = CIFSSMBOpen(xid, pTcon, full_path,
FILE_OPEN, GENERIC_READ, 0, &fid,
&oplock, NULL, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
if
(
experimEnabled
)
rc
=
CIFSSMBOpen
(
xid
,
pTcon
,
full_path
,
FILE_OPEN
,
GENERIC_READ
,
0
,
&
fid
,
&
oplock
,
NULL
,
cifs_sb
->
local_nls
,
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
/* else rc is EOPNOTSUPP from above */
if
(
rc
==
0
)
{
rc
=
CIFSSMBGetCIFSACL
(
xid
,
pTcon
,
fid
,
ea_value
,
buf_size
,
ACL_TYPE_ACCESS
);
CIFSSMBClose
(
xid
,
pTcon
,
fid
);
}
} */
/* BB enable after fixing up return data */
}
#endif
/* EXPERIMENTAL */
#else
cFYI
(
1
,
(
"query POSIX ACL not supported yet"
));
#endif
/* CONFIG_CIFS_POSIX */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录