CRED: Pass credentials through dentry_open()
Pass credentials through dentry_open() so that the COW creds patch can have SELinux's flush_unauthorized_files() pass the appropriate creds back to itself when it opens its null chardev. The security_dentry_open() call also now takes a creds pointer, as does the dentry_open hook in struct security_operations. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:

committed by
James Morris

parent
88e67f3b88
commit
745ca2475a
@@ -1402,7 +1402,7 @@ struct security_operations {
|
||||
int (*file_send_sigiotask) (struct task_struct *tsk,
|
||||
struct fown_struct *fown, int sig);
|
||||
int (*file_receive) (struct file *file);
|
||||
int (*dentry_open) (struct file *file);
|
||||
int (*dentry_open) (struct file *file, const struct cred *cred);
|
||||
|
||||
int (*task_create) (unsigned long clone_flags);
|
||||
int (*cred_alloc_security) (struct cred *cred);
|
||||
@@ -1658,7 +1658,7 @@ int security_file_set_fowner(struct file *file);
|
||||
int security_file_send_sigiotask(struct task_struct *tsk,
|
||||
struct fown_struct *fown, int sig);
|
||||
int security_file_receive(struct file *file);
|
||||
int security_dentry_open(struct file *file);
|
||||
int security_dentry_open(struct file *file, const struct cred *cred);
|
||||
int security_task_create(unsigned long clone_flags);
|
||||
int security_cred_alloc(struct cred *cred);
|
||||
void security_cred_free(struct cred *cred);
|
||||
@@ -2171,7 +2171,8 @@ static inline int security_file_receive(struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_dentry_open(struct file *file)
|
||||
static inline int security_dentry_open(struct file *file,
|
||||
const struct cred *cred)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user