Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0747fdb2
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看板
提交
0747fdb2
编写于
11年前
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ecryptfs: switch ecryptfs_decode_and_decrypt_filename() from dentry to sb
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
cb5e05d1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
10 deletion
+8
-10
fs/ecryptfs/crypto.c
fs/ecryptfs/crypto.c
+2
-3
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/ecryptfs_kernel.h
+1
-1
fs/ecryptfs/file.c
fs/ecryptfs/file.c
+4
-5
fs/ecryptfs/inode.c
fs/ecryptfs/inode.c
+1
-1
未找到文件。
fs/ecryptfs/crypto.c
浏览文件 @
0747fdb2
...
...
@@ -2243,12 +2243,11 @@ int ecryptfs_encrypt_and_encode_filename(
*/
int
ecryptfs_decode_and_decrypt_filename
(
char
**
plaintext_name
,
size_t
*
plaintext_name_size
,
struct
dentry
*
ecryptfs_dir_dentry
,
struct
super_block
*
sb
,
const
char
*
name
,
size_t
name_size
)
{
struct
ecryptfs_mount_crypt_stat
*
mount_crypt_stat
=
&
ecryptfs_superblock_to_private
(
ecryptfs_dir_dentry
->
d_sb
)
->
mount_crypt_stat
;
&
ecryptfs_superblock_to_private
(
sb
)
->
mount_crypt_stat
;
char
*
decoded_name
;
size_t
decoded_name_size
;
size_t
packet_size
;
...
...
This diff is collapsed.
Click to expand it.
fs/ecryptfs/ecryptfs_kernel.h
浏览文件 @
0747fdb2
...
...
@@ -575,7 +575,7 @@ int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
struct
inode
*
ecryptfs_inode
);
int
ecryptfs_decode_and_decrypt_filename
(
char
**
decrypted_name
,
size_t
*
decrypted_name_size
,
struct
dentry
*
ecryptfs_dentry
,
struct
super_block
*
sb
,
const
char
*
name
,
size_t
name_size
);
int
ecryptfs_fill_zeros
(
struct
file
*
file
,
loff_t
new_length
);
int
ecryptfs_encrypt_and_encode_filename
(
...
...
This diff is collapsed.
Click to expand it.
fs/ecryptfs/file.c
浏览文件 @
0747fdb2
...
...
@@ -70,7 +70,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
struct
ecryptfs_getdents_callback
{
struct
dir_context
ctx
;
struct
dir_context
*
caller
;
struct
dentry
*
dentry
;
struct
super_block
*
sb
;
int
filldir_called
;
int
entries_written
;
};
...
...
@@ -88,7 +88,7 @@ ecryptfs_filldir(void *dirent, const char *lower_name, int lower_namelen,
buf
->
filldir_called
++
;
rc
=
ecryptfs_decode_and_decrypt_filename
(
&
name
,
&
name_size
,
buf
->
dentry
,
lower_name
,
buf
->
sb
,
lower_name
,
lower_namelen
);
if
(
rc
)
{
printk
(
KERN_ERR
"%s: Error attempting to decode and decrypt "
...
...
@@ -114,15 +114,14 @@ static int ecryptfs_readdir(struct file *file, struct dir_context *ctx)
{
int
rc
;
struct
file
*
lower_file
;
struct
inode
*
inode
;
struct
inode
*
inode
=
file_inode
(
file
)
;
struct
ecryptfs_getdents_callback
buf
=
{
.
ctx
.
actor
=
ecryptfs_filldir
,
.
caller
=
ctx
,
.
dentry
=
file
->
f_path
.
dentry
.
sb
=
inode
->
i_sb
,
};
lower_file
=
ecryptfs_file_to_lower
(
file
);
lower_file
->
f_pos
=
ctx
->
pos
;
inode
=
file_inode
(
file
);
rc
=
iterate_dir
(
lower_file
,
&
buf
.
ctx
);
ctx
->
pos
=
buf
.
ctx
.
pos
;
if
(
rc
<
0
)
...
...
This diff is collapsed.
Click to expand it.
fs/ecryptfs/inode.c
浏览文件 @
0747fdb2
...
...
@@ -679,7 +679,7 @@ static int ecryptfs_readlink_lower(struct dentry *dentry, char **buf,
set_fs
(
old_fs
);
if
(
rc
<
0
)
goto
out
;
rc
=
ecryptfs_decode_and_decrypt_filename
(
buf
,
bufsiz
,
dentry
,
rc
=
ecryptfs_decode_and_decrypt_filename
(
buf
,
bufsiz
,
dentry
->
d_sb
,
lower_buf
,
rc
);
out:
kfree
(
lower_buf
);
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录