]> Pileus Git - ~andy/linux/blobdiff - security/smack/smack_lsm.c
Merge branch 'linus' into tracing/sysprof
[~andy/linux] / security / smack / smack_lsm.c
index fe0ae1bf165069bb8e0e9ea6b485a33558d5dfc7..4a09293efa007329fdc56b39f2dc5dd923d45f42 100644 (file)
@@ -1130,15 +1130,6 @@ static int smack_task_movememory(struct task_struct *p)
 static int smack_task_kill(struct task_struct *p, struct siginfo *info,
                           int sig, u32 secid)
 {
-       /*
-        * Special cases where signals really ought to go through
-        * in spite of policy. Stephen Smalley suggests it may
-        * make sense to change the caller so that it doesn't
-        * bother with the LSM hook in these cases.
-        */
-       if (info != SEND_SIG_NOINFO &&
-           (is_si_special(info) || SI_FROMKERNEL(info)))
-               return 0;
        /*
         * Sending a signal requires that the sender
         * can write the receiver.
@@ -1889,6 +1880,18 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
         */
        final = sbsp->smk_default;
 
+       /*
+        * If this is the root inode the superblock
+        * may be in the process of initialization.
+        * If that is the case use the root value out
+        * of the superblock.
+        */
+       if (opt_dentry->d_parent == opt_dentry) {
+               isp->smk_inode = sbsp->smk_root;
+               isp->smk_flags |= SMK_INODE_INSTANT;
+               goto unlockandout;
+       }
+
        /*
         * This is pretty hackish.
         * Casey says that we shouldn't have to do