~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/fix-rename-file-type.diff

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: b/security/apparmor/lsm.c
 
2
===================================================================
 
3
--- a/security/apparmor/lsm.c
 
4
+++ b/security/apparmor/lsm.c
 
5
@@ -260,7 +260,8 @@ static int aa_permission(struct inode *i
 
6
 
 
7
                profile = aa_get_profile(current);
 
8
                if (profile) {
 
9
-                       if (inode && S_ISDIR(inode->i_mode))
 
10
+                       struct inode *d_inode = dentry->d_inode;
 
11
+                       if (d_inode && S_ISDIR(d_inode->i_mode))
 
12
                                check |= AA_CHECK_DIR;
 
13
                        error = aa_perm(profile, dentry, mnt, mask, check);
 
14
                }