mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
88e67f3b88
commit
745ca2475a
19 changed files with 67 additions and 40 deletions
|
|
@ -41,7 +41,8 @@ static struct file *do_open(char *name, int flags)
|
|||
error = may_open(&nd, MAY_WRITE, FMODE_WRITE);
|
||||
|
||||
if (!error)
|
||||
return dentry_open(nd.path.dentry, nd.path.mnt, flags);
|
||||
return dentry_open(nd.path.dentry, nd.path.mnt, flags,
|
||||
current_cred());
|
||||
|
||||
path_put(&nd.path);
|
||||
return ERR_PTR(error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue