diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:22 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:22 -0500 |
commit | 745ca2475a6ac596e3d8d37c2759c0fbe2586227 (patch) | |
tree | f87c34bdfbc8542477b16a014bbb4e3b415b286a /arch | |
parent | 88e67f3b8898c5ea81d2916dd5b8bc9c0c35ba13 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 4 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index e128ce7f0993..6296bfd9cb0b 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -323,7 +323,7 @@ static int spufs_context_open(struct dentry *dentry, struct vfsmount *mnt) | |||
323 | goto out; | 323 | goto out; |
324 | } | 324 | } |
325 | 325 | ||
326 | filp = dentry_open(dentry, mnt, O_RDONLY); | 326 | filp = dentry_open(dentry, mnt, O_RDONLY, current_cred()); |
327 | if (IS_ERR(filp)) { | 327 | if (IS_ERR(filp)) { |
328 | put_unused_fd(ret); | 328 | put_unused_fd(ret); |
329 | ret = PTR_ERR(filp); | 329 | ret = PTR_ERR(filp); |
@@ -562,7 +562,7 @@ static int spufs_gang_open(struct dentry *dentry, struct vfsmount *mnt) | |||
562 | goto out; | 562 | goto out; |
563 | } | 563 | } |
564 | 564 | ||
565 | filp = dentry_open(dentry, mnt, O_RDONLY); | 565 | filp = dentry_open(dentry, mnt, O_RDONLY, current_cred()); |
566 | if (IS_ERR(filp)) { | 566 | if (IS_ERR(filp)) { |
567 | put_unused_fd(ret); | 567 | put_unused_fd(ret); |
568 | ret = PTR_ERR(filp); | 568 | ret = PTR_ERR(filp); |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 19d579d74d27..16d3b3789a50 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -159,7 +159,8 @@ void mconsole_proc(struct mc_request *req) | |||
159 | goto out_kill; | 159 | goto out_kill; |
160 | } | 160 | } |
161 | 161 | ||
162 | file = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY); | 162 | file = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY, |
163 | current_cred()); | ||
163 | if (IS_ERR(file)) { | 164 | if (IS_ERR(file)) { |
164 | mconsole_reply(req, "Failed to open file", 1, 0); | 165 | mconsole_reply(req, "Failed to open file", 1, 0); |
165 | goto out_kill; | 166 | goto out_kill; |