mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
refresh patches for offsets against latest git pull
This commit is contained in:
parent
37cf7f900b
commit
b2c6ec5b57
36 changed files with 173 additions and 173 deletions
|
@ -27,7 +27,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
* 1600 - 1699 kernel crypto events
|
||||
* 1700 - 1799 kernel anomaly records
|
||||
* 1800 - 1999 future kernel use (maybe integrity labels and related events)
|
||||
@@ -109,6 +109,13 @@
|
||||
@@ -113,6 +113,13 @@
|
||||
#define AUDIT_MAC_IPSEC_ADDSPD 1413 /* Add a XFRM policy */
|
||||
#define AUDIT_MAC_IPSEC_DELSPD 1414 /* Delete a XFRM policy */
|
||||
|
||||
|
@ -41,7 +41,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
#define AUDIT_FIRST_KERN_ANOM_MSG 1700
|
||||
#define AUDIT_LAST_KERN_ANOM_MSG 1799
|
||||
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
|
||||
@@ -499,6 +506,9 @@ extern void audit_log(struct audit_
|
||||
@@ -509,6 +516,9 @@ extern void audit_log(struct audit_
|
||||
__attribute__((format(printf,4,5)));
|
||||
|
||||
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
|
||||
|
@ -53,7 +53,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
__attribute__((format(printf,2,3)));
|
||||
--- a/kernel/audit.c
|
||||
+++ b/kernel/audit.c
|
||||
@@ -1054,8 +1054,7 @@ static inline int audit_expand(struct au
|
||||
@@ -1136,8 +1136,7 @@ static inline int audit_expand(struct au
|
||||
* will be called a second time. Currently, we assume that a printk
|
||||
* can't format message larger than 1024 bytes, so we don't either.
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int len, avail;
|
||||
struct sk_buff *skb;
|
||||
@@ -1311,3 +1310,6 @@ EXPORT_SYMBOL(audit_log_start);
|
||||
@@ -1392,3 +1391,6 @@ EXPORT_SYMBOL(audit_log_start);
|
||||
EXPORT_SYMBOL(audit_log_end);
|
||||
EXPORT_SYMBOL(audit_log_format);
|
||||
EXPORT_SYMBOL(audit_log);
|
||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1779,9 +1779,9 @@ shouldnt_be_hashed:
|
||||
@@ -1784,9 +1784,9 @@ shouldnt_be_hashed:
|
||||
*
|
||||
* Returns the buffer or an error code.
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -1868,3 +1868,30 @@ void __put_mnt_ns(struct mnt_namespace *
|
||||
@@ -1863,3 +1863,30 @@ void __put_mnt_ns(struct mnt_namespace *
|
||||
release_mounts(&umount_list);
|
||||
kfree(ns);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1130,25 +1130,24 @@ static int fastcall do_path_lookup(int d
|
||||
@@ -1132,25 +1132,24 @@ static int fastcall do_path_lookup(int d
|
||||
nd->dentry = dget(fs->pwd);
|
||||
read_unlock(&fs->lock);
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -383,7 +383,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
@@ -400,7 +400,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
{
|
||||
ssize_t buflen;
|
||||
|
||||
|
@ -27,7 +27,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
if (buflen <= 0)
|
||||
return buflen;
|
||||
|
||||
@@ -391,7 +391,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
@@ -408,7 +408,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
if (!*buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -36,7 +36,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
}
|
||||
#endif
|
||||
|
||||
@@ -417,7 +417,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
|
||||
@@ -434,7 +434,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
out:
|
||||
kfree(buf);
|
||||
return error;
|
||||
@@ -2008,12 +2008,14 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
@@ -2023,12 +2023,14 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
|
||||
mnt = fhp->fh_export->ex_mnt;
|
||||
if (size)
|
||||
|
@ -64,7 +64,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
}
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -522,6 +522,8 @@ asmlinkage long sys_fchmod(unsigned int
|
||||
@@ -581,6 +581,8 @@ asmlinkage long sys_fchmod(unsigned int
|
||||
mode = inode->i_mode;
|
||||
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
|
||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||
|
@ -73,7 +73,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
err = notify_change(dentry, file->f_path.mnt, &newattrs);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
|
||||
@@ -572,7 +574,7 @@ asmlinkage long sys_chmod(const char __u
|
||||
@@ -631,7 +633,7 @@ asmlinkage long sys_chmod(const char __u
|
||||
}
|
||||
|
||||
static int chown_common(struct dentry * dentry, struct vfsmount *mnt,
|
||||
|
@ -82,7 +82,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
{
|
||||
struct inode * inode;
|
||||
int error;
|
||||
@@ -600,6 +602,10 @@ static int chown_common(struct dentry *
|
||||
@@ -659,6 +661,10 @@ static int chown_common(struct dentry *
|
||||
}
|
||||
if (!S_ISDIR(inode->i_mode))
|
||||
newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
|
||||
|
@ -93,7 +93,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
mutex_lock(&inode->i_mutex);
|
||||
error = notify_change(dentry, mnt, &newattrs);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
@@ -615,7 +621,7 @@ asmlinkage long sys_chown(const char __u
|
||||
@@ -674,7 +680,7 @@ asmlinkage long sys_chown(const char __u
|
||||
error = user_path_walk(filename, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -102,7 +102,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -635,7 +641,7 @@ asmlinkage long sys_fchownat(int dfd, co
|
||||
@@ -694,7 +700,7 @@ asmlinkage long sys_fchownat(int dfd, co
|
||||
error = __user_walk_fd(dfd, filename, follow, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -111,7 +111,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -649,7 +655,7 @@ asmlinkage long sys_lchown(const char __
|
||||
@@ -708,7 +714,7 @@ asmlinkage long sys_lchown(const char __
|
||||
error = user_path_walk_link(filename, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -120,7 +120,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -668,7 +674,7 @@ asmlinkage long sys_fchown(unsigned int
|
||||
@@ -727,7 +733,7 @@ asmlinkage long sys_fchown(unsigned int
|
||||
|
||||
dentry = file->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
|
@ -131,7 +131,7 @@ Cc: Miklos Szeredi <mszeredi@suse.cz>
|
|||
return error;
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -351,6 +351,9 @@ struct iattr {
|
||||
@@ -354,6 +354,9 @@ struct iattr {
|
||||
* Not an attribute, but an auxilary info for filesystems wanting to
|
||||
* implement an ftruncate() like method. NOTE: filesystem should
|
||||
* check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
|
||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -296,7 +296,13 @@ int vfs_permission(struct nameidata *nd,
|
||||
@@ -298,7 +298,13 @@ int vfs_permission(struct nameidata *nd,
|
||||
*/
|
||||
int file_permission(struct file *file, int mask)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2034,6 +2034,10 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
@@ -2067,6 +2067,10 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
if (!dir->i_op || !dir->i_op->rmdir)
|
||||
return -EPERM;
|
||||
|
||||
|
@ -26,7 +26,7 @@ Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|||
DQUOT_INIT(dir);
|
||||
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
@@ -2041,12 +2045,9 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
@@ -2074,12 +2078,9 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
if (d_mountpoint(dentry))
|
||||
error = -EBUSY;
|
||||
else {
|
||||
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1783,7 +1783,7 @@ static char *__d_path(struct dentry *den
|
||||
@@ -1788,7 +1788,7 @@ static char *__d_path(struct dentry *den
|
||||
struct dentry *root, struct vfsmount *rootmnt,
|
||||
char *buffer, int buflen, int fail_deleted)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
if (buflen < 2)
|
||||
return ERR_PTR(-ENAMETOOLONG);
|
||||
@@ -1806,14 +1806,14 @@ static char *__d_path(struct dentry *den
|
||||
@@ -1811,14 +1811,14 @@ static char *__d_path(struct dentry *den
|
||||
struct dentry * parent;
|
||||
|
||||
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
|
||||
|
@ -49,7 +49,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
continue;
|
||||
}
|
||||
parent = dentry->d_parent;
|
||||
@@ -1832,6 +1832,8 @@ static char *__d_path(struct dentry *den
|
||||
@@ -1837,6 +1837,8 @@ static char *__d_path(struct dentry *den
|
||||
*--buffer = '/';
|
||||
|
||||
out:
|
||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1409,6 +1409,10 @@ static int may_delete(struct inode *dir,
|
||||
@@ -1442,6 +1442,10 @@ static int may_delete(struct inode *dir,
|
||||
BUG_ON(victim->d_parent->d_inode != dir);
|
||||
audit_inode_child(victim->d_name.name, victim->d_inode, dir);
|
||||
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
error = permission(dir,MAY_WRITE | MAY_EXEC, NULL);
|
||||
if (error)
|
||||
return error;
|
||||
@@ -1446,6 +1450,8 @@ static inline int may_create(struct inod
|
||||
@@ -1479,6 +1483,8 @@ static inline int may_create(struct inod
|
||||
return -EEXIST;
|
||||
if (IS_DEADDIR(dir))
|
||||
return -ENOENT;
|
||||
|
|
|
@ -32,7 +32,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
file_update_time(file);
|
||||
--- a/fs/reiserfs/file.c
|
||||
+++ b/fs/reiserfs/file.c
|
||||
@@ -1335,7 +1335,7 @@ static ssize_t reiserfs_file_write(struc
|
||||
@@ -1334,7 +1334,7 @@ static ssize_t reiserfs_file_write(struc
|
||||
if (count == 0)
|
||||
goto out;
|
||||
|
||||
|
@ -43,7 +43,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -834,7 +834,7 @@ generic_file_splice_write_nolock(struct
|
||||
@@ -830,7 +830,7 @@ generic_file_splice_write_nolock(struct
|
||||
ssize_t ret;
|
||||
int err;
|
||||
|
||||
|
@ -52,7 +52,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
@@ -889,7 +889,7 @@ generic_file_splice_write(struct pipe_in
|
||||
@@ -885,7 +885,7 @@ generic_file_splice_write(struct pipe_in
|
||||
err = should_remove_suid(out->f_path.dentry);
|
||||
if (unlikely(err)) {
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
@ -74,7 +74,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -1724,9 +1724,9 @@ extern void __iget(struct inode * inode)
|
||||
@@ -1634,9 +1634,9 @@ extern void __iget(struct inode * inode)
|
||||
extern void clear_inode(struct inode *);
|
||||
extern void destroy_inode(struct inode *);
|
||||
extern struct inode *new_inode(struct super_block *);
|
||||
|
@ -88,7 +88,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
extern void remove_inode_hash(struct inode *);
|
||||
--- a/mm/filemap.c
|
||||
+++ b/mm/filemap.c
|
||||
@@ -1885,20 +1885,20 @@ int should_remove_suid(struct dentry *de
|
||||
@@ -1691,20 +1691,20 @@ int should_remove_suid(struct dentry *de
|
||||
}
|
||||
EXPORT_SYMBOL(should_remove_suid);
|
||||
|
||||
|
@ -114,7 +114,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
return 0;
|
||||
}
|
||||
@@ -2249,7 +2249,7 @@ __generic_file_aio_write_nolock(struct k
|
||||
@@ -2053,7 +2053,7 @@ __generic_file_aio_write_nolock(struct k
|
||||
if (count == 0)
|
||||
goto out;
|
||||
|
||||
|
@ -125,7 +125,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/mm/filemap_xip.c
|
||||
+++ b/mm/filemap_xip.c
|
||||
@@ -384,7 +384,7 @@ xip_file_write(struct file *filp, const
|
||||
@@ -381,7 +381,7 @@ xip_file_write(struct file *filp, const
|
||||
if (count == 0)
|
||||
goto out_backing;
|
||||
|
||||
|
@ -136,7 +136,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/mm/shmem.c
|
||||
+++ b/mm/shmem.c
|
||||
@@ -1527,7 +1527,7 @@ shmem_file_write(struct file *file, cons
|
||||
@@ -1488,7 +1488,7 @@ shmem_file_write(struct file *file, cons
|
||||
if (err || !count)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1521,7 +1521,7 @@ int vfs_create(struct inode *dir, struct
|
||||
@@ -1554,7 +1554,7 @@ int vfs_create(struct inode *dir, struct
|
||||
return -EACCES; /* shouldn't it be ENOSYS? */
|
||||
mode &= S_IALLUGO;
|
||||
mode |= S_IFREG;
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -116,7 +116,7 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
@@ -115,7 +115,7 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2293,7 +2293,8 @@ int vfs_link(struct dentry *old_dentry,
|
||||
@@ -2326,7 +2326,8 @@ int vfs_link(struct dentry *old_dentry,
|
||||
if (S_ISDIR(old_dentry->d_inode->i_mode))
|
||||
return -EPERM;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -149,7 +149,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
@@ -148,7 +148,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
struct inode *inode = dentry->d_inode;
|
||||
ssize_t error;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1946,7 +1946,7 @@ int vfs_mkdir(struct inode *dir, struct
|
||||
@@ -1979,7 +1979,7 @@ int vfs_mkdir(struct inode *dir, struct
|
||||
return -EPERM;
|
||||
|
||||
mode &= (S_IRWXUGO|S_ISVTX);
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1869,7 +1869,7 @@ int vfs_mknod(struct inode *dir, struct
|
||||
@@ -1902,7 +1902,7 @@ int vfs_mknod(struct inode *dir, struct
|
||||
if (!dir->i_op || !dir->i_op->mknod)
|
||||
return -EPERM;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -177,7 +177,7 @@ vfs_removexattr(struct dentry *dentry, s
|
||||
@@ -176,7 +176,7 @@ vfs_removexattr(struct dentry *dentry, s
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2417,7 +2417,8 @@ static int vfs_rename_dir(struct inode *
|
||||
@@ -2450,7 +2450,8 @@ static int vfs_rename_dir(struct inode *
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -2451,7 +2452,8 @@ static int vfs_rename_other(struct inode
|
||||
@@ -2484,7 +2485,8 @@ static int vfs_rename_other(struct inode
|
||||
struct inode *target;
|
||||
int error;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2041,7 +2041,7 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
@@ -2074,7 +2074,7 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
if (d_mountpoint(dentry))
|
||||
error = -EBUSY;
|
||||
else {
|
||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -80,7 +80,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
@@ -79,7 +79,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
return error;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
@ -26,7 +26,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
goto out;
|
||||
error = -EOPNOTSUPP;
|
||||
@@ -88,7 +88,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
@@ -87,7 +87,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
error = inode->i_op->setxattr(dentry, name, value, size, flags);
|
||||
if (!error) {
|
||||
fsnotify_xattr(dentry);
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2214,7 +2214,7 @@ int vfs_symlink(struct inode *dir, struc
|
||||
@@ -2247,7 +2247,7 @@ int vfs_symlink(struct inode *dir, struc
|
||||
if (!dir->i_op || !dir->i_op->symlink)
|
||||
return -EPERM;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2121,7 +2121,7 @@ int vfs_unlink(struct inode *dir, struct
|
||||
@@ -2154,7 +2154,7 @@ int vfs_unlink(struct inode *dir, struct
|
||||
if (d_mountpoint(dentry))
|
||||
error = -EBUSY;
|
||||
else {
|
||||
|
|
|
@ -19,7 +19,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -70,7 +70,7 @@ xattr_permission(struct inode *inode, co
|
||||
@@ -69,7 +69,7 @@ xattr_permission(struct inode *inode, co
|
||||
|
||||
int
|
||||
vfs_setxattr(struct dentry *dentry, struct vfsmount *mnt, char *name,
|
||||
|
@ -28,7 +28,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
int error;
|
||||
@@ -80,7 +80,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
@@ -79,7 +79,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
return error;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
@ -37,7 +37,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
goto out;
|
||||
error = -EOPNOTSUPP;
|
||||
@@ -107,7 +107,7 @@ EXPORT_SYMBOL_GPL(vfs_setxattr);
|
||||
@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(vfs_setxattr);
|
||||
|
||||
ssize_t
|
||||
vfs_getxattr(struct dentry *dentry, struct vfsmount *mnt, char *name,
|
||||
|
@ -46,7 +46,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
int error;
|
||||
@@ -116,7 +116,7 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
@@ -115,7 +115,7 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -144,12 +144,12 @@ EXPORT_SYMBOL_GPL(vfs_getxattr);
|
||||
@@ -143,12 +143,12 @@ EXPORT_SYMBOL_GPL(vfs_getxattr);
|
||||
|
||||
ssize_t
|
||||
vfs_listxattr(struct dentry *dentry, struct vfsmount *mnt, char *list,
|
||||
|
@ -70,7 +70,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
return error;
|
||||
error = -EOPNOTSUPP;
|
||||
@@ -165,7 +165,8 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
@@ -164,7 +164,8 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
EXPORT_SYMBOL_GPL(vfs_listxattr);
|
||||
|
||||
int
|
||||
|
@ -80,7 +80,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
int error;
|
||||
@@ -177,7 +178,7 @@ vfs_removexattr(struct dentry *dentry, s
|
||||
@@ -176,7 +177,7 @@ vfs_removexattr(struct dentry *dentry, s
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
@ -89,7 +89,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -197,7 +198,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
|
||||
@@ -196,7 +197,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
|
||||
*/
|
||||
static long
|
||||
setxattr(struct dentry *dentry, struct vfsmount *mnt, char __user *name,
|
||||
|
@ -98,7 +98,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error;
|
||||
void *kvalue = NULL;
|
||||
@@ -224,7 +225,7 @@ setxattr(struct dentry *dentry, struct v
|
||||
@@ -223,7 +224,7 @@ setxattr(struct dentry *dentry, struct v
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
kfree(kvalue);
|
||||
return error;
|
||||
}
|
||||
@@ -239,7 +240,7 @@ sys_setxattr(char __user *path, char __u
|
||||
@@ -238,7 +239,7 @@ sys_setxattr(char __user *path, char __u
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -116,7 +116,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -254,7 +255,7 @@ sys_lsetxattr(char __user *path, char __
|
||||
@@ -253,7 +254,7 @@ sys_lsetxattr(char __user *path, char __
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -125,7 +125,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -272,7 +273,7 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
@@ -271,7 +272,7 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
return error;
|
||||
dentry = f->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
|
@ -134,7 +134,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
fput(f);
|
||||
return error;
|
||||
}
|
||||
@@ -282,7 +283,7 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
@@ -281,7 +282,7 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
*/
|
||||
static ssize_t
|
||||
getxattr(struct dentry *dentry, struct vfsmount *mnt, char __user *name,
|
||||
|
@ -143,7 +143,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
ssize_t error;
|
||||
void *kvalue = NULL;
|
||||
@@ -302,7 +303,7 @@ getxattr(struct dentry *dentry, struct v
|
||||
@@ -301,7 +302,7 @@ getxattr(struct dentry *dentry, struct v
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error > 0) {
|
||||
if (size && copy_to_user(value, kvalue, error))
|
||||
error = -EFAULT;
|
||||
@@ -325,7 +326,7 @@ sys_getxattr(char __user *path, char __u
|
||||
@@ -324,7 +325,7 @@ sys_getxattr(char __user *path, char __u
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -161,7 +161,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -340,7 +341,7 @@ sys_lgetxattr(char __user *path, char __
|
||||
@@ -339,7 +340,7 @@ sys_lgetxattr(char __user *path, char __
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -170,7 +170,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -355,7 +356,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
@@ -354,7 +355,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
|
@ -179,7 +179,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
fput(f);
|
||||
return error;
|
||||
}
|
||||
@@ -365,7 +366,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
@@ -364,7 +365,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
*/
|
||||
static ssize_t
|
||||
listxattr(struct dentry *dentry, struct vfsmount *mnt, char __user *list,
|
||||
|
@ -188,7 +188,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
ssize_t error;
|
||||
char *klist = NULL;
|
||||
@@ -378,7 +379,7 @@ listxattr(struct dentry *dentry, struct
|
||||
@@ -377,7 +378,7 @@ listxattr(struct dentry *dentry, struct
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error > 0) {
|
||||
if (size && copy_to_user(list, klist, error))
|
||||
error = -EFAULT;
|
||||
@@ -400,7 +401,7 @@ sys_listxattr(char __user *path, char __
|
||||
@@ -399,7 +400,7 @@ sys_listxattr(char __user *path, char __
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -206,7 +206,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -414,7 +415,7 @@ sys_llistxattr(char __user *path, char _
|
||||
@@ -413,7 +414,7 @@ sys_llistxattr(char __user *path, char _
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -215,7 +215,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -429,7 +430,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
@@ -428,7 +429,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
|
@ -224,7 +224,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
fput(f);
|
||||
return error;
|
||||
}
|
||||
@@ -438,7 +439,8 @@ sys_flistxattr(int fd, char __user *list
|
||||
@@ -437,7 +438,8 @@ sys_flistxattr(int fd, char __user *list
|
||||
* Extended attribute REMOVE operations
|
||||
*/
|
||||
static long
|
||||
|
@ -234,7 +234,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error;
|
||||
char kname[XATTR_NAME_MAX + 1];
|
||||
@@ -449,7 +451,7 @@ removexattr(struct dentry *dentry, struc
|
||||
@@ -448,7 +450,7 @@ removexattr(struct dentry *dentry, struc
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
|
@ -243,7 +243,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
|
||||
asmlinkage long
|
||||
@@ -461,7 +463,7 @@ sys_removexattr(char __user *path, char
|
||||
@@ -460,7 +462,7 @@ sys_removexattr(char __user *path, char
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -252,7 +252,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -475,7 +477,7 @@ sys_lremovexattr(char __user *path, char
|
||||
@@ -474,7 +476,7 @@ sys_lremovexattr(char __user *path, char
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -261,7 +261,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -492,7 +494,7 @@ sys_fremovexattr(int fd, char __user *na
|
||||
@@ -491,7 +493,7 @@ sys_fremovexattr(int fd, char __user *na
|
||||
return error;
|
||||
dentry = f->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -440,10 +440,8 @@ out:
|
||||
@@ -499,10 +499,8 @@ out:
|
||||
|
||||
asmlinkage long sys_fchdir(unsigned int fd)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
int error;
|
||||
|
||||
error = -EBADF;
|
||||
@@ -451,17 +449,17 @@ asmlinkage long sys_fchdir(unsigned int
|
||||
@@ -510,17 +508,17 @@ asmlinkage long sys_fchdir(unsigned int
|
||||
if (!file)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
void __user *newval, size_t newlen);
|
||||
--- a/kernel/sysctl.c
|
||||
+++ b/kernel/sysctl.c
|
||||
@@ -1200,6 +1200,33 @@ struct ctl_table_header *sysctl_head_nex
|
||||
@@ -1297,6 +1297,33 @@ struct ctl_table_header *sysctl_head_nex
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
|||
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1761,52 +1761,51 @@ shouldnt_be_hashed:
|
||||
@@ -1766,52 +1766,51 @@ shouldnt_be_hashed:
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,7 +110,7 @@ Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
|||
spin_lock(&vfsmount_lock);
|
||||
if (vfsmnt->mnt_parent == vfsmnt) {
|
||||
spin_unlock(&vfsmount_lock);
|
||||
@@ -1820,33 +1819,72 @@ static char * __d_path( struct dentry *d
|
||||
@@ -1825,33 +1824,72 @@ static char * __d_path( struct dentry *d
|
||||
parent = dentry->d_parent;
|
||||
prefetch(parent);
|
||||
namelen = dentry->d_name.len;
|
||||
|
@ -198,7 +198,7 @@ Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
|||
{
|
||||
char *res;
|
||||
struct vfsmount *rootmnt;
|
||||
@@ -1866,9 +1904,8 @@ char * d_path(struct dentry *dentry, str
|
||||
@@ -1871,9 +1909,8 @@ char * d_path(struct dentry *dentry, str
|
||||
rootmnt = mntget(current->fs->rootmnt);
|
||||
root = dget(current->fs->root);
|
||||
read_unlock(¤t->fs->lock);
|
||||
|
@ -210,7 +210,7 @@ Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
|||
dput(root);
|
||||
mntput(rootmnt);
|
||||
return res;
|
||||
@@ -1915,10 +1952,10 @@ char *dynamic_dname(struct dentry *dentr
|
||||
@@ -1920,10 +1957,10 @@ char *dynamic_dname(struct dentry *dentr
|
||||
*/
|
||||
asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
|||
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
@@ -1930,29 +1967,19 @@ asmlinkage long sys_getcwd(char __user *
|
||||
@@ -1935,29 +1972,19 @@ asmlinkage long sys_getcwd(char __user *
|
||||
root = dget(current->fs->root);
|
||||
read_unlock(¤t->fs->lock);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/nfsd/nfs4xdr.c
|
||||
+++ b/fs/nfsd/nfs4xdr.c
|
||||
@@ -1469,7 +1469,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
|
||||
@@ -1491,7 +1491,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
|
||||
}
|
||||
if (bmval0 & (FATTR4_WORD0_ACL | FATTR4_WORD0_ACLSUPPORT
|
||||
| FATTR4_WORD0_SUPPORTED_ATTRS)) {
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (err == -EOPNOTSUPP)
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -378,11 +378,12 @@ out_nfserr:
|
||||
@@ -395,11 +395,12 @@ out_nfserr:
|
||||
#if defined(CONFIG_NFSD_V2_ACL) || \
|
||||
defined(CONFIG_NFSD_V3_ACL) || \
|
||||
defined(CONFIG_NFSD_V4)
|
||||
|
@ -44,7 +44,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (buflen <= 0)
|
||||
return buflen;
|
||||
|
||||
@@ -390,7 +391,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
@@ -407,7 +408,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
if (!*buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -53,7 +53,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
#endif
|
||||
|
||||
@@ -479,13 +480,13 @@ out_nfserr:
|
||||
@@ -488,13 +489,13 @@ out_nfserr:
|
||||
}
|
||||
|
||||
static struct posix_acl *
|
||||
|
@ -69,7 +69,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (!buflen)
|
||||
buflen = -ENODATA;
|
||||
if (buflen <= 0)
|
||||
@@ -497,14 +498,15 @@ _get_posix_acl(struct dentry *dentry, ch
|
||||
@@ -506,14 +507,15 @@ _get_posix_acl(struct dentry *dentry, ch
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -87,7 +87,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (IS_ERR(pacl) && PTR_ERR(pacl) == -ENODATA)
|
||||
pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
|
||||
if (IS_ERR(pacl)) {
|
||||
@@ -514,7 +516,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
|
||||
@@ -523,7 +525,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
|
||||
}
|
||||
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
|
@ -96,7 +96,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (IS_ERR(dpacl) && PTR_ERR(dpacl) == -ENODATA)
|
||||
dpacl = NULL;
|
||||
else if (IS_ERR(dpacl)) {
|
||||
@@ -1958,7 +1960,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
|
||||
@@ -1973,7 +1975,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -106,7 +106,8 @@ out:
|
||||
@@ -105,7 +105,8 @@ out:
|
||||
EXPORT_SYMBOL_GPL(vfs_setxattr);
|
||||
|
||||
ssize_t
|
||||
|
@ -118,7 +118,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
int error;
|
||||
@@ -278,7 +279,8 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
@@ -277,7 +278,8 @@ sys_fsetxattr(int fd, char __user *name,
|
||||
* Extended attribute GET operations
|
||||
*/
|
||||
static ssize_t
|
||||
|
@ -128,7 +128,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
ssize_t error;
|
||||
void *kvalue = NULL;
|
||||
@@ -298,7 +300,7 @@ getxattr(struct dentry *d, char __user *
|
||||
@@ -297,7 +299,7 @@ getxattr(struct dentry *d, char __user *
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error > 0) {
|
||||
if (size && copy_to_user(value, kvalue, error))
|
||||
error = -EFAULT;
|
||||
@@ -321,7 +323,7 @@ sys_getxattr(char __user *path, char __u
|
||||
@@ -320,7 +322,7 @@ sys_getxattr(char __user *path, char __u
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -146,7 +146,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -336,7 +338,7 @@ sys_lgetxattr(char __user *path, char __
|
||||
@@ -335,7 +337,7 @@ sys_lgetxattr(char __user *path, char __
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -155,7 +155,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -351,7 +353,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
@@ -350,7 +352,7 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
|
@ -166,7 +166,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/include/linux/nfsd/nfsd.h
|
||||
+++ b/include/linux/nfsd/nfsd.h
|
||||
@@ -77,7 +77,8 @@ __be32 nfsd_setattr(struct svc_rqst *,
|
||||
@@ -79,7 +79,8 @@ __be32 nfsd_setattr(struct svc_rqst *,
|
||||
#ifdef CONFIG_NFSD_V4
|
||||
__be32 nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
|
||||
struct nfs4_acl *);
|
||||
|
|
|
@ -46,7 +46,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0);
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2268,7 +2268,7 @@ asmlinkage long sys_symlink(const char _
|
||||
@@ -2301,7 +2301,7 @@ asmlinkage long sys_symlink(const char _
|
||||
return sys_symlinkat(oldname, AT_FDCWD, newname);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = old_dentry->d_inode;
|
||||
int error;
|
||||
@@ -2346,7 +2346,8 @@ asmlinkage long sys_linkat(int olddfd, c
|
||||
@@ -2379,7 +2379,8 @@ asmlinkage long sys_linkat(int olddfd, c
|
||||
error = PTR_ERR(new_dentry);
|
||||
if (IS_ERR(new_dentry))
|
||||
goto out_unlock;
|
||||
|
@ -67,7 +67,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1536,7 +1536,8 @@ nfsd_link(struct svc_rqst *rqstp, struct
|
||||
@@ -1561,7 +1561,8 @@ nfsd_link(struct svc_rqst *rqstp, struct
|
||||
dold = tfhp->fh_dentry;
|
||||
dest = dold->d_inode;
|
||||
|
||||
|
@ -79,7 +79,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
err = nfserrno(nfsd_sync_dir(ddir));
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -996,7 +996,7 @@ extern int vfs_create(struct inode *, st
|
||||
@@ -1013,7 +1013,7 @@ extern int vfs_create(struct inode *, st
|
||||
extern int vfs_mkdir(struct inode *, struct dentry *, struct vfsmount *, int);
|
||||
extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount *, int, dev_t);
|
||||
extern int vfs_symlink(struct inode *, struct dentry *, struct vfsmount *, const char *, int);
|
||||
|
|
|
@ -15,7 +15,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -143,18 +143,20 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
@@ -142,18 +142,20 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
EXPORT_SYMBOL_GPL(vfs_getxattr);
|
||||
|
||||
ssize_t
|
||||
|
@ -42,7 +42,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (size && error > size)
|
||||
error = -ERANGE;
|
||||
}
|
||||
@@ -362,7 +364,8 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
@@ -361,7 +363,8 @@ sys_fgetxattr(int fd, char __user *name,
|
||||
* Extended attribute LIST operations
|
||||
*/
|
||||
static ssize_t
|
||||
|
@ -52,7 +52,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
ssize_t error;
|
||||
char *klist = NULL;
|
||||
@@ -375,7 +378,7 @@ listxattr(struct dentry *d, char __user
|
||||
@@ -374,7 +377,7 @@ listxattr(struct dentry *d, char __user
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error > 0) {
|
||||
if (size && copy_to_user(list, klist, error))
|
||||
error = -EFAULT;
|
||||
@@ -397,7 +400,7 @@ sys_listxattr(char __user *path, char __
|
||||
@@ -396,7 +399,7 @@ sys_listxattr(char __user *path, char __
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -70,7 +70,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -411,7 +414,7 @@ sys_llistxattr(char __user *path, char _
|
||||
@@ -410,7 +413,7 @@ sys_llistxattr(char __user *path, char _
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -79,7 +79,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -426,7 +429,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
@@ -425,7 +428,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
if (!f)
|
||||
return error;
|
||||
audit_inode(NULL, f->f_path.dentry->d_inode);
|
||||
|
|
|
@ -36,7 +36,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1934,7 +1934,8 @@ asmlinkage long sys_mknod(const char __u
|
||||
@@ -1967,7 +1967,8 @@ asmlinkage long sys_mknod(const char __u
|
||||
return sys_mknodat(AT_FDCWD, filename, mode, dev);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = may_create(dir, dentry, NULL);
|
||||
|
||||
@@ -1978,7 +1979,7 @@ asmlinkage long sys_mkdirat(int dfd, con
|
||||
@@ -2011,7 +2012,7 @@ asmlinkage long sys_mkdirat(int dfd, con
|
||||
|
||||
if (!IS_POSIXACL(nd.dentry->d_inode))
|
||||
mode &= ~current->fs->umask;
|
||||
|
@ -69,7 +69,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
out_unlock:
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1131,6 +1131,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1140,6 +1140,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
int type, dev_t rdev, struct svc_fh *resfhp)
|
||||
{
|
||||
struct dentry *dentry, *dchild = NULL;
|
||||
|
@ -77,7 +77,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
struct inode *dirp;
|
||||
__be32 err;
|
||||
int host_err;
|
||||
@@ -1147,6 +1148,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1156,6 +1157,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
goto out;
|
||||
|
||||
dentry = fhp->fh_dentry;
|
||||
|
@ -85,7 +85,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
dirp = dentry->d_inode;
|
||||
|
||||
err = nfserr_notdir;
|
||||
@@ -1163,7 +1165,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1172,7 +1174,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
host_err = PTR_ERR(dchild);
|
||||
if (IS_ERR(dchild))
|
||||
goto out_nfserr;
|
||||
|
@ -94,7 +94,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (err)
|
||||
goto out;
|
||||
} else {
|
||||
@@ -1202,7 +1204,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1211,7 +1213,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);
|
||||
break;
|
||||
case S_IFDIR:
|
||||
|
@ -103,7 +103,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
break;
|
||||
case S_IFCHR:
|
||||
case S_IFBLK:
|
||||
@@ -1217,7 +1219,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1226,7 +1228,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
if (host_err < 0)
|
||||
goto out_nfserr;
|
||||
|
||||
|
@ -114,7 +114,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -993,7 +993,7 @@ extern void unlock_super(struct super_bl
|
||||
@@ -1010,7 +1010,7 @@ extern void unlock_super(struct super_bl
|
||||
*/
|
||||
extern int vfs_permission(struct nameidata *, int);
|
||||
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
|
||||
|
|
|
@ -36,7 +36,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1855,7 +1855,8 @@ fail:
|
||||
@@ -1888,7 +1888,8 @@ fail:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lookup_create);
|
||||
|
||||
|
@ -46,7 +46,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = may_create(dir, dentry, NULL);
|
||||
|
||||
@@ -1907,11 +1908,12 @@ asmlinkage long sys_mknodat(int dfd, con
|
||||
@@ -1940,11 +1941,12 @@ asmlinkage long sys_mknodat(int dfd, con
|
||||
error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd);
|
||||
break;
|
||||
case S_IFCHR: case S_IFBLK:
|
||||
|
@ -64,7 +64,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
error = -EPERM;
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1210,7 +1210,8 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
@@ -1219,7 +1219,8 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
case S_IFBLK:
|
||||
case S_IFIFO:
|
||||
case S_IFSOCK:
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
printk("nfsd: bad file type %o in nfsd_create\n", type);
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -994,7 +994,7 @@ extern void unlock_super(struct super_bl
|
||||
@@ -1011,7 +1011,7 @@ extern void unlock_super(struct super_bl
|
||||
extern int vfs_permission(struct nameidata *, int);
|
||||
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
|
||||
extern int vfs_mkdir(struct inode *, struct dentry *, struct vfsmount *, int);
|
||||
|
|
|
@ -56,7 +56,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_lock(&crypt_stat->cs_mutex);
|
||||
if (S_ISDIR(dentry->d_inode->i_mode))
|
||||
crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
|
||||
@@ -954,7 +956,7 @@ static int ecryptfs_setattr(struct dentr
|
||||
@@ -955,7 +957,7 @@ static int ecryptfs_setattr(struct dentr
|
||||
if (rc < 0)
|
||||
goto out;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
return rc;
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -1565,7 +1565,8 @@ int do_coredump(long signr, int exit_cod
|
||||
@@ -1796,7 +1796,8 @@ int do_coredump(long signr, int exit_cod
|
||||
goto close_fail;
|
||||
if (!file->f_op->write)
|
||||
goto close_fail;
|
||||
|
@ -101,7 +101,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
goto again;
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1598,7 +1598,8 @@ int may_open(struct nameidata *nd, int a
|
||||
@@ -1631,7 +1631,8 @@ int may_open(struct nameidata *nd, int a
|
||||
if (!error) {
|
||||
DQUOT_INIT(inode);
|
||||
|
||||
|
@ -113,7 +113,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (error)
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -358,7 +358,7 @@ nfsd_setattr(struct svc_rqst *rqstp, str
|
||||
@@ -375,7 +375,7 @@ nfsd_setattr(struct svc_rqst *rqstp, str
|
||||
err = nfserr_notsync;
|
||||
if (!check_guard || guardtime == inode->i_ctime.tv_sec) {
|
||||
fh_lock(fhp);
|
||||
|
@ -122,7 +122,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
err = nfserrno(host_err);
|
||||
fh_unlock(fhp);
|
||||
}
|
||||
@@ -909,13 +909,13 @@ out:
|
||||
@@ -918,13 +918,13 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
|
||||
@@ -983,7 +983,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
|
||||
|
||||
/* clear setuid/setgid flag after write */
|
||||
if (host_err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID)))
|
||||
|
@ -149,7 +149,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
static ino_t last_ino;
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -193,8 +193,8 @@ out:
|
||||
@@ -194,8 +194,8 @@ out:
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int err;
|
||||
struct iattr newattrs;
|
||||
@@ -214,7 +214,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
@@ -215,7 +215,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
newattrs.ia_valid |= should_remove_suid(dentry);
|
||||
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
|
@ -169,7 +169,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
return err;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ static long do_sys_truncate(const char _
|
||||
@@ -270,7 +270,7 @@ static long do_sys_truncate(const char _
|
||||
error = locks_verify_truncate(inode, NULL, length);
|
||||
if (!error) {
|
||||
DQUOT_INIT(inode);
|
||||
|
@ -178,7 +178,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
put_write_access(inode);
|
||||
|
||||
@@ -321,7 +321,8 @@ static long do_sys_ftruncate(unsigned in
|
||||
@@ -322,7 +322,8 @@ static long do_sys_ftruncate(unsigned in
|
||||
|
||||
error = locks_verify_truncate(inode, file, length);
|
||||
if (!error)
|
||||
|
@ -188,7 +188,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
out_putf:
|
||||
fput(file);
|
||||
out:
|
||||
@@ -521,7 +522,7 @@ asmlinkage long sys_fchmod(unsigned int
|
||||
@@ -580,7 +581,7 @@ asmlinkage long sys_fchmod(unsigned int
|
||||
mode = inode->i_mode;
|
||||
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
|
||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||
|
@ -197,7 +197,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&inode->i_mutex);
|
||||
|
||||
out_putf:
|
||||
@@ -556,7 +557,7 @@ asmlinkage long sys_fchmodat(int dfd, co
|
||||
@@ -615,7 +616,7 @@ asmlinkage long sys_fchmodat(int dfd, co
|
||||
mode = inode->i_mode;
|
||||
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
|
||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||
|
@ -206,7 +206,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&inode->i_mutex);
|
||||
|
||||
dput_and_out:
|
||||
@@ -570,7 +571,8 @@ asmlinkage long sys_chmod(const char __u
|
||||
@@ -629,7 +630,8 @@ asmlinkage long sys_chmod(const char __u
|
||||
return sys_fchmodat(AT_FDCWD, filename, mode);
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode * inode;
|
||||
int error;
|
||||
@@ -599,7 +601,7 @@ static int chown_common(struct dentry *
|
||||
@@ -658,7 +660,7 @@ static int chown_common(struct dentry *
|
||||
if (!S_ISDIR(inode->i_mode))
|
||||
newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
@ -225,7 +225,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&inode->i_mutex);
|
||||
out:
|
||||
return error;
|
||||
@@ -613,7 +615,7 @@ asmlinkage long sys_chown(const char __u
|
||||
@@ -672,7 +674,7 @@ asmlinkage long sys_chown(const char __u
|
||||
error = user_path_walk(filename, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -234,7 +234,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -633,7 +635,7 @@ asmlinkage long sys_fchownat(int dfd, co
|
||||
@@ -692,7 +694,7 @@ asmlinkage long sys_fchownat(int dfd, co
|
||||
error = __user_walk_fd(dfd, filename, follow, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -243,7 +243,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -647,7 +649,7 @@ asmlinkage long sys_lchown(const char __
|
||||
@@ -706,7 +708,7 @@ asmlinkage long sys_lchown(const char __
|
||||
error = user_path_walk_link(filename, &nd);
|
||||
if (error)
|
||||
goto out;
|
||||
|
@ -252,7 +252,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
out:
|
||||
return error;
|
||||
@@ -666,7 +668,7 @@ asmlinkage long sys_fchown(unsigned int
|
||||
@@ -725,7 +727,7 @@ asmlinkage long sys_fchown(unsigned int
|
||||
|
||||
dentry = file->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
|
@ -292,7 +292,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
out_dir:
|
||||
--- a/fs/sysfs/file.c
|
||||
+++ b/fs/sysfs/file.c
|
||||
@@ -523,7 +523,7 @@ int sysfs_chmod_file(struct kobject *kob
|
||||
@@ -524,7 +524,7 @@ int sysfs_chmod_file(struct kobject *kob
|
||||
mutex_lock(&inode->i_mutex);
|
||||
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
|
||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||
|
@ -344,7 +344,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (f)
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -1497,8 +1497,8 @@ static inline int break_lease(struct ino
|
||||
@@ -1404,8 +1404,8 @@ static inline int break_lease(struct ino
|
||||
|
||||
/* fs/open.c */
|
||||
|
||||
|
@ -355,7 +355,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
extern long do_sys_open(int fdf, const char __user *filename, int flags,
|
||||
int mode);
|
||||
extern struct file *filp_open(const char *, int, int);
|
||||
@@ -1651,7 +1651,7 @@ extern int do_remount_sb(struct super_bl
|
||||
@@ -1561,7 +1561,7 @@ extern int do_remount_sb(struct super_bl
|
||||
#ifdef CONFIG_BLOCK
|
||||
extern sector_t bmap(struct inode *, sector_t);
|
||||
#endif
|
||||
|
@ -366,7 +366,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
int (*check_acl)(struct inode *, int));
|
||||
--- a/mm/filemap.c
|
||||
+++ b/mm/filemap.c
|
||||
@@ -1890,7 +1890,7 @@ int __remove_suid(struct path *path, int
|
||||
@@ -1696,7 +1696,7 @@ int __remove_suid(struct path *path, int
|
||||
struct iattr newattrs;
|
||||
|
||||
newattrs.ia_valid = ATTR_FORCE | kill;
|
||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1973,6 +1973,7 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
|
||||
@@ -1988,6 +1988,7 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
|
||||
int
|
||||
nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
struct inode *inode = fhp->fh_dentry->d_inode;
|
||||
char *name;
|
||||
void *value = NULL;
|
||||
@@ -2005,14 +2006,14 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
@@ -2020,14 +2021,14 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
} else
|
||||
size = 0;
|
||||
|
||||
|
@ -44,7 +44,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -165,7 +165,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
@@ -164,7 +164,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
EXPORT_SYMBOL_GPL(vfs_listxattr);
|
||||
|
||||
int
|
||||
|
@ -53,7 +53,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
int error;
|
||||
@@ -438,7 +438,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
@@ -437,7 +437,7 @@ sys_flistxattr(int fd, char __user *list
|
||||
* Extended attribute REMOVE operations
|
||||
*/
|
||||
static long
|
||||
|
@ -62,7 +62,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error;
|
||||
char kname[XATTR_NAME_MAX + 1];
|
||||
@@ -449,7 +449,7 @@ removexattr(struct dentry *d, char __use
|
||||
@@ -448,7 +448,7 @@ removexattr(struct dentry *d, char __use
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
|
@ -71,7 +71,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
|
||||
asmlinkage long
|
||||
@@ -461,7 +461,7 @@ sys_removexattr(char __user *path, char
|
||||
@@ -460,7 +460,7 @@ sys_removexattr(char __user *path, char
|
||||
error = user_path_walk(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -80,7 +80,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ sys_lremovexattr(char __user *path, char
|
||||
@@ -474,7 +474,7 @@ sys_lremovexattr(char __user *path, char
|
||||
error = user_path_walk_link(path, &nd);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -89,7 +89,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
path_release(&nd);
|
||||
return error;
|
||||
}
|
||||
@@ -492,7 +492,7 @@ sys_fremovexattr(int fd, char __user *na
|
||||
@@ -491,7 +491,7 @@ sys_fremovexattr(int fd, char __user *na
|
||||
return error;
|
||||
dentry = f->f_path.dentry;
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
|
|
|
@ -45,7 +45,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2401,7 +2401,8 @@ asmlinkage long sys_link(const char __us
|
||||
@@ -2434,7 +2434,8 @@ asmlinkage long sys_link(const char __us
|
||||
* locking].
|
||||
*/
|
||||
static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = 0;
|
||||
struct inode *target;
|
||||
@@ -2444,7 +2445,8 @@ static int vfs_rename_dir(struct inode *
|
||||
@@ -2477,7 +2478,8 @@ static int vfs_rename_dir(struct inode *
|
||||
}
|
||||
|
||||
static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
struct inode *target;
|
||||
int error;
|
||||
@@ -2472,7 +2474,8 @@ static int vfs_rename_other(struct inode
|
||||
@@ -2505,7 +2507,8 @@ static int vfs_rename_other(struct inode
|
||||
}
|
||||
|
||||
int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
|
@ -75,7 +75,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error;
|
||||
int is_dir = S_ISDIR(old_dentry->d_inode->i_mode);
|
||||
@@ -2501,9 +2504,11 @@ int vfs_rename(struct inode *old_dir, st
|
||||
@@ -2534,9 +2537,11 @@ int vfs_rename(struct inode *old_dir, st
|
||||
old_name = fsnotify_oldname_init(old_dentry->d_name.name);
|
||||
|
||||
if (is_dir)
|
||||
|
@ -89,7 +89,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (!error) {
|
||||
const char *new_name = old_dentry->d_name.name;
|
||||
fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
|
||||
@@ -2575,8 +2580,8 @@ static int do_rename(int olddfd, const c
|
||||
@@ -2608,8 +2613,8 @@ static int do_rename(int olddfd, const c
|
||||
if (new_dentry == trap)
|
||||
goto exit5;
|
||||
|
||||
|
@ -102,7 +102,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
exit4:
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1646,7 +1646,8 @@ nfsd_rename(struct svc_rqst *rqstp, stru
|
||||
@@ -1655,7 +1655,8 @@ nfsd_rename(struct svc_rqst *rqstp, stru
|
||||
host_err = -EPERM;
|
||||
} else
|
||||
#endif
|
||||
|
@ -114,7 +114,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (!host_err)
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -999,7 +999,7 @@ extern int vfs_symlink(struct inode *, s
|
||||
@@ -1016,7 +1016,7 @@ extern int vfs_symlink(struct inode *, s
|
||||
extern int vfs_link(struct dentry *, struct vfsmount *, struct inode *, struct dentry *, struct vfsmount *);
|
||||
extern int vfs_rmdir(struct inode *, struct dentry *, struct vfsmount *);
|
||||
extern int vfs_unlink(struct inode *, struct dentry *, struct vfsmount *);
|
||||
|
|
|
@ -39,7 +39,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
d_delete(lower_dentry);
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2024,7 +2024,7 @@ void dentry_unhash(struct dentry *dentry
|
||||
@@ -2057,7 +2057,7 @@ void dentry_unhash(struct dentry *dentry
|
||||
spin_unlock(&dcache_lock);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = may_delete(dir, dentry, 1);
|
||||
|
||||
@@ -2088,7 +2088,7 @@ static long do_rmdir(int dfd, const char
|
||||
@@ -2121,7 +2121,7 @@ static long do_rmdir(int dfd, const char
|
||||
error = PTR_ERR(dentry);
|
||||
if (IS_ERR(dentry))
|
||||
goto exit2;
|
||||
|
@ -70,7 +70,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1682,6 +1682,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
@@ -1691,6 +1691,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
char *fname, int flen)
|
||||
{
|
||||
struct dentry *dentry, *rdentry;
|
||||
|
@ -78,7 +78,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
struct inode *dirp;
|
||||
__be32 err;
|
||||
int host_err;
|
||||
@@ -1696,6 +1697,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
@@ -1705,6 +1706,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
fh_lock_nested(fhp, I_MUTEX_PARENT);
|
||||
dentry = fhp->fh_dentry;
|
||||
dirp = dentry->d_inode;
|
||||
|
@ -86,7 +86,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
|
||||
rdentry = lookup_one_len(fname, dentry, flen);
|
||||
host_err = PTR_ERR(rdentry);
|
||||
@@ -1713,21 +1715,21 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
@@ -1722,21 +1724,21 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
|
||||
if (type != S_IFDIR) { /* It's UNLINK */
|
||||
#ifdef MSNFS
|
||||
|
@ -124,7 +124,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
} else {
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -997,7 +997,7 @@ extern int vfs_mkdir(struct inode *, str
|
||||
@@ -1014,7 +1014,7 @@ extern int vfs_mkdir(struct inode *, str
|
||||
extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount *, int, dev_t);
|
||||
extern int vfs_symlink(struct inode *, struct dentry *, struct vfsmount *, const char *, int);
|
||||
extern int vfs_link(struct dentry *, struct vfsmount *, struct inode *, struct dentry *, struct vfsmount *);
|
||||
|
|
|
@ -44,7 +44,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (rc || !lower_dentry->d_inode)
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2203,7 +2203,8 @@ asmlinkage long sys_unlink(const char __
|
||||
@@ -2236,7 +2236,8 @@ asmlinkage long sys_unlink(const char __
|
||||
return do_unlinkat(AT_FDCWD, pathname);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = may_create(dir, dentry, NULL);
|
||||
|
||||
@@ -2249,7 +2250,8 @@ asmlinkage long sys_symlinkat(const char
|
||||
@@ -2282,7 +2283,8 @@ asmlinkage long sys_symlinkat(const char
|
||||
if (IS_ERR(dentry))
|
||||
goto out_unlock;
|
||||
|
||||
|
@ -66,7 +66,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1452,6 +1452,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
@@ -1461,6 +1461,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
struct iattr *iap)
|
||||
{
|
||||
struct dentry *dentry, *dnew;
|
||||
|
@ -74,7 +74,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
__be32 err, cerr;
|
||||
int host_err;
|
||||
umode_t mode;
|
||||
@@ -1478,6 +1479,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
@@ -1487,6 +1488,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
if (iap && (iap->ia_valid & ATTR_MODE))
|
||||
mode = iap->ia_mode & S_IALLUGO;
|
||||
|
||||
|
@ -82,7 +82,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
if (unlikely(path[plen] != 0)) {
|
||||
char *path_alloced = kmalloc(plen+1, GFP_KERNEL);
|
||||
if (path_alloced == NULL)
|
||||
@@ -1485,20 +1487,22 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
@@ -1494,20 +1496,22 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
else {
|
||||
strncpy(path_alloced, path, plen);
|
||||
path_alloced[plen] = 0;
|
||||
|
@ -111,7 +111,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
out:
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -995,7 +995,7 @@ extern int vfs_permission(struct nameida
|
||||
@@ -1012,7 +1012,7 @@ extern int vfs_permission(struct nameida
|
||||
extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
|
||||
extern int vfs_mkdir(struct inode *, struct dentry *, struct vfsmount *, int);
|
||||
extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount *, int, dev_t);
|
||||
|
|
|
@ -34,7 +34,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
goto out_unlock;
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -2105,7 +2105,7 @@ asmlinkage long sys_rmdir(const char __u
|
||||
@@ -2138,7 +2138,7 @@ asmlinkage long sys_rmdir(const char __u
|
||||
return do_rmdir(AT_FDCWD, pathname);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
{
|
||||
int error = may_delete(dir, dentry, 0);
|
||||
|
||||
@@ -2169,7 +2169,7 @@ static long do_unlinkat(int dfd, const c
|
||||
@@ -2202,7 +2202,7 @@ static long do_unlinkat(int dfd, const c
|
||||
inode = dentry->d_inode;
|
||||
if (inode)
|
||||
atomic_inc(&inode->i_count);
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/fs/nfsd/vfs.c
|
||||
+++ b/fs/nfsd/vfs.c
|
||||
@@ -1720,7 +1720,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
@@ -1729,7 +1729,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
host_err = -EPERM;
|
||||
} else
|
||||
#endif
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: John Johansen <jjohansen@suse.de>
|
|||
}
|
||||
--- a/include/linux/fs.h
|
||||
+++ b/include/linux/fs.h
|
||||
@@ -998,7 +998,7 @@ extern int vfs_mknod(struct inode *, str
|
||||
@@ -1015,7 +1015,7 @@ extern int vfs_mknod(struct inode *, str
|
||||
extern int vfs_symlink(struct inode *, struct dentry *, struct vfsmount *, const char *, int);
|
||||
extern int vfs_link(struct dentry *, struct vfsmount *, struct inode *, struct dentry *, struct vfsmount *);
|
||||
extern int vfs_rmdir(struct inode *, struct dentry *, struct vfsmount *);
|
||||
|
|
Loading…
Add table
Reference in a new issue