aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exportfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:22 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:22 -0500
commit745ca2475a6ac596e3d8d37c2759c0fbe2586227 (patch)
treef87c34bdfbc8542477b16a014bbb4e3b415b286a /fs/exportfs
parent88e67f3b8898c5ea81d2916dd5b8bc9c0c35ba13 (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/exportfs')
-rw-r--r--fs/exportfs/expfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 80246bad1b7f..ec1fb918200f 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/mount.h> 15#include <linux/mount.h>
16#include <linux/namei.h> 16#include <linux/namei.h>
17#include <linux/sched.h>
17 18
18#define dprintk(fmt, args...) do{}while(0) 19#define dprintk(fmt, args...) do{}while(0)
19 20
@@ -249,6 +250,7 @@ static int filldir_one(void * __buf, const char * name, int len,
249static int get_name(struct vfsmount *mnt, struct dentry *dentry, 250static int get_name(struct vfsmount *mnt, struct dentry *dentry,
250 char *name, struct dentry *child) 251 char *name, struct dentry *child)
251{ 252{
253 const struct cred *cred = current_cred();
252 struct inode *dir = dentry->d_inode; 254 struct inode *dir = dentry->d_inode;
253 int error; 255 int error;
254 struct file *file; 256 struct file *file;
@@ -263,7 +265,7 @@ static int get_name(struct vfsmount *mnt, struct dentry *dentry,
263 /* 265 /*
264 * Open the directory ... 266 * Open the directory ...
265 */ 267 */
266 file = dentry_open(dget(dentry), mntget(mnt), O_RDONLY); 268 file = dentry_open(dget(dentry), mntget(mnt), O_RDONLY, cred);
267 error = PTR_ERR(file); 269 error = PTR_ERR(file);
268 if (IS_ERR(file)) 270 if (IS_ERR(file))
269 goto out; 271 goto out;