]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/selinux/hooks.c
[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
[net-next-2.6.git] / security / selinux / hooks.c
index 524915dfda646302c3d76049f844fdd534c49001..093efba4d9b6aa73ad7561f62aa8aac810a35cd6 100644 (file)
@@ -1903,13 +1903,13 @@ static int selinux_sb_kern_mount(struct super_block *sb, void *data)
        return superblock_has_perm(current, sb, FILESYSTEM__MOUNT, &ad);
 }
 
-static int selinux_sb_statfs(struct super_block *sb)
+static int selinux_sb_statfs(struct dentry *dentry)
 {
        struct avc_audit_data ad;
 
        AVC_AUDIT_DATA_INIT(&ad,FS);
-       ad.u.fs.dentry = sb->s_root;
-       return superblock_has_perm(current, sb, FILESYSTEM__GETATTR, &ad);
+       ad.u.fs.dentry = dentry->d_sb->s_root;
+       return superblock_has_perm(current, dentry->d_sb, FILESYSTEM__GETATTR, &ad);
 }
 
 static int selinux_mount(char * dev_name,