mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
- Update and rediff against latest git (no real actual changes except
for removing an unused variable that apparmor-percpu_path_cache.diff added).
This commit is contained in:
@@ -12,11 +12,11 @@ Patch is not in mainline -- pending AppArmor code submission to lkml
|
||||
kernel/audit.c | 6 ++++--
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: linux-2.6.19/include/linux/audit.h
|
||||
Index: linux-2.6/include/linux/audit.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/include/linux/audit.h
|
||||
+++ linux-2.6.19/include/linux/audit.h
|
||||
@@ -106,6 +106,8 @@
|
||||
--- linux-2.6.orig/include/linux/audit.h
|
||||
+++ linux-2.6/include/linux/audit.h
|
||||
@@ -110,6 +110,8 @@
|
||||
#define AUDIT_LAST_KERN_ANOM_MSG 1799
|
||||
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
|
||||
|
||||
@@ -25,7 +25,7 @@ Index: linux-2.6.19/include/linux/audit.h
|
||||
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
|
||||
|
||||
/* Rule flags */
|
||||
@@ -472,6 +474,9 @@ extern void audit_log(struct audit_
|
||||
@@ -478,6 +480,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);
|
||||
@@ -35,11 +35,11 @@ Index: linux-2.6.19/include/linux/audit.h
|
||||
extern void audit_log_format(struct audit_buffer *ab,
|
||||
const char *fmt, ...)
|
||||
__attribute__((format(printf,2,3)));
|
||||
Index: linux-2.6.19/kernel/audit.c
|
||||
Index: linux-2.6/kernel/audit.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/kernel/audit.c
|
||||
+++ linux-2.6.19/kernel/audit.c
|
||||
@@ -955,8 +955,7 @@ static inline int audit_expand(struct au
|
||||
--- linux-2.6.orig/kernel/audit.c
|
||||
+++ linux-2.6/kernel/audit.c
|
||||
@@ -956,8 +956,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.
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ Index: linux-2.6.19/kernel/audit.c
|
||||
{
|
||||
int len, avail;
|
||||
struct sk_buff *skb;
|
||||
@@ -1212,3 +1211,6 @@ EXPORT_SYMBOL(audit_log_start);
|
||||
@@ -1213,3 +1212,6 @@ EXPORT_SYMBOL(audit_log_start);
|
||||
EXPORT_SYMBOL(audit_log_end);
|
||||
EXPORT_SYMBOL(audit_log_format);
|
||||
EXPORT_SYMBOL(audit_log);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6.19/security/apparmor/lsm.c
|
||||
@@ -23,6 +23,15 @@
|
||||
--- linux-2.6.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -24,6 +24,15 @@
|
||||
/* struct subdomain write update lock (read side is RCU). */
|
||||
spinlock_t sd_lock = SPIN_LOCK_UNLOCKED;
|
||||
|
||||
@@ -18,7 +18,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
/* Flag values, also controllable via apparmorfs/control.
|
||||
* We explicitly do not allow these to be modifiable when exported via
|
||||
* /sys/modules/parameters, as we want to do additional mediation and
|
||||
@@ -831,6 +840,11 @@ static int __init apparmor_init(void)
|
||||
@@ -833,6 +842,11 @@ static int __init apparmor_init(void)
|
||||
int error;
|
||||
const char *complainmsg = ": complainmode enabled";
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19/security/apparmor/Kconfig
|
||||
Index: linux-2.6/security/apparmor/Kconfig
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/Kconfig
|
||||
+++ linux-2.6.19/security/apparmor/Kconfig
|
||||
--- linux-2.6.orig/security/apparmor/Kconfig
|
||||
+++ linux-2.6/security/apparmor/Kconfig
|
||||
@@ -1,8 +1,9 @@
|
||||
config SECURITY_APPARMOR
|
||||
- tristate "AppArmor support"
|
||||
@@ -15,11 +15,11 @@ Index: linux-2.6.19/security/apparmor/Kconfig
|
||||
Required userspace tools (if they are not included in your
|
||||
distribution) and further information may be found at
|
||||
<http://forge.novell.com/modules/xfmod/project/?apparmor>
|
||||
Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6.19/security/apparmor/lsm.c
|
||||
@@ -53,36 +53,6 @@ int apparmor_logsyscall = 0;
|
||||
--- linux-2.6.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -54,36 +54,6 @@ int apparmor_logsyscall = 0;
|
||||
module_param_named(logsyscall, apparmor_logsyscall, int, S_IRUSR);
|
||||
MODULE_PARM_DESC(apparmor_logsyscall, "Toggle AppArmor logsyscall mode");
|
||||
|
||||
@@ -56,7 +56,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
static int apparmor_ptrace(struct task_struct *parent,
|
||||
struct task_struct *child)
|
||||
{
|
||||
@@ -895,67 +865,4 @@ createfs_out:
|
||||
@@ -897,67 +867,4 @@ createfs_out:
|
||||
|
||||
}
|
||||
|
||||
@@ -124,10 +124,10 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
-MODULE_DESCRIPTION("AppArmor process confinement");
|
||||
-MODULE_AUTHOR("Tony Jones <tonyj@suse.de>");
|
||||
-MODULE_LICENSE("GPL");
|
||||
Index: linux-2.6.19/security/Makefile
|
||||
Index: linux-2.6/security/Makefile
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/Makefile
|
||||
+++ linux-2.6.19/security/Makefile
|
||||
--- linux-2.6.orig/security/Makefile
|
||||
+++ linux-2.6/security/Makefile
|
||||
@@ -16,7 +16,7 @@ obj-$(CONFIG_SECURITY) += security.o d
|
||||
# Must precede capability.o in order to stack properly.
|
||||
obj-$(CONFIG_SECURITY_SELINUX) += selinux/built-in.o
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/main.c
|
||||
+++ linux-2.6.19.1/security/apparmor/main.c
|
||||
--- linux-2.6.orig/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -804,6 +804,7 @@ char *aa_get_name(struct dentry *dentry,
|
||||
{
|
||||
char *buffer, *name;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/security/apparmor/match/Kbuild
|
||||
Index: linux-2.6/security/apparmor/match/Kbuild
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/match/Kbuild
|
||||
+++ linux-2.6.19.1/security/apparmor/match/Kbuild
|
||||
--- linux-2.6.orig/security/apparmor/match/Kbuild
|
||||
+++ linux-2.6/security/apparmor/match/Kbuild
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile for AppArmor aamatch submodule
|
||||
#
|
||||
@@ -11,10 +11,10 @@ Index: linux-2.6.19.1/security/apparmor/match/Kbuild
|
||||
|
||||
-aamatch_pcre-y := match_pcre.o pcre_exec.o
|
||||
+aamatch_dfa-y := match_dfa.o
|
||||
Index: linux-2.6.19.1/security/apparmor/match/match_dfa.c
|
||||
Index: linux-2.6/security/apparmor/match/match_dfa.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19.1/security/apparmor/match/match_dfa.c
|
||||
+++ linux-2.6/security/apparmor/match/match_dfa.c
|
||||
@@ -0,0 +1,398 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -414,10 +414,10 @@ Index: linux-2.6.19.1/security/apparmor/match/match_dfa.c
|
||||
+MODULE_DESCRIPTION("AppArmor aa_match module [dfa]");
|
||||
+MODULE_AUTHOR("John Johansen <jjohansen@suse.de>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
Index: linux-2.6.19.1/security/apparmor/module_interface.c
|
||||
Index: linux-2.6/security/apparmor/module_interface.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/module_interface.c
|
||||
+++ linux-2.6.19.1/security/apparmor/module_interface.c
|
||||
--- linux-2.6.orig/security/apparmor/module_interface.c
|
||||
+++ linux-2.6/security/apparmor/module_interface.c
|
||||
@@ -206,6 +206,7 @@ static void aaconvert(enum aa_code code,
|
||||
*(u16 *)dest = le16_to_cpu(get_unaligned((u16 *)src));
|
||||
break;
|
||||
@@ -465,10 +465,10 @@ Index: linux-2.6.19.1/security/apparmor/module_interface.c
|
||||
free_aa_entry(entry);
|
||||
return NULL;
|
||||
}
|
||||
Index: linux-2.6.19.1/security/apparmor/module_interface.h
|
||||
Index: linux-2.6/security/apparmor/module_interface.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/module_interface.h
|
||||
+++ linux-2.6.19.1/security/apparmor/module_interface.h
|
||||
--- linux-2.6.orig/security/apparmor/module_interface.h
|
||||
+++ linux-2.6/security/apparmor/module_interface.h
|
||||
@@ -20,6 +20,7 @@ enum aa_code {
|
||||
AA_LIST,
|
||||
AA_LISTEND,
|
||||
@@ -477,10 +477,10 @@ Index: linux-2.6.19.1/security/apparmor/module_interface.h
|
||||
AA_BAD
|
||||
};
|
||||
|
||||
Index: linux-2.6.19.1/security/apparmor/shared.h
|
||||
Index: linux-2.6/security/apparmor/shared.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/shared.h
|
||||
+++ linux-2.6.19.1/security/apparmor/shared.h
|
||||
--- linux-2.6.orig/security/apparmor/shared.h
|
||||
+++ linux-2.6/security/apparmor/shared.h
|
||||
@@ -28,6 +28,9 @@
|
||||
#define POS_AA_EXEC_UNSAFE (POS_AA_EXEC_MMAP + 1)
|
||||
#define POS_AA_FILE_MAX POS_AA_EXEC_UNSAFE
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19/security/Kconfig
|
||||
Index: linux-2.6/security/Kconfig
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/Kconfig
|
||||
+++ linux-2.6.19/security/Kconfig
|
||||
--- linux-2.6.orig/security/Kconfig
|
||||
+++ linux-2.6/security/Kconfig
|
||||
@@ -94,6 +94,7 @@ config SECURITY_ROOTPLUG
|
||||
If you are unsure how to answer this question, answer N.
|
||||
|
||||
@@ -10,10 +10,10 @@ Index: linux-2.6.19/security/Kconfig
|
||||
|
||||
endmenu
|
||||
|
||||
Index: linux-2.6.19/security/Makefile
|
||||
Index: linux-2.6/security/Makefile
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/Makefile
|
||||
+++ linux-2.6.19/security/Makefile
|
||||
--- linux-2.6.orig/security/Makefile
|
||||
+++ linux-2.6/security/Makefile
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
obj-$(CONFIG_KEYS) += keys/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/main.c
|
||||
+++ linux-2.6.19.1/security/apparmor/main.c
|
||||
--- linux-2.6.orig/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -61,7 +61,7 @@ static inline int aa_taskattr_access(con
|
||||
static inline int aa_file_mode(struct aaprofile *profile, const char *name)
|
||||
{
|
||||
@@ -171,10 +171,10 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
|
||||
done:
|
||||
return error;
|
||||
Index: linux-2.6.19.1/security/apparmor/match/match.h
|
||||
Index: linux-2.6/security/apparmor/match/match.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/match/match.h
|
||||
+++ linux-2.6.19.1/security/apparmor/match/match.h
|
||||
--- linux-2.6.orig/security/apparmor/match/match.h
|
||||
+++ linux-2.6/security/apparmor/match/match.h
|
||||
@@ -69,16 +69,11 @@ extern int aamatch_serialize(void *entry
|
||||
|
||||
/**
|
||||
@@ -231,10 +231,10 @@ Index: linux-2.6.19.1/security/apparmor/match/match.h
|
||||
}
|
||||
|
||||
#endif /* __MATCH_H */
|
||||
Index: linux-2.6.19.1/security/apparmor/match/match_default.c
|
||||
Index: linux-2.6/security/apparmor/match/match_default.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/match/match_default.c
|
||||
+++ linux-2.6.19.1/security/apparmor/match/match_default.c
|
||||
--- linux-2.6.orig/security/apparmor/match/match_default.c
|
||||
+++ linux-2.6/security/apparmor/match/match_default.c
|
||||
@@ -36,12 +36,11 @@ int aamatch_serialize(void *entry_extrad
|
||||
return 0;
|
||||
}
|
||||
@@ -250,10 +250,10 @@ Index: linux-2.6.19.1/security/apparmor/match/match_default.c
|
||||
|
||||
return ret;
|
||||
}
|
||||
Index: linux-2.6.19.1/security/apparmor/match/match_pcre.c
|
||||
Index: linux-2.6/security/apparmor/match/match_pcre.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/match/match_pcre.c
|
||||
+++ linux-2.6.19.1/security/apparmor/match/match_pcre.c
|
||||
--- linux-2.6.orig/security/apparmor/match/match_pcre.c
|
||||
+++ linux-2.6/security/apparmor/match/match_pcre.c
|
||||
@@ -132,27 +132,26 @@ done:
|
||||
return error;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
Index: linux-2.6/security/apparmor/apparmor.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6.19/security/apparmor/apparmor.h
|
||||
--- linux-2.6.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6/security/apparmor/apparmor.h
|
||||
@@ -25,17 +25,6 @@ extern int apparmor_debug;
|
||||
extern int apparmor_audit;
|
||||
extern int apparmor_logsyscall;
|
||||
@@ -52,11 +52,11 @@ Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
/**
|
||||
* struct subdomain - primary label for confined tasks
|
||||
* @active: the current active profile
|
||||
Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6.19/security/apparmor/lsm.c
|
||||
@@ -202,6 +202,9 @@ static int apparmor_sb_mount(char *dev_n
|
||||
--- linux-2.6.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -203,6 +203,9 @@ static int apparmor_sb_mount(char *dev_n
|
||||
if (active) {
|
||||
error = aa_audit_syscallreject(active, GFP_KERNEL, "mount");
|
||||
WARN_ON(error != -EPERM);
|
||||
@@ -66,7 +66,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
}
|
||||
|
||||
put_aaprofile(active);
|
||||
@@ -219,6 +222,8 @@ static int apparmor_umount(struct vfsmou
|
||||
@@ -220,6 +223,8 @@ static int apparmor_umount(struct vfsmou
|
||||
if (active) {
|
||||
error = aa_audit_syscallreject(active, GFP_ATOMIC, "umount");
|
||||
WARN_ON(error != -EPERM);
|
||||
@@ -75,7 +75,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
}
|
||||
|
||||
put_aaprofile(active);
|
||||
@@ -226,13 +231,13 @@ static int apparmor_umount(struct vfsmou
|
||||
@@ -227,13 +232,13 @@ static int apparmor_umount(struct vfsmou
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -246,13 +251,13 @@ out:
|
||||
@@ -247,13 +252,13 @@ out:
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -287,14 +292,14 @@ out:
|
||||
@@ -288,14 +293,14 @@ out:
|
||||
}
|
||||
|
||||
static int apparmor_inode_link(struct dentry *old_dentry,
|
||||
@@ -124,7 +124,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -316,7 +321,7 @@ static int apparmor_inode_unlink(struct
|
||||
@@ -317,7 +322,7 @@ static int apparmor_inode_unlink(struct
|
||||
struct aaprofile *active;
|
||||
int error = 0;
|
||||
|
||||
@@ -133,7 +133,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -330,13 +335,13 @@ out:
|
||||
@@ -331,13 +336,13 @@ out:
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -350,10 +355,10 @@ out:
|
||||
@@ -351,10 +356,10 @@ out:
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
struct dentry *new_dentry,
|
||||
struct vfsmount *new_mnt)
|
||||
{
|
||||
@@ -366,11 +371,12 @@ static int apparmor_inode_rename(struct
|
||||
@@ -367,11 +372,12 @@ static int apparmor_inode_rename(struct
|
||||
active = get_active_aaprofile();
|
||||
|
||||
if (active) {
|
||||
@@ -177,7 +177,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
error = aa_perm(active, new_dentry, new_mnt,
|
||||
MAY_WRITE);
|
||||
}
|
||||
@@ -389,7 +395,7 @@ static int apparmor_inode_permission(str
|
||||
@@ -390,7 +396,7 @@ static int apparmor_inode_permission(str
|
||||
/* Do not perform check on pipes or sockets
|
||||
* Same as apparmor_file_permission
|
||||
*/
|
||||
@@ -186,7 +186,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
struct aaprofile *active;
|
||||
|
||||
active = get_active_aaprofile();
|
||||
@@ -405,23 +411,21 @@ static int apparmor_inode_setattr(struct
|
||||
@@ -406,23 +412,21 @@ static int apparmor_inode_setattr(struct
|
||||
struct iattr *iattr)
|
||||
{
|
||||
int error = 0;
|
||||
@@ -220,7 +220,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
|
||||
out:
|
||||
return error;
|
||||
@@ -432,19 +436,16 @@ static int apparmor_inode_setxattr(struc
|
||||
@@ -433,19 +437,16 @@ static int apparmor_inode_setxattr(struc
|
||||
int flags)
|
||||
{
|
||||
int error = 0;
|
||||
@@ -247,7 +247,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
|
||||
out:
|
||||
return error;
|
||||
@@ -454,19 +455,17 @@ static int apparmor_inode_getxattr(struc
|
||||
@@ -455,19 +456,17 @@ static int apparmor_inode_getxattr(struc
|
||||
char *name)
|
||||
{
|
||||
int error = 0;
|
||||
@@ -274,7 +274,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
|
||||
out:
|
||||
return error;
|
||||
@@ -474,19 +473,16 @@ out:
|
||||
@@ -475,19 +474,16 @@ out:
|
||||
static int apparmor_inode_listxattr(struct dentry *dentry, struct vfsmount *mnt)
|
||||
{
|
||||
int error = 0;
|
||||
@@ -301,7 +301,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
|
||||
out:
|
||||
return error;
|
||||
@@ -496,19 +492,16 @@ static int apparmor_inode_removexattr(st
|
||||
@@ -497,19 +493,16 @@ static int apparmor_inode_removexattr(st
|
||||
struct vfsmount *mnt, char *name)
|
||||
{
|
||||
int error = 0;
|
||||
@@ -328,7 +328,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
|
||||
out:
|
||||
return error;
|
||||
@@ -517,55 +510,36 @@ out:
|
||||
@@ -518,55 +511,36 @@ out:
|
||||
static int apparmor_file_permission(struct file *file, int mask)
|
||||
{
|
||||
struct aaprofile *active;
|
||||
@@ -396,7 +396,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
}
|
||||
|
||||
static inline int aa_mmap(struct file *file, unsigned long prot,
|
||||
@@ -573,12 +547,10 @@ static inline int aa_mmap(struct file *f
|
||||
@@ -574,12 +548,10 @@ static inline int aa_mmap(struct file *f
|
||||
{
|
||||
int error = 0, mask = 0;
|
||||
struct aaprofile *active;
|
||||
@@ -410,7 +410,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
goto out;
|
||||
|
||||
if (prot & PROT_READ)
|
||||
@@ -637,17 +609,6 @@ static void apparmor_task_reparent_to_in
|
||||
@@ -638,17 +610,6 @@ static void apparmor_task_reparent_to_in
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
static int apparmor_getprocattr(struct task_struct *p, char *name, void *value,
|
||||
size_t size)
|
||||
{
|
||||
@@ -830,8 +791,6 @@ struct security_operations apparmor_ops
|
||||
@@ -831,8 +792,6 @@ struct security_operations apparmor_ops
|
||||
.task_post_setuid = apparmor_task_post_setuid,
|
||||
.task_reparent_to_init = apparmor_task_reparent_to_init,
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
Index: linux-2.6/security/apparmor/apparmor.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
--- linux-2.6.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6/security/apparmor/apparmor.h
|
||||
@@ -255,7 +255,8 @@ extern int aa_audit_message(struct aapro
|
||||
extern int aa_audit_syscallreject(struct aaprofile *active, gfp_t gfp,
|
||||
const char *);
|
||||
@@ -12,10 +12,10 @@ Index: linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
|
||||
extern int aa_attr(struct aaprofile *active, struct dentry *dentry,
|
||||
struct vfsmount *mnt, struct iattr *iattr);
|
||||
Index: linux-2.6.19.1/security/apparmor/inline.h
|
||||
Index: linux-2.6/security/apparmor/inline.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6.19.1/security/apparmor/inline.h
|
||||
--- linux-2.6.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6/security/apparmor/inline.h
|
||||
@@ -220,9 +220,12 @@ static inline struct aaprofile *alloc_aa
|
||||
* Release space (free_page) allocated to hold pathname
|
||||
* name may be NULL (checked for by free_page)
|
||||
@@ -31,10 +31,10 @@ Index: linux-2.6.19.1/security/apparmor/inline.h
|
||||
}
|
||||
|
||||
/** __aa_find_profile
|
||||
Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/main.c
|
||||
+++ linux-2.6.19.1/security/apparmor/main.c
|
||||
--- linux-2.6.orig/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -454,8 +454,9 @@ static int _aa_perm_vfsmount(struct aapr
|
||||
struct vfsmount *mnt, struct aa_audit *sa, int mask)
|
||||
{
|
||||
@@ -109,15 +109,7 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -902,6 +915,7 @@ int aa_perm(struct aaprofile *active, st
|
||||
{
|
||||
int error = 0;
|
||||
struct aa_audit sa;
|
||||
+ char *addr;
|
||||
|
||||
if ((mask = aa_filter_mask(mask, dentry->d_inode)) == 0)
|
||||
goto out;
|
||||
@@ -986,9 +1000,10 @@ int aa_link(struct aaprofile *active,
|
||||
@@ -986,9 +999,10 @@ int aa_link(struct aaprofile *active,
|
||||
{
|
||||
int permerror = -EPERM, error;
|
||||
struct aa_audit sa;
|
||||
@@ -130,7 +122,7 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
|
||||
if (IS_ERR(sa.name)) {
|
||||
permerror = PTR_ERR(sa.name);
|
||||
@@ -1010,8 +1025,8 @@ int aa_link(struct aaprofile *active,
|
||||
@@ -1010,8 +1024,8 @@ int aa_link(struct aaprofile *active,
|
||||
|
||||
error = aa_audit(active, &sa);
|
||||
|
||||
@@ -141,7 +133,7 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -1078,6 +1093,7 @@ int aa_fork(struct task_struct *p)
|
||||
@@ -1078,6 +1092,7 @@ int aa_fork(struct task_struct *p)
|
||||
int aa_register(struct linux_binprm *bprm)
|
||||
{
|
||||
char *filename;
|
||||
@@ -149,7 +141,7 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
struct file *filp = bprm->file;
|
||||
struct aaprofile *active;
|
||||
struct aaprofile *newprofile = NULL, unconstrained_flag;
|
||||
@@ -1090,7 +1106,7 @@ int aa_register(struct linux_binprm *bpr
|
||||
@@ -1090,7 +1105,7 @@ int aa_register(struct linux_binprm *bpr
|
||||
|
||||
AA_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
@@ -158,7 +150,7 @@ Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
if (IS_ERR(filename)) {
|
||||
AA_WARN("%s: Failed to get filename\n", __FUNCTION__);
|
||||
goto out;
|
||||
@@ -1339,7 +1355,7 @@ apply_profile:
|
||||
@@ -1339,7 +1354,7 @@ apply_profile:
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
Index: linux-2.6/security/apparmor/apparmor.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
--- linux-2.6.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6/security/apparmor/apparmor.h
|
||||
@@ -234,7 +234,19 @@ enum aa_xattroptype {
|
||||
#define BASE_PROFILE(p) ((p)->parent ? (p)->parent : (p))
|
||||
#define IN_SUBPROFILE(p) ((p)->parent)
|
||||
@@ -22,10 +22,10 @@ Index: linux-2.6.19.1/security/apparmor/apparmor.h
|
||||
extern int alloc_null_complain_profile(void);
|
||||
extern void free_null_complain_profile(void);
|
||||
extern int attach_nullprofile(struct aaprofile *profile);
|
||||
Index: linux-2.6.19.1/security/apparmor/inline.h
|
||||
Index: linux-2.6/security/apparmor/inline.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6.19.1/security/apparmor/inline.h
|
||||
--- linux-2.6.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6/security/apparmor/inline.h
|
||||
@@ -222,7 +222,7 @@ static inline struct aaprofile *alloc_aa
|
||||
*/
|
||||
static inline void aa_put_name(const char *name)
|
||||
@@ -35,11 +35,11 @@ Index: linux-2.6.19.1/security/apparmor/inline.h
|
||||
}
|
||||
|
||||
/** __aa_find_profile
|
||||
Index: linux-2.6.19.1/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6.19.1/security/apparmor/lsm.c
|
||||
@@ -814,6 +814,11 @@ static int __init apparmor_init(void)
|
||||
--- linux-2.6.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -816,6 +816,11 @@ static int __init apparmor_init(void)
|
||||
goto alloc_out;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ Index: linux-2.6.19.1/security/apparmor/lsm.c
|
||||
if ((error = register_security(&apparmor_ops))) {
|
||||
AA_ERROR("Unable to load AppArmor\n");
|
||||
goto register_security_out;
|
||||
@@ -828,6 +833,9 @@ static int __init apparmor_init(void)
|
||||
@@ -830,6 +835,9 @@ static int __init apparmor_init(void)
|
||||
return error;
|
||||
|
||||
register_security_out:
|
||||
@@ -61,10 +61,10 @@ Index: linux-2.6.19.1/security/apparmor/lsm.c
|
||||
free_null_complain_profile();
|
||||
|
||||
alloc_out:
|
||||
Index: linux-2.6.19.1/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/apparmor/main.c
|
||||
+++ linux-2.6.19.1/security/apparmor/main.c
|
||||
--- linux-2.6.orig/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -12,12 +12,133 @@
|
||||
#include <linux/security.h>
|
||||
#include <linux/namei.h>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
Index: linux-2.6/security/apparmor/apparmor.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6.19/security/apparmor/apparmor.h
|
||||
--- linux-2.6.orig/security/apparmor/apparmor.h
|
||||
+++ linux-2.6/security/apparmor/apparmor.h
|
||||
@@ -188,16 +188,6 @@ struct subdomain {
|
||||
|
||||
typedef int (*aa_iter) (struct subdomain *, void *);
|
||||
@@ -45,10 +45,19 @@ Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
extern int aa_fork(struct task_struct *p);
|
||||
extern int aa_register(struct linux_binprm *bprm);
|
||||
extern void aa_release(struct task_struct *p);
|
||||
Index: linux-2.6.19/security/apparmor/inline.h
|
||||
Index: linux-2.6/security/apparmor/inline.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6.19/security/apparmor/inline.h
|
||||
--- linux-2.6.orig/security/apparmor/inline.h
|
||||
+++ linux-2.6/security/apparmor/inline.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#ifndef __INLINE_H
|
||||
#define __INLINE_H
|
||||
|
||||
-#include <linux/namespace.h>
|
||||
+#include <linux/sched.h>
|
||||
|
||||
static inline int __aa_is_confined(struct subdomain *sd)
|
||||
{
|
||||
@@ -252,84 +252,4 @@ static inline struct aaprofile *__aa_fin
|
||||
}
|
||||
return NULL;
|
||||
@@ -134,25 +143,24 @@ Index: linux-2.6.19/security/apparmor/inline.h
|
||||
-}
|
||||
-
|
||||
#endif /* __INLINE_H__ */
|
||||
Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6.19/security/apparmor/lsm.c
|
||||
@@ -15,6 +15,7 @@
|
||||
--- linux-2.6.orig/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/mman.h>
|
||||
+#include <linux/mount.h>
|
||||
+#include <linux/namei.h>
|
||||
|
||||
#include "apparmor.h"
|
||||
#include "inline.h"
|
||||
@@ -246,122 +247,158 @@ static int apparmor_umount(struct vfsmou
|
||||
return error;
|
||||
@@ -247,121 +249,157 @@ static int apparmor_umount(struct vfsmou
|
||||
}
|
||||
|
||||
-static int apparmor_inode_mkdir(struct inode *inode, struct dentry *dentry,
|
||||
static int apparmor_inode_mkdir(struct inode *inode, struct dentry *dentry,
|
||||
- int mask)
|
||||
+static int apparmor_inode_mkdir(struct inode *inode, struct dentry *dentry,
|
||||
+ struct vfsmount *mnt, int mask)
|
||||
{
|
||||
struct aaprofile *active;
|
||||
@@ -329,7 +337,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -373,22 +410,26 @@ static int apparmor_inode_permission(str
|
||||
@@ -373,22 +411,26 @@ static int apparmor_inode_permission(str
|
||||
/* Do not perform check on pipes or sockets
|
||||
* Same as apparmor_file_permission
|
||||
*/
|
||||
@@ -359,7 +367,7 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
if (VALID_FSTYPE(dentry->d_inode)) {
|
||||
struct aaprofile *active;
|
||||
|
||||
@@ -398,76 +439,99 @@ static int apparmor_inode_setattr(struct
|
||||
@@ -398,76 +440,99 @@ static int apparmor_inode_setattr(struct
|
||||
* (chmod, chown, chgrp, etc)
|
||||
*/
|
||||
if (active)
|
||||
@@ -469,10 +477,10 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
return error;
|
||||
}
|
||||
|
||||
Index: linux-2.6.19/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.orig/security/apparmor/main.c
|
||||
+++ linux-2.6.19/security/apparmor/main.c
|
||||
--- linux-2.6.orig/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -35,34 +35,6 @@ struct aaprofile *null_complain_profile;
|
||||
**************************/
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19/security/apparmor/Kconfig
|
||||
Index: linux-2.6/security/apparmor/Kconfig
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/Kconfig
|
||||
+++ linux-2.6/security/apparmor/Kconfig
|
||||
@@ -0,0 +1,9 @@
|
||||
+config SECURITY_APPARMOR
|
||||
+ tristate "AppArmor support"
|
||||
@@ -12,10 +12,10 @@ Index: linux-2.6.19/security/apparmor/Kconfig
|
||||
+ distribution) and further information may be found at
|
||||
+ <http://forge.novell.com/modules/xfmod/project/?apparmor>
|
||||
+ If you are unsure how to answer this question, answer N.
|
||||
Index: linux-2.6.19/security/apparmor/Makefile
|
||||
Index: linux-2.6/security/apparmor/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/Makefile
|
||||
+++ linux-2.6/security/apparmor/Makefile
|
||||
@@ -0,0 +1,6 @@
|
||||
+# Makefile for AppArmor Linux Security Module
|
||||
+#
|
||||
@@ -23,10 +23,10 @@ Index: linux-2.6.19/security/apparmor/Makefile
|
||||
+
|
||||
+apparmor-y := main.o list.o procattr.o lsm.o apparmorfs.o capabilities.o \
|
||||
+ module_interface.o
|
||||
Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
Index: linux-2.6/security/apparmor/apparmor.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/apparmor.h
|
||||
+++ linux-2.6/security/apparmor/apparmor.h
|
||||
@@ -0,0 +1,338 @@
|
||||
+/*
|
||||
+ * Copyright (C) 1998-2005 Novell/SUSE
|
||||
@@ -366,10 +366,10 @@ Index: linux-2.6.19/security/apparmor/apparmor.h
|
||||
+extern const char *capability_to_name(unsigned int cap);
|
||||
+
|
||||
+#endif /* __APPARMOR_H */
|
||||
Index: linux-2.6.19/security/apparmor/apparmorfs.c
|
||||
Index: linux-2.6/security/apparmor/apparmorfs.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/apparmorfs.c
|
||||
+++ linux-2.6/security/apparmor/apparmorfs.c
|
||||
@@ -0,0 +1,432 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Novell/SUSE
|
||||
@@ -803,10 +803,10 @@ Index: linux-2.6.19/security/apparmor/apparmorfs.c
|
||||
+ if (AAFS_DENTRY)
|
||||
+ clear_apparmorfs();
|
||||
+}
|
||||
Index: linux-2.6.19/security/apparmor/capabilities.c
|
||||
Index: linux-2.6/security/apparmor/capabilities.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/capabilities.c
|
||||
+++ linux-2.6/security/apparmor/capabilities.c
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Novell/SUSE
|
||||
@@ -862,10 +862,10 @@ Index: linux-2.6.19/security/apparmor/capabilities.c
|
||||
+
|
||||
+ return name;
|
||||
+}
|
||||
Index: linux-2.6.19/security/apparmor/inline.h
|
||||
Index: linux-2.6/security/apparmor/inline.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/inline.h
|
||||
+++ linux-2.6/security/apparmor/inline.h
|
||||
@@ -0,0 +1,335 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Novell/SUSE
|
||||
@@ -1202,10 +1202,10 @@ Index: linux-2.6.19/security/apparmor/inline.h
|
||||
+}
|
||||
+
|
||||
+#endif /* __INLINE_H__ */
|
||||
Index: linux-2.6.19/security/apparmor/list.c
|
||||
Index: linux-2.6/security/apparmor/list.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/list.c
|
||||
+++ linux-2.6/security/apparmor/list.c
|
||||
@@ -0,0 +1,268 @@
|
||||
+/*
|
||||
+ * Copyright (C) 1998-2005 Novell/SUSE
|
||||
@@ -1475,10 +1475,10 @@ Index: linux-2.6.19/security/apparmor/list.c
|
||||
+ .stop = p_stop,
|
||||
+ .show = seq_show_profile,
|
||||
+};
|
||||
Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
Index: linux-2.6/security/apparmor/lsm.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/lsm.c
|
||||
+++ linux-2.6/security/apparmor/lsm.c
|
||||
@@ -0,0 +1,898 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -2378,10 +2378,10 @@ Index: linux-2.6.19/security/apparmor/lsm.c
|
||||
+MODULE_DESCRIPTION("AppArmor process confinement");
|
||||
+MODULE_AUTHOR("Tony Jones <tonyj@suse.de>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
Index: linux-2.6.19/security/apparmor/main.c
|
||||
Index: linux-2.6/security/apparmor/main.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/main.c
|
||||
+++ linux-2.6/security/apparmor/main.c
|
||||
@@ -0,0 +1,1687 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -4070,10 +4070,10 @@ Index: linux-2.6.19/security/apparmor/main.c
|
||||
+out:
|
||||
+ return error;
|
||||
+}
|
||||
Index: linux-2.6.19/security/apparmor/module_interface.c
|
||||
Index: linux-2.6/security/apparmor/module_interface.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/module_interface.c
|
||||
+++ linux-2.6/security/apparmor/module_interface.c
|
||||
@@ -0,0 +1,846 @@
|
||||
+/*
|
||||
+ * Copyright (C) 1998-2005 Novell/SUSE
|
||||
@@ -4921,10 +4921,10 @@ Index: linux-2.6.19/security/apparmor/module_interface.c
|
||||
+
|
||||
+ kfree(profile);
|
||||
+}
|
||||
Index: linux-2.6.19/security/apparmor/module_interface.h
|
||||
Index: linux-2.6/security/apparmor/module_interface.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/module_interface.h
|
||||
+++ linux-2.6/security/apparmor/module_interface.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+#ifndef __MODULEINTERFACE_H
|
||||
+#define __MODULEINTERFACE_H
|
||||
@@ -4963,10 +4963,10 @@ Index: linux-2.6.19/security/apparmor/module_interface.h
|
||||
+};
|
||||
+
|
||||
+#endif /* __MODULEINTERFACE_H */
|
||||
Index: linux-2.6.19/security/apparmor/procattr.c
|
||||
Index: linux-2.6/security/apparmor/procattr.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/procattr.c
|
||||
+++ linux-2.6/security/apparmor/procattr.c
|
||||
@@ -0,0 +1,332 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Novell/SUSE
|
||||
@@ -5300,10 +5300,10 @@ Index: linux-2.6.19/security/apparmor/procattr.c
|
||||
+
|
||||
+ return error;
|
||||
+}
|
||||
Index: linux-2.6.19/security/apparmor/shared.h
|
||||
Index: linux-2.6/security/apparmor/shared.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/shared.h
|
||||
+++ linux-2.6/security/apparmor/shared.h
|
||||
@@ -0,0 +1,46 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2000, 2001, 2004, 2005 Novell/SUSE
|
||||
@@ -5351,10 +5351,10 @@ Index: linux-2.6.19/security/apparmor/shared.h
|
||||
+ AA_EXEC_PROFILE)
|
||||
+
|
||||
+#endif /* _SHARED_H */
|
||||
Index: linux-2.6.19/security/apparmor/match/Kbuild
|
||||
Index: linux-2.6/security/apparmor/match/Kbuild
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/Kbuild
|
||||
+++ linux-2.6/security/apparmor/match/Kbuild
|
||||
@@ -0,0 +1,6 @@
|
||||
+# Makefile for AppArmor aamatch submodule
|
||||
+#
|
||||
@@ -5362,20 +5362,20 @@ Index: linux-2.6.19/security/apparmor/match/Kbuild
|
||||
+obj-$(CONFIG_SECURITY_APPARMOR) += aamatch_pcre.o
|
||||
+
|
||||
+aamatch_pcre-y := match_pcre.o pcre_exec.o
|
||||
Index: linux-2.6.19/security/apparmor/match/Makefile
|
||||
Index: linux-2.6/security/apparmor/match/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/Makefile
|
||||
+++ linux-2.6/security/apparmor/match/Makefile
|
||||
@@ -0,0 +1,5 @@
|
||||
+# Makefile for AppArmor aamatch submodule
|
||||
+#
|
||||
+obj-$(CONFIG_SECURITY_APPARMOR) += aamatch_pcre.o
|
||||
+
|
||||
+aamatch_pcre-y := match_pcre.o pcre_exec.o
|
||||
Index: linux-2.6.19/security/apparmor/match/match.h
|
||||
Index: linux-2.6/security/apparmor/match/match.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/match.h
|
||||
+++ linux-2.6/security/apparmor/match/match.h
|
||||
@@ -0,0 +1,132 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -5509,10 +5509,10 @@ Index: linux-2.6.19/security/apparmor/match/match.h
|
||||
+}
|
||||
+
|
||||
+#endif /* __MATCH_H */
|
||||
Index: linux-2.6.19/security/apparmor/match/match_default.c
|
||||
Index: linux-2.6/security/apparmor/match/match_default.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/match_default.c
|
||||
+++ linux-2.6/security/apparmor/match/match_default.c
|
||||
@@ -0,0 +1,57 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -5571,10 +5571,10 @@ Index: linux-2.6.19/security/apparmor/match/match_default.c
|
||||
+MODULE_DESCRIPTION("AppArmor match module (aamatch) [default]");
|
||||
+MODULE_AUTHOR("Tony Jones <tonyj@suse.de>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
Index: linux-2.6.19/security/apparmor/match/match_pcre.c
|
||||
Index: linux-2.6/security/apparmor/match/match_pcre.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/match_pcre.c
|
||||
+++ linux-2.6/security/apparmor/match/match_pcre.c
|
||||
@@ -0,0 +1,169 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2002-2005 Novell/SUSE
|
||||
@@ -5745,10 +5745,10 @@ Index: linux-2.6.19/security/apparmor/match/match_pcre.c
|
||||
+MODULE_DESCRIPTION("AppArmor aa_match module [pcre]");
|
||||
+MODULE_AUTHOR("Tony Jones <tonyj@suse.de>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
Index: linux-2.6.19/security/apparmor/match/pcre_exec.c
|
||||
Index: linux-2.6/security/apparmor/match/pcre_exec.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/pcre_exec.c
|
||||
+++ linux-2.6/security/apparmor/match/pcre_exec.c
|
||||
@@ -0,0 +1,1945 @@
|
||||
+/*
|
||||
+ * This is a modified version of pcre.c containing only the code/data
|
||||
@@ -7695,10 +7695,10 @@ Index: linux-2.6.19/security/apparmor/match/pcre_exec.c
|
||||
+}
|
||||
+
|
||||
+/* End of pcre.c */
|
||||
Index: linux-2.6.19/security/apparmor/match/pcre_exec.h
|
||||
Index: linux-2.6/security/apparmor/match/pcre_exec.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/pcre_exec.h
|
||||
+++ linux-2.6/security/apparmor/match/pcre_exec.h
|
||||
@@ -0,0 +1,308 @@
|
||||
+/*
|
||||
+ * This is a modified header file containing the definitions from
|
||||
@@ -8008,10 +8008,10 @@ Index: linux-2.6.19/security/apparmor/match/pcre_exec.h
|
||||
+
|
||||
+#endif // _PCRE_H
|
||||
+ /* End of pcre.h */
|
||||
Index: linux-2.6.19/security/apparmor/match/pcre_tables.h
|
||||
Index: linux-2.6/security/apparmor/match/pcre_tables.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-2.6.19/security/apparmor/match/pcre_tables.h
|
||||
+++ linux-2.6/security/apparmor/match/pcre_tables.h
|
||||
@@ -0,0 +1,184 @@
|
||||
+
|
||||
+/*************************************************
|
||||
|
@@ -1,8 +1,8 @@
|
||||
Index: linux-2.6.19.1/fs/dcache.c
|
||||
Index: linux-2.6/fs/dcache.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/fs/dcache.c
|
||||
+++ linux-2.6.19.1/fs/dcache.c
|
||||
@@ -1731,9 +1731,11 @@ shouldnt_be_hashed:
|
||||
--- linux-2.6.orig/fs/dcache.c
|
||||
+++ linux-2.6/fs/dcache.c
|
||||
@@ -1739,9 +1739,11 @@ shouldnt_be_hashed:
|
||||
* @rootmnt: vfsmnt to which the root dentry belongs
|
||||
* @buffer: buffer to return value in
|
||||
* @buflen: buffer length
|
||||
@@ -15,7 +15,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
*
|
||||
* Returns the buffer or an error code if the path was too long.
|
||||
*
|
||||
@@ -1741,7 +1743,7 @@ shouldnt_be_hashed:
|
||||
@@ -1749,7 +1751,7 @@ shouldnt_be_hashed:
|
||||
*/
|
||||
static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
|
||||
struct dentry *root, struct vfsmount *rootmnt,
|
||||
@@ -24,7 +24,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
{
|
||||
char * end = buffer+buflen;
|
||||
char * retval;
|
||||
@@ -1749,7 +1751,8 @@ static char * __d_path( struct dentry *d
|
||||
@@ -1757,7 +1759,8 @@ static char * __d_path( struct dentry *d
|
||||
|
||||
*--end = '\0';
|
||||
buflen--;
|
||||
@@ -34,7 +34,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
buflen -= 10;
|
||||
end -= 10;
|
||||
if (buflen < 0)
|
||||
@@ -1808,8 +1811,8 @@ Elong:
|
||||
@@ -1816,8 +1819,8 @@ Elong:
|
||||
}
|
||||
|
||||
/* write full pathname into buffer and return start of pathname */
|
||||
@@ -45,7 +45,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
{
|
||||
char *res;
|
||||
struct vfsmount *rootmnt;
|
||||
@@ -1820,7 +1823,7 @@ char * d_path(struct dentry *dentry, str
|
||||
@@ -1828,7 +1831,7 @@ char * d_path(struct dentry *dentry, str
|
||||
root = dget(current->fs->root);
|
||||
read_unlock(¤t->fs->lock);
|
||||
spin_lock(&dcache_lock);
|
||||
@@ -54,7 +54,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
spin_unlock(&dcache_lock);
|
||||
dput(root);
|
||||
mntput(rootmnt);
|
||||
@@ -1869,7 +1872,8 @@ asmlinkage long sys_getcwd(char __user *
|
||||
@@ -1877,7 +1880,8 @@ asmlinkage long sys_getcwd(char __user *
|
||||
unsigned long len;
|
||||
char * cwd;
|
||||
|
||||
@@ -64,7 +64,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
spin_unlock(&dcache_lock);
|
||||
|
||||
error = PTR_ERR(cwd);
|
||||
@@ -2119,7 +2123,7 @@ EXPORT_SYMBOL(d_invalidate);
|
||||
@@ -2127,7 +2131,7 @@ EXPORT_SYMBOL(d_invalidate);
|
||||
EXPORT_SYMBOL(d_lookup);
|
||||
EXPORT_SYMBOL(d_move);
|
||||
EXPORT_SYMBOL_GPL(d_materialise_unique);
|
||||
@@ -73,10 +73,10 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
EXPORT_SYMBOL(d_prune_aliases);
|
||||
EXPORT_SYMBOL(d_rehash);
|
||||
EXPORT_SYMBOL(d_splice_alias);
|
||||
Index: linux-2.6.19.1/include/linux/dcache.h
|
||||
Index: linux-2.6/include/linux/dcache.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/include/linux/dcache.h
|
||||
+++ linux-2.6.19.1/include/linux/dcache.h
|
||||
--- linux-2.6.orig/include/linux/dcache.h
|
||||
+++ linux-2.6/include/linux/dcache.h
|
||||
@@ -176,6 +176,9 @@ d_iput: no no no yes
|
||||
|
||||
#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */
|
||||
|
@@ -1,8 +1,8 @@
|
||||
Index: linux-2.6.19.1/fs/dcache.c
|
||||
Index: linux-2.6/fs/dcache.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/fs/dcache.c
|
||||
+++ linux-2.6.19.1/fs/dcache.c
|
||||
@@ -1733,10 +1733,12 @@ shouldnt_be_hashed:
|
||||
--- linux-2.6.orig/fs/dcache.c
|
||||
+++ linux-2.6/fs/dcache.c
|
||||
@@ -1741,10 +1741,12 @@ shouldnt_be_hashed:
|
||||
* @buflen: buffer length
|
||||
* @flags: flags indicating what should be in the path
|
||||
*
|
||||
@@ -19,7 +19,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
* Returns the buffer or an error code if the path was too long.
|
||||
*
|
||||
* "buflen" should be positive. Caller holds the dcache_lock.
|
||||
@@ -1769,7 +1771,8 @@ static char * __d_path( struct dentry *d
|
||||
@@ -1777,7 +1779,8 @@ static char * __d_path( struct dentry *d
|
||||
for (;;) {
|
||||
struct dentry * parent;
|
||||
|
||||
@@ -29,7 +29,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
break;
|
||||
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
|
||||
/* Global root? */
|
||||
@@ -1815,18 +1818,22 @@ char * d_path_flags(struct dentry *dentr
|
||||
@@ -1823,18 +1826,22 @@ char * d_path_flags(struct dentry *dentr
|
||||
char *buf, int buflen, unsigned int flags)
|
||||
{
|
||||
char *res;
|
||||
@@ -60,10 +60,10 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
return res;
|
||||
}
|
||||
|
||||
Index: linux-2.6.19.1/include/linux/dcache.h
|
||||
Index: linux-2.6/include/linux/dcache.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/include/linux/dcache.h
|
||||
+++ linux-2.6.19.1/include/linux/dcache.h
|
||||
--- linux-2.6.orig/include/linux/dcache.h
|
||||
+++ linux-2.6/include/linux/dcache.h
|
||||
@@ -178,6 +178,7 @@ d_iput: no no no yes
|
||||
|
||||
/* d_path flags */
|
||||
|
@@ -1,8 +1,8 @@
|
||||
Index: linux-2.6.19.1/fs/dcache.c
|
||||
Index: linux-2.6/fs/dcache.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/fs/dcache.c
|
||||
+++ linux-2.6.19.1/fs/dcache.c
|
||||
@@ -1732,6 +1732,8 @@ shouldnt_be_hashed:
|
||||
--- linux-2.6.orig/fs/dcache.c
|
||||
+++ linux-2.6/fs/dcache.c
|
||||
@@ -1740,6 +1740,8 @@ shouldnt_be_hashed:
|
||||
* @buffer: buffer to return value in
|
||||
* @buflen: buffer length
|
||||
* @flags: flags indicating what should be in the path
|
||||
@@ -11,7 +11,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
*
|
||||
* Convert a dentry into an ASCII path name.
|
||||
* If the entry has been deleted and the DPATH_DELETED flag is set the
|
||||
@@ -1745,21 +1747,25 @@ shouldnt_be_hashed:
|
||||
@@ -1753,21 +1755,25 @@ shouldnt_be_hashed:
|
||||
*/
|
||||
static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
|
||||
struct dentry *root, struct vfsmount *rootmnt,
|
||||
@@ -45,7 +45,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
}
|
||||
|
||||
if (buflen < 1)
|
||||
@@ -1771,9 +1777,11 @@ static char * __d_path( struct dentry *d
|
||||
@@ -1779,9 +1785,11 @@ static char * __d_path( struct dentry *d
|
||||
for (;;) {
|
||||
struct dentry * parent;
|
||||
|
||||
@@ -60,7 +60,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
|
||||
/* Global root? */
|
||||
spin_lock(&vfsmount_lock);
|
||||
@@ -1799,6 +1807,8 @@ static char * __d_path( struct dentry *d
|
||||
@@ -1807,6 +1815,8 @@ static char * __d_path( struct dentry *d
|
||||
dentry = parent;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
return retval;
|
||||
|
||||
global_root:
|
||||
@@ -1808,6 +1818,8 @@ global_root:
|
||||
@@ -1816,6 +1826,8 @@ global_root:
|
||||
goto Elong;
|
||||
retval -= namelen-1; /* hit the slash */
|
||||
memcpy(retval, dentry->d_name.name, namelen);
|
||||
@@ -78,7 +78,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
return retval;
|
||||
Elong:
|
||||
return ERR_PTR(-ENAMETOOLONG);
|
||||
@@ -1815,7 +1827,8 @@ Elong:
|
||||
@@ -1823,7 +1835,8 @@ Elong:
|
||||
|
||||
/* write full pathname into buffer and return start of pathname */
|
||||
char * d_path_flags(struct dentry *dentry, struct vfsmount *vfsmnt,
|
||||
@@ -88,7 +88,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
{
|
||||
char *res;
|
||||
struct vfsmount *rootmnt = NULL;
|
||||
@@ -1828,7 +1841,8 @@ char * d_path_flags(struct dentry *dentr
|
||||
@@ -1836,7 +1849,8 @@ char * d_path_flags(struct dentry *dentr
|
||||
read_unlock(¤t->fs->lock);
|
||||
}
|
||||
spin_lock(&dcache_lock);
|
||||
@@ -98,7 +98,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
spin_unlock(&dcache_lock);
|
||||
if (!(flags & DPATH_NSROOT)) {
|
||||
dput(root);
|
||||
@@ -1858,6 +1872,7 @@ char * d_path_flags(struct dentry *dentr
|
||||
@@ -1866,6 +1880,7 @@ char * d_path_flags(struct dentry *dentr
|
||||
asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
|
||||
{
|
||||
int error;
|
||||
@@ -106,7 +106,7 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
struct vfsmount *pwdmnt, *rootmnt;
|
||||
struct dentry *pwd, *root;
|
||||
char *page = (char *) __get_free_page(GFP_USER);
|
||||
@@ -1880,7 +1895,7 @@ asmlinkage long sys_getcwd(char __user *
|
||||
@@ -1888,7 +1903,7 @@ asmlinkage long sys_getcwd(char __user *
|
||||
char * cwd;
|
||||
|
||||
cwd = __d_path(pwd, pwdmnt, root, rootmnt, page, PAGE_SIZE,
|
||||
@@ -115,10 +115,10 @@ Index: linux-2.6.19.1/fs/dcache.c
|
||||
spin_unlock(&dcache_lock);
|
||||
|
||||
error = PTR_ERR(cwd);
|
||||
Index: linux-2.6.19.1/include/linux/dcache.h
|
||||
Index: linux-2.6/include/linux/dcache.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/include/linux/dcache.h
|
||||
+++ linux-2.6.19.1/include/linux/dcache.h
|
||||
--- linux-2.6.orig/include/linux/dcache.h
|
||||
+++ linux-2.6/include/linux/dcache.h
|
||||
@@ -297,10 +297,10 @@ extern struct dentry * d_hash_and_lookup
|
||||
/* validate "insecure" dentry pointer */
|
||||
extern int d_validate(struct dentry *, struct dentry *);
|
||||
|
@@ -6,10 +6,10 @@ calling iop->setattr.
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/proc/base.c
|
||||
Index: linux-2.6/fs/proc/base.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/proc/base.c
|
||||
+++ linux-2.6-hooks/fs/proc/base.c
|
||||
--- linux-2.6.orig/fs/proc/base.c
|
||||
+++ linux-2.6/fs/proc/base.c
|
||||
@@ -344,11 +344,8 @@ static int proc_setattr(struct dentry *d
|
||||
return -EPERM;
|
||||
|
||||
|
@@ -7,10 +7,10 @@ vfsmount parameter to notify_change().
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/mm/filemap.c
|
||||
Index: linux-2.6/mm/filemap.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/mm/filemap.c
|
||||
+++ linux-2.6-hooks/mm/filemap.c
|
||||
--- linux-2.6.orig/mm/filemap.c
|
||||
+++ linux-2.6/mm/filemap.c
|
||||
@@ -1869,9 +1869,9 @@ repeat:
|
||||
* if suid or (sgid and xgrp)
|
||||
* remove privs
|
||||
@@ -58,10 +58,10 @@ Index: linux-2.6-hooks/mm/filemap.c
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
Index: linux-2.6-hooks/fs/ntfs/file.c
|
||||
Index: linux-2.6/fs/ntfs/file.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ntfs/file.c
|
||||
+++ linux-2.6-hooks/fs/ntfs/file.c
|
||||
--- linux-2.6.orig/fs/ntfs/file.c
|
||||
+++ linux-2.6/fs/ntfs/file.c
|
||||
@@ -2162,7 +2162,7 @@ static ssize_t ntfs_file_aio_write_noloc
|
||||
goto out;
|
||||
if (!count)
|
||||
@@ -71,10 +71,10 @@ Index: linux-2.6-hooks/fs/ntfs/file.c
|
||||
if (err)
|
||||
goto out;
|
||||
file_update_time(file);
|
||||
Index: linux-2.6-hooks/fs/reiserfs/file.c
|
||||
Index: linux-2.6/fs/reiserfs/file.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/reiserfs/file.c
|
||||
+++ linux-2.6-hooks/fs/reiserfs/file.c
|
||||
--- linux-2.6.orig/fs/reiserfs/file.c
|
||||
+++ linux-2.6/fs/reiserfs/file.c
|
||||
@@ -1353,7 +1353,7 @@ static ssize_t reiserfs_file_write(struc
|
||||
if (count == 0)
|
||||
goto out;
|
||||
@@ -84,10 +84,10 @@ Index: linux-2.6-hooks/fs/reiserfs/file.c
|
||||
if (res)
|
||||
goto out;
|
||||
|
||||
Index: linux-2.6-hooks/fs/splice.c
|
||||
Index: linux-2.6/fs/splice.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/splice.c
|
||||
+++ linux-2.6-hooks/fs/splice.c
|
||||
--- linux-2.6.orig/fs/splice.c
|
||||
+++ linux-2.6/fs/splice.c
|
||||
@@ -844,7 +844,7 @@ generic_file_splice_write_nolock(struct
|
||||
ssize_t ret;
|
||||
int err;
|
||||
@@ -110,10 +110,10 @@ Index: linux-2.6-hooks/fs/splice.c
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
if (err)
|
||||
return err;
|
||||
Index: linux-2.6-hooks/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
Index: linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
+++ linux-2.6-hooks/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
+++ linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
@@ -805,7 +805,7 @@ start:
|
||||
!capable(CAP_FSETID)) {
|
||||
error = xfs_write_clear_setuid(xip);
|
||||
@@ -123,10 +123,10 @@ Index: linux-2.6-hooks/fs/xfs/linux-2.6/xfs_lrw.c
|
||||
if (unlikely(error)) {
|
||||
xfs_iunlock(xip, iolock);
|
||||
goto out_unlock_mutex;
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -1678,9 +1678,9 @@ extern void __iget(struct inode * inode)
|
||||
extern void clear_inode(struct inode *);
|
||||
extern void destroy_inode(struct inode *);
|
||||
@@ -140,10 +140,10 @@ Index: linux-2.6-hooks/include/linux/fs.h
|
||||
extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
|
||||
|
||||
extern void __insert_inode_hash(struct inode *, unsigned long hashval);
|
||||
Index: linux-2.6-hooks/mm/filemap_xip.c
|
||||
Index: linux-2.6/mm/filemap_xip.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/mm/filemap_xip.c
|
||||
+++ linux-2.6-hooks/mm/filemap_xip.c
|
||||
--- linux-2.6.orig/mm/filemap_xip.c
|
||||
+++ linux-2.6/mm/filemap_xip.c
|
||||
@@ -379,7 +379,7 @@ xip_file_write(struct file *filp, const
|
||||
if (count == 0)
|
||||
goto out_backing;
|
||||
@@ -153,10 +153,10 @@ Index: linux-2.6-hooks/mm/filemap_xip.c
|
||||
if (ret)
|
||||
goto out_backing;
|
||||
|
||||
Index: linux-2.6-hooks/mm/shmem.c
|
||||
Index: linux-2.6/mm/shmem.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/mm/shmem.c
|
||||
+++ linux-2.6-hooks/mm/shmem.c
|
||||
--- linux-2.6.orig/mm/shmem.c
|
||||
+++ linux-2.6/mm/shmem.c
|
||||
@@ -1447,7 +1447,7 @@ shmem_file_write(struct file *file, cons
|
||||
if (err || !count)
|
||||
goto out;
|
||||
@@ -166,10 +166,10 @@ Index: linux-2.6-hooks/mm/shmem.c
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
Index: linux-2.6-hooks/fs/ocfs2/file.c
|
||||
Index: linux-2.6/fs/ocfs2/file.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ocfs2/file.c
|
||||
+++ linux-2.6-hooks/fs/ocfs2/file.c
|
||||
--- linux-2.6.orig/fs/ocfs2/file.c
|
||||
+++ linux-2.6/fs/ocfs2/file.c
|
||||
@@ -1035,13 +1035,13 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_create LSM hook.
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1503,7 +1503,7 @@ int vfs_create(struct inode *dir, struct
|
||||
return -EACCES; /* shouldn't it be ENOSYS? */
|
||||
mode &= S_IALLUGO;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
DQUOT_INIT(dir);
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -283,6 +283,7 @@ struct request_sock;
|
||||
* Check permission to create a regular file.
|
||||
* @dir contains inode structure of the parent of the new file.
|
||||
@@ -61,10 +61,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
int mode)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -265,7 +265,7 @@ static int dummy_inode_init_security (st
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2135,7 +2135,8 @@ static int selinux_inode_init_security(s
|
||||
return 0;
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_getxattr LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -117,7 +117,7 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
if (error)
|
||||
return error;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -391,7 +391,7 @@ struct request_sock;
|
||||
* @value identified by @name for @dentry and @mnt.
|
||||
* @inode_getxattr:
|
||||
@@ -64,10 +64,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -368,7 +368,8 @@ static void dummy_inode_post_setxattr (s
|
||||
{
|
||||
}
|
||||
@@ -78,10 +78,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2352,7 +2352,8 @@ static void selinux_inode_post_setxattr(
|
||||
return;
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass the struct vfsmounts to the inode_link LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2275,7 +2275,8 @@ int vfs_link(struct dentry *old_dentry,
|
||||
if (S_ISDIR(old_dentry->d_inode->i_mode))
|
||||
return -EPERM;
|
||||
@@ -17,10 +17,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -289,8 +289,10 @@ struct request_sock;
|
||||
* @inode_link:
|
||||
* Check permission before creating a new hard link to a file.
|
||||
@@ -74,10 +74,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -270,8 +270,10 @@ static int dummy_inode_create (struct in
|
||||
return 0;
|
||||
}
|
||||
@@ -91,10 +91,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2141,11 +2141,16 @@ static int selinux_inode_create(struct i
|
||||
return may_create(dir, dentry, SECCLASS_FILE);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_listxattr LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -150,7 +150,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
struct inode *inode = dentry->d_inode;
|
||||
ssize_t error;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
if (error)
|
||||
return error;
|
||||
error = -EOPNOTSUPP;
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -395,7 +395,7 @@ struct request_sock;
|
||||
* Return 0 if permission is granted.
|
||||
* @inode_listxattr:
|
||||
@@ -63,10 +63,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -374,7 +374,7 @@ static int dummy_inode_getxattr (struct
|
||||
return 0;
|
||||
}
|
||||
@@ -76,10 +76,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2358,7 +2358,7 @@ static int selinux_inode_getxattr (struc
|
||||
return dentry_has_perm(current, NULL, dentry, FILE__GETATTR);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_mkdir LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1928,7 +1928,7 @@ int vfs_mkdir(struct inode *dir, struct
|
||||
return -EPERM;
|
||||
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -308,6 +308,7 @@ struct request_sock;
|
||||
* associated with inode strcture @dir.
|
||||
* @dir containst the inode structure of parent of the directory to be created.
|
||||
@@ -60,10 +60,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
int mode)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -288,7 +288,7 @@ static int dummy_inode_symlink (struct i
|
||||
}
|
||||
|
||||
@@ -73,10 +73,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2166,7 +2166,8 @@ static int selinux_inode_symlink(struct
|
||||
return may_create(dir, dentry, SECCLASS_LNK_FILE);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_mknod LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1851,7 +1851,7 @@ int vfs_mknod(struct inode *dir, struct
|
||||
if (!dir->i_op || !dir->i_op->mknod)
|
||||
return -EPERM;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -323,6 +323,7 @@ struct request_sock;
|
||||
* and not this hook.
|
||||
* @dir contains the inode structure of parent of the new file.
|
||||
@@ -59,10 +59,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
int mode, dev_t dev)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -299,7 +299,7 @@ static int dummy_inode_rmdir (struct ino
|
||||
}
|
||||
|
||||
@@ -72,10 +72,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2177,11 +2177,12 @@ static int selinux_inode_rmdir(struct in
|
||||
return may_link(dir, dentry, MAY_RMDIR);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_readlink LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/stat.c
|
||||
Index: linux-2.6/fs/stat.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/stat.c
|
||||
+++ linux-2.6-hooks/fs/stat.c
|
||||
--- linux-2.6.orig/fs/stat.c
|
||||
+++ linux-2.6/fs/stat.c
|
||||
@@ -307,7 +307,7 @@ asmlinkage long sys_readlinkat(int dfd,
|
||||
|
||||
error = -EINVAL;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/stat.c
|
||||
if (!error) {
|
||||
touch_atime(nd.mnt, nd.dentry);
|
||||
error = inode->i_op->readlink(nd.dentry, buf, bufsiz);
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -338,6 +338,7 @@ struct request_sock;
|
||||
* @inode_readlink:
|
||||
* Check the permission to read the symbolic link.
|
||||
@@ -62,10 +62,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -312,7 +312,7 @@ static int dummy_inode_rename (struct in
|
||||
return 0;
|
||||
}
|
||||
@@ -75,10 +75,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2196,7 +2196,7 @@ static int selinux_inode_rename(struct i
|
||||
return may_rename(old_inode, old_dentry, new_inode, new_dentry);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_removexattr LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -178,7 +178,7 @@ vfs_removexattr(struct dentry *dentry, s
|
||||
if (error)
|
||||
return error;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/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);
|
||||
@@ -67,10 +67,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
}
|
||||
|
||||
static inline const char *security_inode_xattr_getsuffix (void)
|
||||
Index: linux-2.6-hooks/security/commoncap.c
|
||||
Index: linux-2.6/security/commoncap.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/commoncap.c
|
||||
+++ linux-2.6-hooks/security/commoncap.c
|
||||
--- linux-2.6.orig/security/commoncap.c
|
||||
+++ linux-2.6/security/commoncap.c
|
||||
@@ -201,7 +201,8 @@ int cap_inode_setxattr(struct dentry *de
|
||||
return 0;
|
||||
}
|
||||
@@ -81,10 +81,10 @@ Index: linux-2.6-hooks/security/commoncap.c
|
||||
{
|
||||
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|
||||
sizeof(XATTR_SECURITY_PREFIX) - 1) &&
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -379,7 +379,8 @@ static int dummy_inode_listxattr (struct
|
||||
return 0;
|
||||
}
|
||||
@@ -95,10 +95,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|
||||
sizeof(XATTR_SECURITY_PREFIX) - 1) &&
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2363,7 +2363,8 @@ static int selinux_inode_listxattr (stru
|
||||
return dentry_has_perm(current, NULL, dentry, FILE__GETATTR);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_rename LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2398,7 +2398,8 @@ static int vfs_rename_dir(struct inode *
|
||||
return error;
|
||||
}
|
||||
@@ -27,10 +27,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -336,8 +336,10 @@ struct request_sock;
|
||||
* Check for permission to rename a file or directory.
|
||||
* @old_dir contains the inode structure for parent of the old link.
|
||||
@@ -85,10 +85,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -310,8 +310,10 @@ static int dummy_inode_mknod (struct ino
|
||||
|
||||
static int dummy_inode_rename (struct inode *old_inode,
|
||||
@@ -101,10 +101,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2197,8 +2197,12 @@ static int selinux_inode_mknod(struct in
|
||||
return may_create(dir, dentry, inode_mode_to_security_class(mode));
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_rmdir LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2023,7 +2023,7 @@ int vfs_rmdir(struct inode *dir, struct
|
||||
if (d_mountpoint(dentry))
|
||||
error = -EBUSY;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (!error) {
|
||||
error = dir->i_op->rmdir(dir, dentry);
|
||||
if (!error)
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -318,6 +318,7 @@ struct request_sock;
|
||||
* Check the permission to remove a directory.
|
||||
* @dir contains the inode structure of parent of the directory to be removed.
|
||||
@@ -63,10 +63,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -295,7 +295,8 @@ static int dummy_inode_mkdir (struct ino
|
||||
return 0;
|
||||
}
|
||||
@@ -77,10 +77,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2178,7 +2178,8 @@ static int selinux_inode_mkdir(struct in
|
||||
return may_create(dir, dentry, SECCLASS_DIR);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_setattr LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/attr.c
|
||||
Index: linux-2.6/fs/attr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/attr.c
|
||||
+++ linux-2.6-hooks/fs/attr.c
|
||||
--- linux-2.6.orig/fs/attr.c
|
||||
+++ linux-2.6/fs/attr.c
|
||||
@@ -145,13 +145,13 @@ int notify_change(struct dentry *dentry,
|
||||
down_write(&dentry->d_inode->i_alloc_sem);
|
||||
|
||||
@@ -23,10 +23,10 @@ Index: linux-2.6-hooks/fs/attr.c
|
||||
if (!error) {
|
||||
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
|
||||
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -358,6 +358,7 @@ struct request_sock;
|
||||
* file attributes change (such as when a file is truncated, chown/chmod
|
||||
* operations, transferring disk quotas, etc).
|
||||
@@ -67,10 +67,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
struct iattr *attr)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -328,7 +328,8 @@ static int dummy_inode_permission (struc
|
||||
return 0;
|
||||
}
|
||||
@@ -81,10 +81,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2226,11 +2226,12 @@ static int selinux_inode_permission(stru
|
||||
file_mask_to_av(inode->i_mode, mask), NULL);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_setxattr LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -49,7 +49,7 @@ extern void cap_capset_set (struct task_
|
||||
extern int cap_bprm_set_security (struct linux_binprm *bprm);
|
||||
extern void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe);
|
||||
@@ -98,10 +98,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{ }
|
||||
|
||||
static inline int security_inode_getxattr (struct dentry *dentry, char *name)
|
||||
Index: linux-2.6-hooks/security/commoncap.c
|
||||
Index: linux-2.6/security/commoncap.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/commoncap.c
|
||||
+++ linux-2.6-hooks/security/commoncap.c
|
||||
--- linux-2.6.orig/security/commoncap.c
|
||||
+++ linux-2.6/security/commoncap.c
|
||||
@@ -191,8 +191,8 @@ int cap_bprm_secureexec (struct linux_bi
|
||||
current->egid != current->gid);
|
||||
}
|
||||
@@ -113,10 +113,10 @@ Index: linux-2.6-hooks/security/commoncap.c
|
||||
{
|
||||
if (!strncmp(name, XATTR_SECURITY_PREFIX,
|
||||
sizeof(XATTR_SECURITY_PREFIX) - 1) &&
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -350,8 +350,9 @@ static void dummy_inode_delete (struct i
|
||||
return;
|
||||
}
|
||||
@@ -140,10 +140,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
size_t size, int flags)
|
||||
{
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2264,7 +2264,9 @@ static int selinux_inode_getattr(struct
|
||||
return dentry_has_perm(current, mnt, dentry, FILE__GETATTR);
|
||||
}
|
||||
@@ -166,10 +166,10 @@ Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
void *value, size_t size, int flags)
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -81,7 +81,7 @@ vfs_setxattr(struct dentry *dentry, stru
|
||||
return error;
|
||||
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_symlink LSM hook.
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2196,7 +2196,7 @@ int vfs_symlink(struct inode *dir, struc
|
||||
if (!dir->i_op || !dir->i_op->symlink)
|
||||
return -EPERM;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -301,6 +301,7 @@ struct request_sock;
|
||||
* Check the permission to create a symbolic link to a file.
|
||||
* @dir contains the inode structure of parent directory of the symbolic link.
|
||||
@@ -61,10 +61,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
const char *old_name)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -282,7 +282,7 @@ static int dummy_inode_unlink (struct in
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2161,7 +2161,8 @@ static int selinux_inode_unlink(struct i
|
||||
return may_link(dir, dentry, MAY_UNLINK);
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@ Pass struct vfsmount to the inode_unlink LSM hook
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2102,7 +2102,7 @@ int vfs_unlink(struct inode *dir, struct
|
||||
if (d_mountpoint(dentry))
|
||||
error = -EBUSY;
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
if (!error)
|
||||
error = dir->i_op->unlink(dir, dentry);
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/security.h
|
||||
+++ linux-2.6-hooks/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -298,6 +298,7 @@ struct request_sock;
|
||||
* Check the permission to remove a hard link to a file.
|
||||
* @dir contains the inode structure of parent directory of the file.
|
||||
@@ -63,10 +63,10 @@ Index: linux-2.6-hooks/include/linux/security.h
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/dummy.c
|
||||
+++ linux-2.6-hooks/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -278,7 +278,8 @@ static int dummy_inode_link (struct dent
|
||||
return 0;
|
||||
}
|
||||
@@ -77,10 +77,10 @@ Index: linux-2.6-hooks/security/dummy.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/security/selinux/hooks.c
|
||||
Index: linux-2.6/security/selinux/hooks.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6-hooks/security/selinux/hooks.c
|
||||
--- linux-2.6.orig/security/selinux/hooks.c
|
||||
+++ linux-2.6/security/selinux/hooks.c
|
||||
@@ -2156,11 +2156,12 @@ static int selinux_inode_link(struct den
|
||||
return may_link(dir, old_dentry, MAY_LINK);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: linux-2.6.19.1/fs/open.c
|
||||
Index: linux-2.6/fs/open.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/fs/open.c
|
||||
+++ linux-2.6.19.1/fs/open.c
|
||||
--- linux-2.6.orig/fs/open.c
|
||||
+++ linux-2.6/fs/open.c
|
||||
@@ -483,6 +483,10 @@ asmlinkage long sys_chroot(const char __
|
||||
if (!capable(CAP_SYS_CHROOT))
|
||||
goto dput_and_out;
|
||||
@@ -13,10 +13,10 @@ Index: linux-2.6.19.1/fs/open.c
|
||||
set_fs_root(current->fs, nd.mnt, nd.dentry);
|
||||
set_fs_altroot();
|
||||
error = 0;
|
||||
Index: linux-2.6.19.1/include/linux/security.h
|
||||
Index: linux-2.6/include/linux/security.h
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/include/linux/security.h
|
||||
+++ linux-2.6.19.1/include/linux/security.h
|
||||
--- linux-2.6.orig/include/linux/security.h
|
||||
+++ linux-2.6/include/linux/security.h
|
||||
@@ -247,6 +247,9 @@ struct request_sock;
|
||||
* Update module state after a successful pivot.
|
||||
* @old_nd contains the nameidata structure for the old root.
|
||||
@@ -27,7 +27,7 @@ Index: linux-2.6.19.1/include/linux/security.h
|
||||
*
|
||||
* Security hooks for inode operations.
|
||||
*
|
||||
@@ -1219,6 +1222,7 @@ struct security_operations {
|
||||
@@ -1211,6 +1214,7 @@ struct security_operations {
|
||||
struct nameidata * new_nd);
|
||||
void (*sb_post_pivotroot) (struct nameidata * old_nd,
|
||||
struct nameidata * new_nd);
|
||||
@@ -35,7 +35,7 @@ Index: linux-2.6.19.1/include/linux/security.h
|
||||
|
||||
int (*inode_alloc_security) (struct inode *inode);
|
||||
void (*inode_free_security) (struct inode *inode);
|
||||
@@ -1617,6 +1621,11 @@ static inline void security_sb_post_pivo
|
||||
@@ -1610,6 +1614,11 @@ static inline void security_sb_post_pivo
|
||||
security_ops->sb_post_pivotroot (old_nd, new_nd);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ Index: linux-2.6.19.1/include/linux/security.h
|
||||
static inline int security_inode_alloc (struct inode *inode)
|
||||
{
|
||||
inode->i_security = NULL;
|
||||
@@ -2367,6 +2376,11 @@ static inline void security_sb_post_pivo
|
||||
@@ -2362,6 +2371,11 @@ static inline void security_sb_post_pivo
|
||||
struct nameidata *new_nd)
|
||||
{ }
|
||||
|
||||
@@ -59,10 +59,10 @@ Index: linux-2.6.19.1/include/linux/security.h
|
||||
static inline int security_inode_alloc (struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
Index: linux-2.6.19.1/security/dummy.c
|
||||
Index: linux-2.6/security/dummy.c
|
||||
===================================================================
|
||||
--- linux-2.6.19.1.orig/security/dummy.c
|
||||
+++ linux-2.6.19.1/security/dummy.c
|
||||
--- linux-2.6.orig/security/dummy.c
|
||||
+++ linux-2.6/security/dummy.c
|
||||
@@ -248,6 +248,11 @@ static void dummy_sb_post_pivotroot (str
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ Index: linux-2.6.19.1/security/dummy.c
|
||||
static int dummy_inode_alloc_security (struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
@@ -1003,6 +1008,7 @@ void security_fixup_ops (struct security
|
||||
@@ -1004,6 +1009,7 @@ void security_fixup_ops (struct security
|
||||
set_to_dummy_if_null(ops, sb_post_addmount);
|
||||
set_to_dummy_if_null(ops, sb_pivotroot);
|
||||
set_to_dummy_if_null(ops, sb_post_pivotroot);
|
||||
|
@@ -3,11 +3,11 @@ Add a struct vfsmount parameter to vfs_getxattr()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -383,7 +383,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -382,7 +382,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
{
|
||||
ssize_t buflen;
|
||||
|
||||
@@ -16,7 +16,7 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
if (buflen <= 0)
|
||||
return buflen;
|
||||
|
||||
@@ -391,7 +391,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
@@ -390,7 +390,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||
if (!*buf)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -25,10 +25,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
}
|
||||
#endif
|
||||
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -107,7 +107,8 @@ out:
|
||||
EXPORT_SYMBOL_GPL(vfs_setxattr);
|
||||
|
||||
@@ -85,10 +85,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
fput(f);
|
||||
return error;
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/xattr.h
|
||||
Index: linux-2.6/include/linux/xattr.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/xattr.h
|
||||
+++ linux-2.6-hooks/include/linux/xattr.h
|
||||
--- linux-2.6.orig/include/linux/xattr.h
|
||||
+++ linux-2.6/include/linux/xattr.h
|
||||
@@ -40,7 +40,8 @@ struct xattr_handler {
|
||||
size_t size, int flags);
|
||||
};
|
||||
|
@@ -3,10 +3,10 @@ Add struct vfsmount parameters to vfs_link()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2250,7 +2250,7 @@ asmlinkage long sys_symlink(const char _
|
||||
return sys_symlinkat(oldname, AT_FDCWD, newname);
|
||||
}
|
||||
@@ -26,10 +26,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
dput(new_dentry);
|
||||
out_unlock:
|
||||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -982,7 +982,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);
|
||||
@@ -39,10 +39,10 @@ Index: linux-2.6-hooks/include/linux/fs.h
|
||||
extern int vfs_rmdir(struct inode *, struct dentry *);
|
||||
extern int vfs_unlink(struct inode *, struct dentry *);
|
||||
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -403,19 +403,24 @@ static int ecryptfs_link(struct dentry *
|
||||
struct dentry *new_dentry)
|
||||
{
|
||||
@@ -70,11 +70,11 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
if (rc || !lower_new_dentry->d_inode)
|
||||
goto out_lock;
|
||||
rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0);
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1528,7 +1528,7 @@ nfsd_link(struct svc_rqst *rqstp, struct
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1527,7 +1527,7 @@ nfsd_link(struct svc_rqst *rqstp, struct
|
||||
dold = tfhp->fh_dentry;
|
||||
dest = dold->d_inode;
|
||||
|
||||
|
@@ -3,10 +3,10 @@ Add a struct vfsmount parameter to vfs_listxattr()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -144,18 +144,20 @@ vfs_getxattr(struct dentry *dentry, stru
|
||||
EXPORT_SYMBOL_GPL(vfs_getxattr);
|
||||
|
||||
@@ -80,10 +80,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
fput(f);
|
||||
return error;
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/xattr.h
|
||||
Index: linux-2.6/include/linux/xattr.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/xattr.h
|
||||
+++ linux-2.6-hooks/include/linux/xattr.h
|
||||
--- linux-2.6.orig/include/linux/xattr.h
|
||||
+++ linux-2.6/include/linux/xattr.h
|
||||
@@ -42,7 +42,8 @@ struct xattr_handler {
|
||||
|
||||
ssize_t vfs_getxattr(struct dentry *, struct vfsmount *, char *, void *,
|
||||
|
@@ -3,10 +3,10 @@ Add struct vfsmount parameter to vfs_mkdir
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -501,11 +501,14 @@ static int ecryptfs_mkdir(struct inode *
|
||||
{
|
||||
int rc;
|
||||
@@ -23,10 +23,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
if (rc || !lower_dentry->d_inode)
|
||||
goto out;
|
||||
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1916,7 +1916,8 @@ asmlinkage long sys_mknod(const char __u
|
||||
return sys_mknodat(AT_FDCWD, filename, mode, dev);
|
||||
}
|
||||
@@ -46,10 +46,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
dput(dentry);
|
||||
out_unlock:
|
||||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
Index: linux-2.6/fs/nfsd/nfs4recover.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
--- linux-2.6.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6/fs/nfsd/nfs4recover.c
|
||||
@@ -156,7 +156,7 @@ nfsd4_create_clid_dir(struct nfs4_client
|
||||
dprintk("NFSD: nfsd4_create_clid_dir: DIRECTORY EXISTS\n");
|
||||
goto out_put;
|
||||
@@ -59,11 +59,11 @@ Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
out_put:
|
||||
dput(dentry);
|
||||
out_unlock:
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1184,7 +1184,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1183,7 +1183,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);
|
||||
break;
|
||||
case S_IFDIR:
|
||||
@@ -72,10 +72,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
break;
|
||||
case S_IFCHR:
|
||||
case S_IFBLK:
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -979,7 +979,7 @@ extern void unlock_super(struct super_bl
|
||||
*/
|
||||
extern int vfs_permission(struct nameidata *, int);
|
||||
|
@@ -3,10 +3,10 @@ Add a struct vfsmount parameter to vfs_mknod()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -552,11 +552,14 @@ ecryptfs_mknod(struct inode *dir, struct
|
||||
{
|
||||
int rc;
|
||||
@@ -23,10 +23,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
if (rc || !lower_dentry->d_inode)
|
||||
goto out;
|
||||
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1837,7 +1837,8 @@ fail:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(lookup_create);
|
||||
@@ -53,11 +53,11 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
break;
|
||||
case S_IFDIR:
|
||||
error = -EPERM;
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1190,7 +1190,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1189,7 +1189,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
|
||||
case S_IFBLK:
|
||||
case S_IFIFO:
|
||||
case S_IFSOCK:
|
||||
@@ -66,10 +66,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
break;
|
||||
default:
|
||||
printk("nfsd: bad file type %o in nfsd_create\n", type);
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -980,7 +980,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 *);
|
||||
@@ -79,10 +79,10 @@ Index: linux-2.6-hooks/include/linux/fs.h
|
||||
extern int vfs_symlink(struct inode *, struct dentry *, const char *, int);
|
||||
extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
|
||||
extern int vfs_rmdir(struct inode *, struct dentry *);
|
||||
Index: linux-2.6-hooks/net/unix/af_unix.c
|
||||
Index: linux-2.6/net/unix/af_unix.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/net/unix/af_unix.c
|
||||
+++ linux-2.6-hooks/net/unix/af_unix.c
|
||||
--- linux-2.6.orig/net/unix/af_unix.c
|
||||
+++ linux-2.6/net/unix/af_unix.c
|
||||
@@ -808,7 +808,7 @@ static int unix_bind(struct socket *sock
|
||||
*/
|
||||
mode = S_IFSOCK |
|
||||
|
@@ -13,10 +13,10 @@ The next patch passes the vfsmount to the inode_setattr LSM hook.
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/attr.c
|
||||
Index: linux-2.6/fs/attr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/attr.c
|
||||
+++ linux-2.6-hooks/fs/attr.c
|
||||
--- linux-2.6.orig/fs/attr.c
|
||||
+++ linux-2.6/fs/attr.c
|
||||
@@ -101,7 +101,8 @@ int inode_setattr(struct inode * inode,
|
||||
}
|
||||
EXPORT_SYMBOL(inode_setattr);
|
||||
@@ -27,10 +27,10 @@ Index: linux-2.6-hooks/fs/attr.c
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
mode_t mode;
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -1457,8 +1457,8 @@ static inline int break_lease(struct ino
|
||||
|
||||
/* fs/open.c */
|
||||
@@ -51,10 +51,10 @@ Index: linux-2.6-hooks/include/linux/fs.h
|
||||
extern int permission(struct inode *, int, struct nameidata *);
|
||||
extern int generic_permission(struct inode *, int,
|
||||
int (*check_acl)(struct inode *, int));
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -856,12 +856,14 @@ static int ecryptfs_setattr(struct dentr
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -79,10 +79,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
out:
|
||||
fsstack_copy_attr_all(inode, lower_inode, NULL);
|
||||
return rc;
|
||||
Index: linux-2.6-hooks/fs/fat/file.c
|
||||
Index: linux-2.6/fs/fat/file.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/fat/file.c
|
||||
+++ linux-2.6-hooks/fs/fat/file.c
|
||||
--- linux-2.6.orig/fs/fat/file.c
|
||||
+++ linux-2.6/fs/fat/file.c
|
||||
@@ -92,7 +92,7 @@ int fat_generic_ioctl(struct inode *inod
|
||||
}
|
||||
|
||||
@@ -92,10 +92,10 @@ Index: linux-2.6-hooks/fs/fat/file.c
|
||||
if (err)
|
||||
goto up;
|
||||
|
||||
Index: linux-2.6-hooks/fs/hpfs/namei.c
|
||||
Index: linux-2.6/fs/hpfs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/hpfs/namei.c
|
||||
+++ linux-2.6-hooks/fs/hpfs/namei.c
|
||||
--- linux-2.6.orig/fs/hpfs/namei.c
|
||||
+++ linux-2.6/fs/hpfs/namei.c
|
||||
@@ -426,7 +426,7 @@ again:
|
||||
/*printk("HPFS: truncating file before delete.\n");*/
|
||||
newattrs.ia_size = 0;
|
||||
@@ -105,11 +105,11 @@ Index: linux-2.6-hooks/fs/hpfs/namei.c
|
||||
put_write_access(inode);
|
||||
if (!err)
|
||||
goto again;
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -359,7 +359,7 @@ nfsd_setattr(struct svc_rqst *rqstp, str
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -358,7 +358,7 @@ nfsd_setattr(struct svc_rqst *rqstp, str
|
||||
err = nfserr_notsync;
|
||||
if (!check_guard || guardtime == inode->i_ctime.tv_sec) {
|
||||
fh_lock(fhp);
|
||||
@@ -118,7 +118,7 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
err = nfserrno(host_err);
|
||||
fh_unlock(fhp);
|
||||
}
|
||||
@@ -897,7 +897,7 @@ static void kill_suid(struct dentry *den
|
||||
@@ -896,7 +896,7 @@ static void kill_suid(struct dentry *den
|
||||
ia.ia_valid = ATTR_KILL_SUID | ATTR_KILL_SGID;
|
||||
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
@@ -127,10 +127,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
}
|
||||
|
||||
Index: linux-2.6-hooks/fs/open.c
|
||||
Index: linux-2.6/fs/open.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/open.c
|
||||
+++ linux-2.6-hooks/fs/open.c
|
||||
--- linux-2.6.orig/fs/open.c
|
||||
+++ linux-2.6/fs/open.c
|
||||
@@ -194,8 +194,8 @@ out:
|
||||
return error;
|
||||
}
|
||||
@@ -243,10 +243,10 @@ Index: linux-2.6-hooks/fs/open.c
|
||||
fput(file);
|
||||
out:
|
||||
return error;
|
||||
Index: linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
Index: linux-2.6/fs/reiserfs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/reiserfs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
--- linux-2.6.orig/fs/reiserfs/xattr.c
|
||||
+++ linux-2.6/fs/reiserfs/xattr.c
|
||||
@@ -527,7 +527,7 @@ reiserfs_xattr_set(struct inode *inode,
|
||||
newattrs.ia_size = buffer_size;
|
||||
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
|
||||
@@ -274,10 +274,10 @@ Index: linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
unlock_kernel();
|
||||
|
||||
out_dir:
|
||||
Index: linux-2.6-hooks/fs/sysfs/file.c
|
||||
Index: linux-2.6/fs/sysfs/file.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/sysfs/file.c
|
||||
+++ linux-2.6-hooks/fs/sysfs/file.c
|
||||
--- linux-2.6.orig/fs/sysfs/file.c
|
||||
+++ linux-2.6/fs/sysfs/file.c
|
||||
@@ -526,7 +526,7 @@ int sysfs_chmod_file(struct kobject *kob
|
||||
newattrs.ia_mode = (mode & S_IALLUGO) |
|
||||
(inode->i_mode & ~S_IALLUGO);
|
||||
@@ -287,10 +287,10 @@ Index: linux-2.6-hooks/fs/sysfs/file.c
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
}
|
||||
dput(victim);
|
||||
Index: linux-2.6-hooks/fs/utimes.c
|
||||
Index: linux-2.6/fs/utimes.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/utimes.c
|
||||
+++ linux-2.6-hooks/fs/utimes.c
|
||||
--- linux-2.6.orig/fs/utimes.c
|
||||
+++ linux-2.6/fs/utimes.c
|
||||
@@ -62,7 +62,7 @@ asmlinkage long sys_utime(char __user *
|
||||
goto dput_and_out;
|
||||
}
|
||||
@@ -309,10 +309,10 @@ Index: linux-2.6-hooks/fs/utimes.c
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
dput_and_out:
|
||||
path_release(&nd);
|
||||
Index: linux-2.6-hooks/mm/filemap.c
|
||||
Index: linux-2.6/mm/filemap.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/mm/filemap.c
|
||||
+++ linux-2.6-hooks/mm/filemap.c
|
||||
--- linux-2.6.orig/mm/filemap.c
|
||||
+++ linux-2.6/mm/filemap.c
|
||||
@@ -1897,7 +1897,7 @@ int __remove_suid(struct path *path, int
|
||||
struct iattr newattrs;
|
||||
|
||||
@@ -322,10 +322,10 @@ Index: linux-2.6-hooks/mm/filemap.c
|
||||
}
|
||||
|
||||
int remove_suid(struct path *path)
|
||||
Index: linux-2.6-hooks/fs/exec.c
|
||||
Index: linux-2.6/fs/exec.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/exec.c
|
||||
+++ linux-2.6-hooks/fs/exec.c
|
||||
--- linux-2.6.orig/fs/exec.c
|
||||
+++ linux-2.6/fs/exec.c
|
||||
@@ -1534,7 +1534,8 @@ int do_coredump(long signr, int exit_cod
|
||||
goto close_fail;
|
||||
if (!file->f_op->write)
|
||||
@@ -336,10 +336,10 @@ Index: linux-2.6-hooks/fs/exec.c
|
||||
goto close_fail;
|
||||
|
||||
retval = binfmt->core_dump(signr, regs, file);
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -1580,7 +1580,8 @@ int may_open(struct nameidata *nd, int a
|
||||
if (!error) {
|
||||
DQUOT_INIT(inode);
|
||||
@@ -350,10 +350,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
}
|
||||
put_write_access(inode);
|
||||
if (error)
|
||||
Index: linux-2.6-hooks/mm/tiny-shmem.c
|
||||
Index: linux-2.6/mm/tiny-shmem.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/mm/tiny-shmem.c
|
||||
+++ linux-2.6-hooks/mm/tiny-shmem.c
|
||||
--- linux-2.6.orig/mm/tiny-shmem.c
|
||||
+++ linux-2.6/mm/tiny-shmem.c
|
||||
@@ -86,7 +86,7 @@ struct file *shmem_file_setup(char *name
|
||||
file->f_mode = FMODE_WRITE | FMODE_READ;
|
||||
|
||||
|
@@ -3,11 +3,11 @@ Add a struct vfsmount parameter to vfs_removexattr()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1975,7 +1975,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1974,7 +1974,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
if (!S_ISDIR(inode->i_mode) && type == ACL_TYPE_DEFAULT)
|
||||
error = 0;
|
||||
else {
|
||||
@@ -16,10 +16,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
if (error == -ENODATA)
|
||||
error = 0;
|
||||
}
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -166,7 +166,7 @@ vfs_listxattr(struct dentry *dentry, str
|
||||
EXPORT_SYMBOL_GPL(vfs_listxattr);
|
||||
|
||||
@@ -74,10 +74,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
fput(f);
|
||||
return error;
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/xattr.h
|
||||
Index: linux-2.6/include/linux/xattr.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/xattr.h
|
||||
+++ linux-2.6-hooks/include/linux/xattr.h
|
||||
--- linux-2.6.orig/include/linux/xattr.h
|
||||
+++ linux-2.6/include/linux/xattr.h
|
||||
@@ -46,7 +46,7 @@ ssize_t vfs_listxattr(struct dentry *d,
|
||||
size_t size);
|
||||
int vfs_setxattr(struct dentry *, struct vfsmount *, char *, void *, size_t,
|
||||
|
@@ -3,10 +3,10 @@ Add struct vfsmount parameters to vfs_rename()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -590,19 +590,24 @@ ecryptfs_rename(struct inode *old_dir, s
|
||||
{
|
||||
int rc;
|
||||
@@ -33,10 +33,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
if (rc)
|
||||
goto out_lock;
|
||||
fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2382,7 +2382,8 @@ asmlinkage long sys_link(const char __us
|
||||
* locking].
|
||||
*/
|
||||
@@ -92,11 +92,11 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
exit5:
|
||||
dput(new_dentry);
|
||||
exit4:
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1621,7 +1621,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1620,7 +1620,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru
|
||||
host_err = -EPERM;
|
||||
} else
|
||||
#endif
|
||||
@@ -105,10 +105,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
if (!host_err && EX_ISSYNC(tfhp->fh_export)) {
|
||||
host_err = nfsd_sync_dir(tdentry);
|
||||
if (!host_err)
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -985,7 +985,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 *);
|
||||
|
@@ -3,10 +3,10 @@ Add a struct vfsmount parameter to vfs_rmdir()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -534,14 +534,16 @@ out:
|
||||
static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -25,10 +25,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
dput(lower_dentry);
|
||||
if (!rc)
|
||||
d_delete(lower_dentry);
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2006,7 +2006,7 @@ void dentry_unhash(struct dentry *dentry
|
||||
spin_unlock(&dcache_lock);
|
||||
}
|
||||
@@ -47,10 +47,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
dput(dentry);
|
||||
exit2:
|
||||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
Index: linux-2.6/fs/nfsd/nfs4recover.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
--- linux-2.6.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6/fs/nfsd/nfs4recover.c
|
||||
@@ -275,7 +275,7 @@ nfsd4_clear_clid_dir(struct dentry *dir,
|
||||
* a kernel from the future.... */
|
||||
nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
|
||||
@@ -60,11 +60,11 @@ Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
return status;
|
||||
}
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1695,7 +1695,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1694,7 +1694,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
#endif
|
||||
host_err = vfs_unlink(dirp, rdentry);
|
||||
} else { /* It's RMDIR */
|
||||
@@ -73,10 +73,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
}
|
||||
|
||||
dput(rdentry);
|
||||
Index: linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
Index: linux-2.6/fs/reiserfs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/reiserfs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
--- linux-2.6.orig/fs/reiserfs/xattr.c
|
||||
+++ linux-2.6/fs/reiserfs/xattr.c
|
||||
@@ -823,7 +823,7 @@ int reiserfs_delete_xattrs(struct inode
|
||||
if (dir->d_inode->i_nlink <= 2) {
|
||||
root = get_xa_root(inode->i_sb);
|
||||
@@ -86,10 +86,10 @@ Index: linux-2.6-hooks/fs/reiserfs/xattr.c
|
||||
reiserfs_write_unlock_xattrs(inode->i_sb);
|
||||
dput(root);
|
||||
} else {
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -983,7 +983,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);
|
||||
|
@@ -3,11 +3,11 @@ Add a struct vfsmount parameter to vfs_setxattr()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -416,7 +416,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -415,7 +415,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
out:
|
||||
kfree(buf);
|
||||
return error;
|
||||
@@ -1970,7 +1970,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
@@ -1969,7 +1969,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||
size = 0;
|
||||
|
||||
if (size)
|
||||
@@ -25,10 +25,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
else {
|
||||
if (!S_ISDIR(inode->i_mode) && type == ACL_TYPE_DEFAULT)
|
||||
error = 0;
|
||||
Index: linux-2.6-hooks/fs/xattr.c
|
||||
Index: linux-2.6/fs/xattr.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/xattr.c
|
||||
+++ linux-2.6-hooks/fs/xattr.c
|
||||
--- linux-2.6.orig/fs/xattr.c
|
||||
+++ linux-2.6/fs/xattr.c
|
||||
@@ -70,8 +70,8 @@ xattr_permission(struct inode *inode, co
|
||||
}
|
||||
|
||||
@@ -87,10 +87,10 @@ Index: linux-2.6-hooks/fs/xattr.c
|
||||
fput(f);
|
||||
return error;
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/xattr.h
|
||||
Index: linux-2.6/include/linux/xattr.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/xattr.h
|
||||
+++ linux-2.6-hooks/include/linux/xattr.h
|
||||
--- linux-2.6.orig/include/linux/xattr.h
|
||||
+++ linux-2.6/include/linux/xattr.h
|
||||
@@ -42,7 +42,8 @@ struct xattr_handler {
|
||||
|
||||
ssize_t vfs_getxattr(struct dentry *, char *, void *, size_t);
|
||||
|
@@ -3,10 +3,10 @@ Add a struct vfsmount parameter to vfs_symlink()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -462,6 +462,7 @@ static int ecryptfs_symlink(struct inode
|
||||
{
|
||||
int rc;
|
||||
@@ -32,10 +32,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
encoded_symname, mode);
|
||||
kfree(encoded_symname);
|
||||
if (rc || !lower_dentry->d_inode)
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2185,7 +2185,8 @@ asmlinkage long sys_unlink(const char __
|
||||
return do_unlinkat(AT_FDCWD, pathname);
|
||||
}
|
||||
@@ -56,11 +56,11 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
dput(dentry);
|
||||
out_unlock:
|
||||
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1464,11 +1464,12 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1463,11 +1463,12 @@ nfsd_symlink(struct svc_rqst *rqstp, str
|
||||
else {
|
||||
strncpy(path_alloced, path, plen);
|
||||
path_alloced[plen] = 0;
|
||||
@@ -75,10 +75,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
|
||||
if (!host_err) {
|
||||
if (EX_ISSYNC(fhp->fh_export))
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -981,7 +981,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);
|
||||
|
@@ -3,10 +3,10 @@ Add a struct vfsmount parameter to vfs_unlink()
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
Index: linux-2.6/fs/ecryptfs/inode.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
||||
+++ linux-2.6/fs/ecryptfs/inode.c
|
||||
@@ -445,10 +445,11 @@ static int ecryptfs_unlink(struct inode
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -20,10 +20,10 @@ Index: linux-2.6-hooks/fs/ecryptfs/inode.c
|
||||
if (rc) {
|
||||
printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
|
||||
goto out_unlock;
|
||||
Index: linux-2.6-hooks/fs/namei.c
|
||||
Index: linux-2.6/fs/namei.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/namei.c
|
||||
+++ linux-2.6-hooks/fs/namei.c
|
||||
--- linux-2.6.orig/fs/namei.c
|
||||
+++ linux-2.6/fs/namei.c
|
||||
@@ -2086,7 +2086,7 @@ asmlinkage long sys_rmdir(const char __u
|
||||
return do_rmdir(AT_FDCWD, pathname);
|
||||
}
|
||||
@@ -42,10 +42,10 @@ Index: linux-2.6-hooks/fs/namei.c
|
||||
exit2:
|
||||
dput(dentry);
|
||||
}
|
||||
Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
Index: linux-2.6/fs/nfsd/nfs4recover.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
--- linux-2.6.orig/fs/nfsd/nfs4recover.c
|
||||
+++ linux-2.6/fs/nfsd/nfs4recover.c
|
||||
@@ -260,7 +260,7 @@ nfsd4_remove_clid_file(struct dentry *di
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -55,11 +55,11 @@ Index: linux-2.6-hooks/fs/nfsd/nfs4recover.c
|
||||
mutex_unlock(&dir->d_inode->i_mutex);
|
||||
return status;
|
||||
}
|
||||
Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
Index: linux-2.6/fs/nfsd/vfs.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
@@ -1693,7 +1693,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
--- linux-2.6.orig/fs/nfsd/vfs.c
|
||||
+++ linux-2.6/fs/nfsd/vfs.c
|
||||
@@ -1692,7 +1692,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
||||
host_err = -EPERM;
|
||||
} else
|
||||
#endif
|
||||
@@ -68,10 +68,10 @@ Index: linux-2.6-hooks/fs/nfsd/vfs.c
|
||||
} else { /* It's RMDIR */
|
||||
host_err = vfs_rmdir(dirp, rdentry, NULL);
|
||||
}
|
||||
Index: linux-2.6-hooks/include/linux/fs.h
|
||||
Index: linux-2.6/include/linux/fs.h
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/include/linux/fs.h
|
||||
+++ linux-2.6-hooks/include/linux/fs.h
|
||||
--- linux-2.6.orig/include/linux/fs.h
|
||||
+++ linux-2.6/include/linux/fs.h
|
||||
@@ -984,7 +984,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 *);
|
||||
@@ -81,10 +81,10 @@ Index: linux-2.6-hooks/include/linux/fs.h
|
||||
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
|
||||
|
||||
/*
|
||||
Index: linux-2.6-hooks/ipc/mqueue.c
|
||||
Index: linux-2.6/ipc/mqueue.c
|
||||
===================================================================
|
||||
--- linux-2.6-hooks.orig/ipc/mqueue.c
|
||||
+++ linux-2.6-hooks/ipc/mqueue.c
|
||||
--- linux-2.6.orig/ipc/mqueue.c
|
||||
+++ linux-2.6/ipc/mqueue.c
|
||||
@@ -747,7 +747,7 @@ asmlinkage long sys_mq_unlink(const char
|
||||
if (inode)
|
||||
atomic_inc(&inode->i_count);
|
||||
|
Reference in New Issue
Block a user