SOURCES (LINUX_2_6): kernel-apparmor-after-grsec_full.patch - patches from ...

zbyniu zbyniu at pld-linux.org
Sun Feb 8 20:47:12 CET 2009


Author: zbyniu                       Date: Sun Feb  8 19:47:12 2009 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- patches from https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.28
- rev 1379 repackaged to one file

---- Files affected:
SOURCES:
   kernel-apparmor-after-grsec_full.patch (1.1.2.3 -> 1.1.2.4) 

---- Diffs:

================================================================
Index: SOURCES/kernel-apparmor-after-grsec_full.patch
diff -u SOURCES/kernel-apparmor-after-grsec_full.patch:1.1.2.3 SOURCES/kernel-apparmor-after-grsec_full.patch:1.1.2.4
--- SOURCES/kernel-apparmor-after-grsec_full.patch:1.1.2.3	Sun Jan 18 03:30:18 2009
+++ SOURCES/kernel-apparmor-after-grsec_full.patch	Sun Feb  8 20:47:07 2009
@@ -1,17 +1,17 @@
-diff -uprN linux-2.6.27./fs/afs/dir.c linux-2.6.27/fs/afs/dir.c
---- linux-2.6.27./fs/afs/dir.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/afs/dir.c	2008-10-29 02:02:01.686215981 +0100
-@@ -45,6 +45,7 @@ const struct file_operations afs_dir_fil
+diff -uprN a/fs/afs/dir.c b/fs/afs/dir.c
+--- a/fs/afs/dir.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/afs/dir.c	2009-02-08 13:26:38.882622899 +0000
+@@ -46,6 +46,7 @@ const struct file_operations afs_dir_fil
  	.readdir	= afs_readdir,
  	.lock		= afs_lock,
  	.llseek		= generic_file_llseek,
-+	.fsetattr	= afs_fsetattr,
++	.fsetattr       = afs_fsetattr,
  };
  
  const struct inode_operations afs_dir_inode_operations = {
-diff -uprN linux-2.6.27./fs/afs/file.c linux-2.6.27/fs/afs/file.c
---- linux-2.6.27./fs/afs/file.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/afs/file.c	2008-10-29 02:02:01.718012026 +0100
+diff -uprN a/fs/afs/file.c b/fs/afs/file.c
+--- a/fs/afs/file.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/afs/file.c	2009-02-08 13:26:38.882622899 +0000
 @@ -36,6 +36,7 @@ const struct file_operations afs_file_op
  	.fsync		= afs_fsync,
  	.lock		= afs_lock,
@@ -20,9 +20,9 @@
  };
  
  const struct inode_operations afs_file_inode_operations = {
-diff -uprN linux-2.6.27./fs/afs/inode.c linux-2.6.27/fs/afs/inode.c
---- linux-2.6.27./fs/afs/inode.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/afs/inode.c	2008-10-29 02:02:01.732673766 +0100
+diff -uprN a/fs/afs/inode.c b/fs/afs/inode.c
+--- a/fs/afs/inode.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/afs/inode.c	2009-02-08 13:26:38.882622899 +0000
 @@ -358,7 +358,8 @@ void afs_clear_inode(struct inode *inode
  /*
   * set the attributes of an inode
@@ -66,9 +66,9 @@
 +{
 +	return afs_do_setattr(file->f_path.dentry, attr, file);
 +}
-diff -uprN linux-2.6.27./fs/afs/internal.h linux-2.6.27/fs/afs/internal.h
---- linux-2.6.27./fs/afs/internal.h	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/afs/internal.h	2008-10-29 02:02:01.752698408 +0100
+diff -uprN a/fs/afs/internal.h b/fs/afs/internal.h
+--- a/fs/afs/internal.h	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/afs/internal.h	2009-02-08 13:26:38.882622899 +0000
 @@ -548,6 +548,7 @@ extern void afs_zap_data(struct afs_vnod
  extern int afs_validate(struct afs_vnode *, struct key *);
  extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
@@ -77,9 +77,9 @@
  extern void afs_clear_inode(struct inode *);
  
  /*
-diff -uprN linux-2.6.27./fs/attr.c linux-2.6.27/fs/attr.c
---- linux-2.6.27./fs/attr.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/attr.c	2008-10-29 02:02:01.899339282 +0100
+diff -uprN a/fs/attr.c b/fs/attr.c
+--- a/fs/attr.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/attr.c	2009-02-08 13:26:38.889289652 +0000
 @@ -100,7 +100,8 @@ int inode_setattr(struct inode * inode, 
  }
  EXPORT_SYMBOL(inode_setattr);
@@ -90,40 +90,39 @@
  {
  	struct inode *inode = dentry->d_inode;
  	mode_t mode = inode->i_mode;
-@@ -163,13 +164,28 @@ int notify_change(struct dentry * dentry
+@@ -159,7 +160,7 @@ int notify_change(struct dentry * dentry
+ 	if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID)))
+ 		return 0;
+ 
+-	error = security_inode_setattr(dentry, attr);
++	error = security_inode_setattr(dentry, mnt, attr);
+ 	if (error)
+ 		return error;
+ 
+@@ -167,7 +168,21 @@ int notify_change(struct dentry * dentry
  		down_write(&dentry->d_inode->i_alloc_sem);
  
  	if (inode->i_op && inode->i_op->setattr) {
--		error = security_inode_setattr(dentry, attr);
--		if (!error)
--			error = inode->i_op->setattr(dentry, attr);
-+		error = security_inode_setattr(dentry, mnt, attr);
-+		if (!error) {
-+			if (file && file->f_op && file->f_op->fsetattr)
-+				error = file->f_op->fsetattr(file, attr);
-+			else {
-+				/* External file system still expect to be
-+				 * passed a file pointer via ia_file and
-+				 * have it announced via ATTR_FILE. This
-+				 * just makes it so they don't need to
-+				 * change their API just for us. External
-+				 * callers will have set these themselves. */
-+				if (file) {
-+					attr->ia_valid |= ATTR_FILE;
-+					attr->ia_file = file;
-+				}
-+				error = inode->i_op->setattr(dentry, attr);
+-		error = inode->i_op->setattr(dentry, attr);
++		if (file && file->f_op && file->f_op->fsetattr) {
++			error = file->f_op->fsetattr(file, attr);
++		} else {
++			/* External file system still expect to be
++			 * passed a file pointer via ia_file and
++			 * have it announced via ATTR_FILE. This
++			 * just makes it so they don't need to
++			 * change their API just for us. External
++			 * callers will have set these themselves. */
++			if (file) {
++				attr->ia_valid |= ATTR_FILE;
++				attr->ia_file = file;
 +			}
++			error = inode->i_op->setattr(dentry, attr);
 +		}
  	} else {
  		error = inode_change_ok(inode, attr);
- 		if (!error)
--			error = security_inode_setattr(dentry, attr);
-+			error = security_inode_setattr(dentry, mnt, attr);
  		if (!error) {
- 			if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
- 			    (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
-@@ -187,5 +203,12 @@ int notify_change(struct dentry * dentry
+@@ -187,5 +202,12 @@ int notify_change(struct dentry * dentry
  
  	return error;
  }
@@ -136,10 +135,10 @@
 +}
  
  EXPORT_SYMBOL(notify_change);
-diff -uprN linux-2.6.27./fs/dcache.c linux-2.6.27/fs/dcache.c
---- linux-2.6.27./fs/dcache.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/dcache.c	2008-10-29 02:02:01.602672110 +0100
-@@ -1897,44 +1897,46 @@ static int prepend_name(char **buffer, i
+diff -uprN a/fs/dcache.c b/fs/dcache.c
+--- a/fs/dcache.c	2009-02-08 13:22:56.398269260 +0000
++++ b/fs/dcache.c	2009-02-08 13:26:38.879284319 +0000
+@@ -1908,44 +1908,46 @@ static int prepend_name(char **buffer, i
   * @root: root vfsmnt/dentry (may be modified by this function)
   * @buffer: buffer to return value in
   * @buflen: buffer length
@@ -207,7 +206,7 @@
  			if (vfsmnt->mnt_parent == vfsmnt) {
  				goto global_root;
  			}
-@@ -1944,27 +1946,51 @@ char *__d_path(const struct path *path, 
+@@ -1955,27 +1957,51 @@ char *__d_path(const struct path *path, 
  		}
  		parent = dentry->d_parent;
  		prefetch(parent);
@@ -266,7 +265,7 @@
  	goto out;
  }
  
-@@ -2001,10 +2027,8 @@ char *d_path(const struct path *path, ch
+@@ -2012,10 +2038,8 @@ char *d_path(const struct path *path, ch
  	root = current->fs->root;
  	path_get(&root);
  	read_unlock(&current->fs->lock);
@@ -278,9 +277,9 @@
  	path_put(&root);
  	return res;
  }
-@@ -2087,9 +2111,9 @@ Elong:
+@@ -2098,9 +2122,9 @@ Elong:
   */
- asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
+ SYSCALL_DEFINE2(getcwd, char __user *, buf, unsigned long, size)
  {
 -	int error;
 -	struct path pwd, root;
@@ -291,7 +290,7 @@
  
  	if (!page)
  		return -ENOMEM;
-@@ -2101,30 +2125,20 @@ asmlinkage long sys_getcwd(char __user *
+@@ -2112,30 +2136,20 @@ SYSCALL_DEFINE2(getcwd, char __user *, b
  	path_get(&root);
  	read_unlock(&current->fs->lock);
  
@@ -334,9 +333,9 @@
  
  out:
  	path_put(&pwd);
-diff -uprN linux-2.6.27./fs/ecryptfs/inode.c linux-2.6.27/fs/ecryptfs/inode.c
---- linux-2.6.27./fs/ecryptfs/inode.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/ecryptfs/inode.c	2008-10-29 02:02:00.779549727 +0100
+diff -uprN a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
+--- a/fs/ecryptfs/inode.c	2009-02-08 13:22:56.398269260 +0000
++++ b/fs/ecryptfs/inode.c	2009-02-08 13:26:38.839289678 +0000
 @@ -403,19 +403,24 @@ static int ecryptfs_link(struct dentry *
  			 struct dentry *new_dentry)
  {
@@ -479,7 +478,7 @@
  	if (rc)
  		goto out_lock;
  	fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
-@@ -849,6 +870,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -850,6 +871,7 @@ static int ecryptfs_setattr(struct dentr
  {
  	int rc = 0;
  	struct dentry *lower_dentry;
@@ -487,7 +486,7 @@
  	struct inode *inode;
  	struct inode *lower_inode;
  	struct ecryptfs_crypt_stat *crypt_stat;
-@@ -859,6 +881,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -860,6 +882,7 @@ static int ecryptfs_setattr(struct dentr
  	inode = dentry->d_inode;
  	lower_inode = ecryptfs_inode_to_lower(inode);
  	lower_dentry = ecryptfs_dentry_to_lower(dentry);
@@ -495,7 +494,7 @@
  	mutex_lock(&crypt_stat->cs_mutex);
  	if (S_ISDIR(dentry->d_inode->i_mode))
  		crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
-@@ -910,7 +933,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -911,7 +934,7 @@ static int ecryptfs_setattr(struct dentr
  		ia->ia_valid &= ~ATTR_MODE;
  
  	mutex_lock(&lower_dentry->d_inode->i_mutex);
@@ -504,10 +503,10 @@
  	mutex_unlock(&lower_dentry->d_inode->i_mutex);
  out:
  	fsstack_copy_attr_all(inode, lower_inode, NULL);
-diff -uprN linux-2.6.27./fs/exec.c linux-2.6.27/fs/exec.c
---- linux-2.6.27./fs/exec.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/exec.c	2008-10-29 02:01:59.319416030 +0100
-@@ -1827,7 +1827,8 @@ int do_coredump(long signr, int exit_cod
+diff -uprN a/fs/exec.c b/fs/exec.c
+--- a/fs/exec.c	2009-02-08 13:22:56.401605319 +0000
++++ b/fs/exec.c	2009-02-08 13:26:38.765741762 +0000
+@@ -1829,7 +1829,8 @@ int do_coredump(long signr, int exit_cod
  		goto close_fail;
  	if (!file->f_op->write)
  		goto close_fail;
@@ -517,10 +516,10 @@
  		goto close_fail;
  
  	retval = binfmt->core_dump(signr, regs, file, core_limit);
-diff -uprN linux-2.6.27./fs/fat/file.c linux-2.6.27/fs/fat/file.c
---- linux-2.6.27./fs/fat/file.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/fat/file.c	2008-10-29 02:01:59.500590545 +0100
-@@ -98,7 +98,7 @@ int fat_generic_ioctl(struct inode *inod
+diff -uprN a/fs/fat/file.c b/fs/fat/file.c
+--- a/fs/fat/file.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/fat/file.c	2009-02-08 13:26:38.769075001 +0000
+@@ -93,7 +93,7 @@ int fat_generic_ioctl(struct inode *inod
  		 * out the RO attribute for checking by the security
  		 * module, just because it maps to a file mode.
  		 */
@@ -529,9 +528,9 @@
  		if (err)
  			goto up;
  
-diff -uprN linux-2.6.27./fs/fuse/dir.c linux-2.6.27/fs/fuse/dir.c
---- linux-2.6.27./fs/fuse/dir.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/fuse/dir.c	2008-10-29 02:02:01.786146390 +0100
+diff -uprN a/fs/fuse/dir.c b/fs/fuse/dir.c
+--- a/fs/fuse/dir.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/fuse/dir.c	2009-02-08 13:26:38.882622899 +0000
 @@ -1105,21 +1105,22 @@ static int fuse_dir_fsync(struct file *f
  	return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
  }
@@ -599,10 +598,10 @@
  }
  
  static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
-diff -uprN linux-2.6.27./fs/fuse/file.c linux-2.6.27/fs/fuse/file.c
---- linux-2.6.27./fs/fuse/file.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/fuse/file.c	2008-10-29 02:02:01.819442233 +0100
-@@ -1465,6 +1465,11 @@ static loff_t fuse_file_llseek(struct fi
+diff -uprN a/fs/fuse/file.c b/fs/fuse/file.c
+--- a/fs/fuse/file.c	2009-02-08 13:22:56.404930729 +0000
++++ b/fs/fuse/file.c	2009-02-08 13:26:38.882622899 +0000
+@@ -1470,6 +1470,11 @@ static loff_t fuse_file_llseek(struct fi
  	return retval;
  }
  
@@ -614,7 +613,7 @@
  static const struct file_operations fuse_file_operations = {
  	.llseek		= fuse_file_llseek,
  	.read		= do_sync_read,
-@@ -1478,6 +1483,7 @@ static const struct file_operations fuse
+@@ -1483,6 +1488,7 @@ static const struct file_operations fuse
  	.fsync		= fuse_fsync,
  	.lock		= fuse_file_lock,
  	.flock		= fuse_file_flock,
@@ -622,7 +621,7 @@
  	.splice_read	= generic_file_splice_read,
  };
  
-@@ -1491,6 +1497,7 @@ static const struct file_operations fuse
+@@ -1496,6 +1502,7 @@ static const struct file_operations fuse
  	.fsync		= fuse_fsync,
  	.lock		= fuse_file_lock,
  	.flock		= fuse_file_flock,
@@ -630,10 +629,10 @@
  	/* no mmap and splice_read */
  };
  
-diff -uprN linux-2.6.27./fs/fuse/fuse_i.h linux-2.6.27/fs/fuse/fuse_i.h
---- linux-2.6.27./fs/fuse/fuse_i.h	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/fuse/fuse_i.h	2008-10-29 02:02:01.849340465 +0100
-@@ -551,6 +551,10 @@ void fuse_truncate(struct address_space 
+diff -uprN a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
+--- a/fs/fuse/fuse_i.h	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/fuse/fuse_i.h	2009-02-08 13:26:38.882622899 +0000
+@@ -554,6 +554,10 @@ void fuse_truncate(struct address_space 
   */
  int fuse_dev_init(void);
  
@@ -644,9 +643,9 @@
  /**
   * Cleanup the client device
   */
-diff -uprN linux-2.6.27./fs/hpfs/namei.c linux-2.6.27/fs/hpfs/namei.c
---- linux-2.6.27./fs/hpfs/namei.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/hpfs/namei.c	2008-10-29 02:01:59.336012786 +0100
+diff -uprN a/fs/hpfs/namei.c b/fs/hpfs/namei.c
+--- a/fs/hpfs/namei.c	2008-12-24 23:26:37.000000000 +0000
++++ b/fs/hpfs/namei.c	2009-02-08 13:26:38.765741762 +0000
 @@ -426,7 +426,7 @@ again:
  			/*printk("HPFS: truncating file before delete.\n");*/
  			newattrs.ia_size = 0;
@@ -656,9 +655,9 @@
  			put_write_access(inode);
  			if (!err)
  				goto again;
-diff -uprN linux-2.6.27./fs/inotify_user.c linux-2.6.27/fs/inotify_user.c
---- linux-2.6.27./fs/inotify_user.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/inotify_user.c	2008-10-29 02:02:02.186081701 +0100
+diff -uprN a/fs/inotify_user.c b/fs/inotify_user.c
+--- a/fs/inotify_user.c	2009-02-08 13:22:56.408263679 +0000
++++ b/fs/inotify_user.c	2009-02-08 13:26:38.905951221 +0000
 @@ -372,7 +372,7 @@ static int find_inode(const char __user 
  	if (error)
  		return error;
@@ -668,10 +667,10 @@
  	if (error)
  		path_put(path);
  	return error;
-diff -uprN linux-2.6.27./fs/namei.c linux-2.6.27/fs/namei.c
---- linux-2.6.27./fs/namei.c	2008-10-10 00:13:53.000000000 +0200
-+++ linux-2.6.27/fs/namei.c	2008-10-29 02:02:02.266214852 +0100
-@@ -227,7 +227,7 @@ int generic_permission(struct inode *ino
+diff -uprN a/fs/namei.c b/fs/namei.c
+--- a/fs/namei.c	2009-02-08 13:22:56.411597278 +0000
++++ b/fs/namei.c	2009-02-08 13:26:38.909283473 +0000
+@@ -226,7 +226,7 @@ int generic_permission(struct inode *ino
  	return -EACCES;
  }
  
@@ -680,7 +679,7 @@
  {
  	int retval;
  
-@@ -269,7 +269,12 @@ int inode_permission(struct inode *inode
+@@ -256,7 +256,12 @@ int inode_permission(struct inode *inode
  	if (retval)
  		return retval;
  
@@ -694,7 +693,7 @@
  	if (retval)
  		return retval;
  
-@@ -277,6 +282,15 @@ int inode_permission(struct inode *inode
+@@ -264,6 +269,15 @@ int inode_permission(struct inode *inode
  			mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
  }
  
@@ -710,7 +709,7 @@
  /**
   * vfs_permission  -  check for access rights to a given path
   * @nd:		lookup result that describes the path
-@@ -289,7 +303,7 @@ int inode_permission(struct inode *inode
+@@ -276,7 +290,7 @@ int inode_permission(struct inode *inode
   */
  int vfs_permission(struct nameidata *nd, int mask)
  {
@@ -719,7 +718,7 @@
  }
  
  /**
-@@ -306,7 +320,7 @@ int vfs_permission(struct nameidata *nd,
+@@ -293,7 +307,7 @@ int vfs_permission(struct nameidata *nd,
   */
  int file_permission(struct file *file, int mask)
  {
@@ -728,7 +727,7 @@
  }
  
  /*
-@@ -447,8 +461,9 @@ static struct dentry * cached_lookup(str
+@@ -434,8 +448,9 @@ static struct dentry * cached_lookup(str
   * short-cut DAC fails, then call permission() to do more
   * complete permission check.
   */
@@ -739,7 +738,7 @@
  	umode_t	mode = inode->i_mode;
  
  	if (inode->i_op && inode->i_op->permission)
-@@ -473,7 +488,7 @@ static int exec_permission_lite(struct i
+@@ -460,7 +475,7 @@ static int exec_permission_lite(struct i
  
  	return -EACCES;
  ok:
@@ -748,7 +747,7 @@
  }
  
  /*
-@@ -870,7 +885,7 @@ static int __link_path_walk(const char *
+@@ -857,7 +872,7 @@ static int __link_path_walk(const char *
  		unsigned int c;
  
  		nd->flags |= LOOKUP_CONTINUE;
@@ -757,7 +756,7 @@
  		if (err == -EAGAIN)
  			err = vfs_permission(nd, MAY_EXEC);
   		if (err)
-@@ -1065,24 +1080,21 @@ static int do_path_lookup(int dfd, const
+@@ -1052,24 +1067,21 @@ static int do_path_lookup(int dfd, const
  		path_get(&fs->pwd);
  		read_unlock(&fs->lock);
  	} else {
@@ -784,7 +783,7 @@
  		path_get(&file->f_path);
  
  		fput_light(file, fput_needed);
-@@ -1245,7 +1257,7 @@ static struct dentry *lookup_hash(struct
+@@ -1216,7 +1228,7 @@ static struct dentry *lookup_hash(struct
  {
  	int err;
  
@@ -793,7 +792,7 @@
  	if (err)
  		return ERR_PTR(err);
  	return __lookup_hash(&nd->last, nd->path.dentry, nd);
-@@ -1512,7 +1524,7 @@ int vfs_create(struct inode *dir, struct
+@@ -1481,7 +1493,7 @@ int vfs_create(struct inode *dir, struct
  		return -EACCES;	/* shouldn't it be ENOSYS? */
  	mode &= S_IALLUGO;
  	mode |= S_IFREG;
@@ -802,7 +801,7 @@
  	if (error)
  		return error;
  	DQUOT_INIT(dir);
-@@ -1588,7 +1600,7 @@ int may_open(struct nameidata *nd, int a
+@@ -1557,7 +1569,7 @@ int may_open(struct nameidata *nd, int a
  		if (!error) {
  			DQUOT_INIT(inode);
  
@@ -811,7 +810,7 @@
  					    ATTR_MTIME|ATTR_CTIME|ATTR_OPEN,
  					    NULL);
  		}
-@@ -1945,7 +1957,8 @@ fail:
+@@ -1924,7 +1936,8 @@ fail:
  }
  EXPORT_SYMBOL_GPL(lookup_create);
  
@@ -821,7 +820,7 @@
  {
  	int error = may_create(dir, dentry);
  
-@@ -1962,7 +1975,7 @@ int vfs_mknod(struct inode *dir, struct 
+@@ -1941,7 +1954,7 @@ int vfs_mknod(struct inode *dir, struct 
  	if (error)
  		return error;
  
@@ -830,7 +829,7 @@
  	if (error)
  		return error;
  
-@@ -2023,11 +2036,12 @@ asmlinkage long sys_mknodat(int dfd, con
+@@ -2002,11 +2015,12 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
  			error = vfs_create(nd.path.dentry->d_inode,dentry,mode,&nd);
  			break;
  		case S_IFCHR: case S_IFBLK:
@@ -846,7 +845,7 @@
  			break;
  	}
  	mnt_drop_write(nd.path.mnt);
-@@ -2046,7 +2060,8 @@ asmlinkage long sys_mknod(const char __u
+@@ -2025,7 +2039,8 @@ SYSCALL_DEFINE3(mknod, const char __user
  	return sys_mknodat(AT_FDCWD, filename, mode, dev);
  }
  
@@ -856,7 +855,7 @@
  {
  	int error = may_create(dir, dentry);
  
-@@ -2057,7 +2072,7 @@ int vfs_mkdir(struct inode *dir, struct 
+@@ -2036,7 +2051,7 @@ int vfs_mkdir(struct inode *dir, struct 
  		return -EPERM;
  
  	mode &= (S_IRWXUGO|S_ISVTX);
@@ -865,7 +864,7 @@
  	if (error)
  		return error;
  
-@@ -2089,7 +2104,7 @@ asmlinkage long sys_mkdirat(int dfd, con
+@@ -2068,7 +2083,7 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
  	error = mnt_want_write(nd.path.mnt);
  	if (error)
  		goto out_dput;
@@ -874,7 +873,7 @@
  	mnt_drop_write(nd.path.mnt);
  out_dput:
  	dput(dentry);
-@@ -2133,7 +2148,7 @@ void dentry_unhash(struct dentry *dentry
+@@ -2112,7 +2127,7 @@ void dentry_unhash(struct dentry *dentry
  	spin_unlock(&dcache_lock);
  }
  
@@ -883,7 +882,7 @@
  {
  	int error = may_delete(dir, dentry, 1);
  
-@@ -2143,6 +2158,10 @@ int vfs_rmdir(struct inode *dir, struct 
+@@ -2122,6 +2137,10 @@ int vfs_rmdir(struct inode *dir, struct 
  	if (!dir->i_op || !dir->i_op->rmdir)
  		return -EPERM;
  
@@ -894,7 +893,7 @@
  	DQUOT_INIT(dir);
  
  	mutex_lock(&dentry->d_inode->i_mutex);
-@@ -2150,12 +2169,9 @@ int vfs_rmdir(struct inode *dir, struct 
+@@ -2129,12 +2148,9 @@ int vfs_rmdir(struct inode *dir, struct 
  	if (d_mountpoint(dentry))
  		error = -EBUSY;
  	else {
@@ -910,7 +909,7 @@
  	}
  	mutex_unlock(&dentry->d_inode->i_mutex);
  	if (!error) {
-@@ -2196,7 +2212,7 @@ static long do_rmdir(int dfd, const char
+@@ -2178,7 +2194,7 @@ static long do_rmdir(int dfd, const char
  	error = mnt_want_write(nd.path.mnt);
  	if (error)
  		goto exit3;
@@ -919,7 +918,7 @@
  	mnt_drop_write(nd.path.mnt);
  exit3:
  	dput(dentry);
-@@ -2213,7 +2229,7 @@ asmlinkage long sys_rmdir(const char __u
+@@ -2195,7 +2211,7 @@ SYSCALL_DEFINE1(rmdir, const char __user
  	return do_rmdir(AT_FDCWD, pathname);
  }
  
@@ -928,7 +927,7 @@
  {
  	int error = may_delete(dir, dentry, 0);
  
-@@ -2229,7 +2245,7 @@ int vfs_unlink(struct inode *dir, struct
+@@ -2211,7 +2227,7 @@ int vfs_unlink(struct inode *dir, struct
  	if (d_mountpoint(dentry))
  		error = -EBUSY;
  	else {
@@ -937,16 +936,16 @@
  		if (!error)
  			error = dir->i_op->unlink(dir, dentry);
  	}
-@@ -2278,7 +2294,7 @@ static long do_unlinkat(int dfd, const c
+@@ -2263,7 +2279,7 @@ static long do_unlinkat(int dfd, const c
  		error = mnt_want_write(nd.path.mnt);
  		if (error)
  			goto exit2;
 -		error = vfs_unlink(nd.path.dentry->d_inode, dentry);
 +		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);
  		mnt_drop_write(nd.path.mnt);
-@@ -2313,7 +2329,8 @@ asmlinkage long sys_unlink(const char __
+ 	exit2:
+ 		dput(dentry);
+@@ -2298,7 +2314,8 @@ SYSCALL_DEFINE1(unlink, const char __use
  	return do_unlinkat(AT_FDCWD, pathname);
  }
  
@@ -956,7 +955,7 @@
  {
  	int error = may_create(dir, dentry);
  
-@@ -2323,7 +2340,7 @@ int vfs_symlink(struct inode *dir, struc
+@@ -2308,7 +2325,7 @@ int vfs_symlink(struct inode *dir, struc
  	if (!dir->i_op || !dir->i_op->symlink)
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-apparmor-after-grsec_full.patch?r1=1.1.2.3&r2=1.1.2.4&f=u



More information about the pld-cvs-commit mailing list