提交 e3f20ae2 编写于 作者: A Al Viro

security_file_open(): lose cred argument

Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 ae2bb293
...@@ -776,7 +776,7 @@ static int do_dentry_open(struct file *f, ...@@ -776,7 +776,7 @@ static int do_dentry_open(struct file *f,
goto cleanup_all; goto cleanup_all;
} }
error = security_file_open(f, f->f_cred); error = security_file_open(f);
if (error) if (error)
goto cleanup_all; goto cleanup_all;
......
...@@ -309,7 +309,7 @@ void security_file_set_fowner(struct file *file); ...@@ -309,7 +309,7 @@ void security_file_set_fowner(struct file *file);
int security_file_send_sigiotask(struct task_struct *tsk, int security_file_send_sigiotask(struct task_struct *tsk,
struct fown_struct *fown, int sig); struct fown_struct *fown, int sig);
int security_file_receive(struct file *file); int security_file_receive(struct file *file);
int security_file_open(struct file *file, const struct cred *cred); int security_file_open(struct file *file);
int security_task_alloc(struct task_struct *task, unsigned long clone_flags); int security_task_alloc(struct task_struct *task, unsigned long clone_flags);
void security_task_free(struct task_struct *task); void security_task_free(struct task_struct *task);
int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
...@@ -858,8 +858,7 @@ static inline int security_file_receive(struct file *file) ...@@ -858,8 +858,7 @@ static inline int security_file_receive(struct file *file)
return 0; return 0;
} }
static inline int security_file_open(struct file *file, static inline int security_file_open(struct file *file)
const struct cred *cred)
{ {
return 0; return 0;
} }
......
...@@ -970,11 +970,11 @@ int security_file_receive(struct file *file) ...@@ -970,11 +970,11 @@ int security_file_receive(struct file *file)
return call_int_hook(file_receive, 0, file); return call_int_hook(file_receive, 0, file);
} }
int security_file_open(struct file *file, const struct cred *cred) int security_file_open(struct file *file)
{ {
int ret; int ret;
ret = call_int_hook(file_open, 0, file, cred); ret = call_int_hook(file_open, 0, file, file->f_cred);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册