mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
106 lines
4.5 KiB
Diff
106 lines
4.5 KiB
Diff
Index: linux-2.6.19/fs/xattr.c
|
|
===================================================================
|
|
--- linux-2.6.19.orig/fs/xattr.c
|
|
+++ linux-2.6.19/fs/xattr.c
|
|
@@ -178,7 +178,7 @@ vfs_removexattr(struct vfsmount *mnt, st
|
|
if (error)
|
|
return error;
|
|
|
|
- error = security_inode_removexattr(dentry, name);
|
|
+ error = security_inode_removexattr(mnt, dentry, name);
|
|
if (error)
|
|
return error;
|
|
|
|
Index: linux-2.6.19/include/linux/security.h
|
|
===================================================================
|
|
--- linux-2.6.19.orig/include/linux/security.h
|
|
+++ linux-2.6.19/include/linux/security.h
|
|
@@ -50,7 +50,7 @@ extern int cap_bprm_set_security (struct
|
|
extern void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe);
|
|
extern int cap_bprm_secureexec(struct linux_binprm *bprm);
|
|
extern int cap_inode_setxattr(struct vfsmount *mnt, struct dentry *dentry, char *name, void *value, size_t size, int flags);
|
|
-extern int cap_inode_removexattr(struct dentry *dentry, char *name);
|
|
+extern int cap_inode_removexattr(struct vfsmount *mnt, struct dentry *dentry, char *name);
|
|
extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
|
|
extern void cap_task_reparent_to_init (struct task_struct *p);
|
|
extern int cap_syslog (int type);
|
|
@@ -1257,7 +1257,8 @@ struct security_operations {
|
|
int (*inode_getxattr) (struct vfsmount *mnt, struct dentry *dentry,
|
|
char *name);
|
|
int (*inode_listxattr) (struct vfsmount *mnt, struct dentry *dentry);
|
|
- int (*inode_removexattr) (struct dentry *dentry, char *name);
|
|
+ int (*inode_removexattr) (struct vfsmount *mnt, struct dentry *dentry,
|
|
+ char *name);
|
|
const char *(*inode_xattr_getsuffix) (void);
|
|
int (*inode_getsecurity)(const struct inode *inode, const char *name, void *buffer, size_t size, int err);
|
|
int (*inode_setsecurity)(struct inode *inode, const char *name, const void *value, size_t size, int flags);
|
|
@@ -1804,11 +1805,12 @@ static inline int security_inode_listxat
|
|
return security_ops->inode_listxattr (mnt, dentry);
|
|
}
|
|
|
|
-static inline int security_inode_removexattr (struct dentry *dentry, char *name)
|
|
+static inline int security_inode_removexattr (struct vfsmount *mnt,
|
|
+ struct dentry *dentry, char *name)
|
|
{
|
|
if (unlikely (IS_PRIVATE (dentry->d_inode)))
|
|
return 0;
|
|
- return security_ops->inode_removexattr (dentry, name);
|
|
+ return security_ops->inode_removexattr (mnt, dentry, name);
|
|
}
|
|
|
|
static inline const char *security_inode_xattr_getsuffix(void)
|
|
@@ -2504,9 +2506,10 @@ static inline int security_inode_listxat
|
|
return 0;
|
|
}
|
|
|
|
-static inline int security_inode_removexattr (struct dentry *dentry, char *name)
|
|
+static inline int security_inode_removexattr (struct vfsmount *mnt,
|
|
+ struct dentry *dentry, char *name)
|
|
{
|
|
- return cap_inode_removexattr(dentry, name);
|
|
+ return cap_inode_removexattr(mnt, dentry, name);
|
|
}
|
|
|
|
static inline const char *security_inode_xattr_getsuffix (void)
|
|
Index: linux-2.6.19/security/commoncap.c
|
|
===================================================================
|
|
--- linux-2.6.19.orig/security/commoncap.c
|
|
+++ linux-2.6.19/security/commoncap.c
|
|
@@ -201,7 +201,8 @@ int cap_inode_setxattr(struct vfsmount *
|
|
return 0;
|
|
}
|
|
|
|
-int cap_inode_removexattr(struct dentry *dentry, char *name)
|
|
+int cap_inode_removexattr(struct vfsmount *mnt, struct dentry *dentry,
|
|
+ char *name)
|
|
{
|
|
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|
|
sizeof(XATTR_SECURITY_PREFIX) - 1) &&
|
|
Index: linux-2.6.19/security/dummy.c
|
|
===================================================================
|
|
--- linux-2.6.19.orig/security/dummy.c
|
|
+++ linux-2.6.19/security/dummy.c
|
|
@@ -377,7 +377,8 @@ static int dummy_inode_listxattr (struct
|
|
return 0;
|
|
}
|
|
|
|
-static int dummy_inode_removexattr (struct dentry *dentry, char *name)
|
|
+static int dummy_inode_removexattr (struct vfsmount *mnt, struct dentry *dentry,
|
|
+ char *name)
|
|
{
|
|
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|
|
sizeof(XATTR_SECURITY_PREFIX) - 1) &&
|
|
Index: linux-2.6.19/security/selinux/hooks.c
|
|
===================================================================
|
|
--- linux-2.6.19.orig/security/selinux/hooks.c
|
|
+++ linux-2.6.19/security/selinux/hooks.c
|
|
@@ -2354,7 +2354,8 @@ static int selinux_inode_listxattr (stru
|
|
return dentry_has_perm(current, NULL, dentry, FILE__GETATTR);
|
|
}
|
|
|
|
-static int selinux_inode_removexattr (struct dentry *dentry, char *name)
|
|
+static int selinux_inode_removexattr (struct vfsmount *mnt,
|
|
+ struct dentry *dentry, char *name)
|
|
{
|
|
if (strcmp(name, XATTR_NAME_SELINUX)) {
|
|
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|