]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-tomoyo-with-apparmor.patch
- merged from LINUX_2_6
[packages/kernel.git] / kernel-tomoyo-with-apparmor.patch
index 2fe2ac000b1902694c95df8fb5921adc29a8ece3..ebd0b26d3ea3c86e353b1b5e05d68f47ecde3507 100644 (file)
@@ -309,8 +309,8 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                      if (error)
 +                              break;
 +                      /***** TOMOYO Linux end. *****/
-                       error = vfs_mknod(nd.path.dentry->d_inode,dentry,mode,
-                                       new_decode_dev(dev));
+                       error = vfs_mknod(nd.path.dentry->d_inode, dentry,
+                                         nd.path.mnt, mode, new_decode_dev(dev));
                        break;
                case S_IFIFO: case S_IFSOCK:
 +                      /***** TOMOYO Linux start. *****/
@@ -325,9 +325,9 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                      if (error)
 +                              break;
 +                      /***** TOMOYO Linux end. *****/
-                       error = vfs_mknod(nd.path.dentry->d_inode,dentry,mode,0);
+                       error = vfs_mknod(nd.path.dentry->d_inode, dentry,
+                                         nd.path.mnt, mode, 0);
                        break;
-       }
 @@ -2068,6 +2124,13 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
        error = mnt_want_write(nd.path.mnt);
        if (error)
@@ -339,7 +339,7 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                           nd.path.mnt);
 +      if (!error)
 +      /***** TOMOYO Linux end. *****/
-       error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
+       error = vfs_mkdir(nd.path.dentry->d_inode, dentry, nd.path.mnt, mode);
        mnt_drop_write(nd.path.mnt);
  out_dput:
 @@ -2178,6 +2241,13 @@ static long do_rmdir(int dfd, const char
@@ -353,9 +353,9 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                           nd.path.mnt);
 +      if (!error)
 +      /***** TOMOYO Linux end. *****/
-       error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
+       error = vfs_rmdir(nd.path.dentry->d_inode, dentry, nd.path.mnt);
        mnt_drop_write(nd.path.mnt);
- exit3:
+       if (!error && (saved_dev || saved_ino))
 @@ -2239,6 +2309,10 @@ static long do_unlinkat(int dfd, const c
        struct inode *inode = NULL;
        ino_t saved_ino = 0;
@@ -378,9 +378,9 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                                   nd.path.mnt);
 +              if (!error)
 +              /***** TOMOYO Linux end. *****/
-               error = vfs_unlink(nd.path.dentry->d_inode, dentry);
-               mnt_drop_write(nd.path.mnt);
-       exit2:
+               error = vfs_unlink(nd.path.dentry->d_inode, dentry, nd.path.mnt);
+               if (!error && (saved_ino || saved_dev))
+                       gr_handle_delete(saved_ino, saved_dev);
 @@ -2327,6 +2408,10 @@ SYSCALL_DEFINE3(symlinkat, const char __
        char *to;
        struct dentry *dentry;
@@ -403,9 +403,9 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                           nd.path.mnt);
 +      if (!error)
 +      /***** TOMOYO Linux end. *****/
-       error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
-       mnt_drop_write(nd.path.mnt);
- out_dput:
+       error = vfs_symlink(nd.path.dentry->d_inode, dentry, nd.path.mnt, from);
+       if (!error)
+               gr_handle_create(dentry, nd.path.mnt);
 @@ -2420,6 +2512,10 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
  
        if ((flags & ~AT_SYMLINK_FOLLOW) != 0)
@@ -430,9 +430,9 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                           nd.path.mnt);
 +      if (!error)
 +      /***** TOMOYO Linux end. *****/
-       error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
-       mnt_drop_write(nd.path.mnt);
- out_dput:
+       error = vfs_link(old_path.dentry, old_path.mnt,
+                        nd.path.dentry->d_inode,
+                        new_dentry, nd.path.mnt);
 @@ -2616,6 +2721,10 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
        char *from;
        char *to;
@@ -1377,6 +1377,6 @@ Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-
 +                                                 nd.path.mnt);
 +              if (!err)
 +              /***** TOMOYO Linux end. *****/
-               err = vfs_mknod(nd.path.dentry->d_inode, dentry, mode, 0);
+               err = vfs_mknod(nd.path.dentry->d_inode, dentry, nd.path.mnt,
+                               mode, 0);
                mnt_drop_write(nd.path.mnt);
-               if (err)
This page took 0.167716 seconds and 4 git commands to generate.