Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
16525e3f
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看板
提交
16525e3f
编写于
2月 07, 2012
作者:
E
Eric W. Biederman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
userns: Convert hfsplus to use kuid and kgid where appropriate
Signed-off-by:
N
Eric W. Biederman
<
ebiederm@xmission.com
>
上级
43b5e4cc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
12 deletion
+20
-12
fs/hfsplus/catalog.c
fs/hfsplus/catalog.c
+2
-2
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/hfsplus_fs.h
+2
-2
fs/hfsplus/inode.c
fs/hfsplus/inode.c
+4
-4
fs/hfsplus/options.c
fs/hfsplus/options.c
+12
-3
init/Kconfig
init/Kconfig
+0
-1
未找到文件。
fs/hfsplus/catalog.c
浏览文件 @
16525e3f
...
...
@@ -80,8 +80,8 @@ void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms)
perms
->
userflags
=
HFSPLUS_I
(
inode
)
->
userflags
;
perms
->
mode
=
cpu_to_be16
(
inode
->
i_mode
);
perms
->
owner
=
cpu_to_be32
(
i
node
->
i_uid
);
perms
->
group
=
cpu_to_be32
(
i
node
->
i_gid
);
perms
->
owner
=
cpu_to_be32
(
i
_uid_read
(
inode
)
);
perms
->
group
=
cpu_to_be32
(
i
_gid_read
(
inode
)
);
if
(
S_ISREG
(
inode
->
i_mode
))
perms
->
dev
=
cpu_to_be32
(
inode
->
i_nlink
);
...
...
fs/hfsplus/hfsplus_fs.h
浏览文件 @
16525e3f
...
...
@@ -149,8 +149,8 @@ struct hfsplus_sb_info {
u32
type
;
umode_t
umask
;
uid_t
uid
;
gid_t
gid
;
k
uid_t
uid
;
k
gid_t
gid
;
int
part
,
session
;
unsigned
long
flags
;
...
...
fs/hfsplus/inode.c
浏览文件 @
16525e3f
...
...
@@ -233,12 +233,12 @@ static void hfsplus_get_perms(struct inode *inode,
mode
=
be16_to_cpu
(
perms
->
mode
);
i
node
->
i_uid
=
be32_to_cpu
(
perms
->
owner
);
if
(
!
i
node
->
i_uid
&&
!
mode
)
i
_uid_write
(
inode
,
be32_to_cpu
(
perms
->
owner
)
);
if
(
!
i
_uid_read
(
inode
)
&&
!
mode
)
inode
->
i_uid
=
sbi
->
uid
;
i
node
->
i_gid
=
be32_to_cpu
(
perms
->
group
);
if
(
!
i
node
->
i_gid
&&
!
mode
)
i
_gid_write
(
inode
,
be32_to_cpu
(
perms
->
group
)
);
if
(
!
i
_gid_read
(
inode
)
&&
!
mode
)
inode
->
i_gid
=
sbi
->
gid
;
if
(
dir
)
{
...
...
fs/hfsplus/options.c
浏览文件 @
16525e3f
...
...
@@ -135,14 +135,22 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
printk
(
KERN_ERR
"hfs: uid requires an argument
\n
"
);
return
0
;
}
sbi
->
uid
=
(
uid_t
)
tmp
;
sbi
->
uid
=
make_kuid
(
current_user_ns
(),
(
uid_t
)
tmp
);
if
(
!
uid_valid
(
sbi
->
uid
))
{
printk
(
KERN_ERR
"hfs: invalid uid specified
\n
"
);
return
0
;
}
break
;
case
opt_gid
:
if
(
match_int
(
&
args
[
0
],
&
tmp
))
{
printk
(
KERN_ERR
"hfs: gid requires an argument
\n
"
);
return
0
;
}
sbi
->
gid
=
(
gid_t
)
tmp
;
sbi
->
gid
=
make_kgid
(
current_user_ns
(),
(
gid_t
)
tmp
);
if
(
!
gid_valid
(
sbi
->
gid
))
{
printk
(
KERN_ERR
"hfs: invalid gid specified
\n
"
);
return
0
;
}
break
;
case
opt_part
:
if
(
match_int
(
&
args
[
0
],
&
sbi
->
part
))
{
...
...
@@ -215,7 +223,8 @@ int hfsplus_show_options(struct seq_file *seq, struct dentry *root)
if
(
sbi
->
type
!=
HFSPLUS_DEF_CR_TYPE
)
seq_printf
(
seq
,
",type=%.4s"
,
(
char
*
)
&
sbi
->
type
);
seq_printf
(
seq
,
",umask=%o,uid=%u,gid=%u"
,
sbi
->
umask
,
sbi
->
uid
,
sbi
->
gid
);
from_kuid_munged
(
&
init_user_ns
,
sbi
->
uid
),
from_kgid_munged
(
&
init_user_ns
,
sbi
->
gid
));
if
(
sbi
->
part
>=
0
)
seq_printf
(
seq
,
",part=%u"
,
sbi
->
part
);
if
(
sbi
->
session
>=
0
)
...
...
init/Kconfig
浏览文件 @
16525e3f
...
...
@@ -943,7 +943,6 @@ config UIDGID_CONVERTED
depends on CODA_FS = n
depends on FUSE_FS = n
depends on GFS2_FS = n
depends on HFSPLUS_FS = n
depends on HPFS_FS = n
depends on ISO9660_FS = n
depends on JFFS2_FS = n
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录