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 /fs/xfs | |
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 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 67c72aec97e6..281cbd5a25cf 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -256,6 +256,7 @@ xfs_open_by_handle( | |||
256 | struct file *parfilp, | 256 | struct file *parfilp, |
257 | struct inode *parinode) | 257 | struct inode *parinode) |
258 | { | 258 | { |
259 | const struct cred *cred = current_cred(); | ||
259 | int error; | 260 | int error; |
260 | int new_fd; | 261 | int new_fd; |
261 | int permflag; | 262 | int permflag; |
@@ -321,7 +322,7 @@ xfs_open_by_handle( | |||
321 | mntget(parfilp->f_path.mnt); | 322 | mntget(parfilp->f_path.mnt); |
322 | 323 | ||
323 | /* Create file pointer. */ | 324 | /* Create file pointer. */ |
324 | filp = dentry_open(dentry, parfilp->f_path.mnt, hreq.oflags); | 325 | filp = dentry_open(dentry, parfilp->f_path.mnt, hreq.oflags, cred); |
325 | if (IS_ERR(filp)) { | 326 | if (IS_ERR(filp)) { |
326 | put_unused_fd(new_fd); | 327 | put_unused_fd(new_fd); |
327 | return -XFS_ERROR(-PTR_ERR(filp)); | 328 | return -XFS_ERROR(-PTR_ERR(filp)); |