Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-diff -urN current/arch/s390/appldata/appldata_base.c sysctl/arch/s390/appldata/appldata_base.c
---- current/arch/s390/appldata/appldata_base.c 2005-08-28 23:09:40.000000000 -0400
-+++ sysctl/arch/s390/appldata/appldata_base.c 2005-11-03 08:53:57.000000000 -0500
-@@ -592,12 +592,15 @@
+---
+ arch/s390/appldata/appldata_base.c | 7 +
+ include/linux/proc_fs.h | 1
+ include/linux/sysctl.h | 3
+ kernel/sysctl.c | 136 +++++++++++++++++++++++++++++--------
+ 4 files changed, 116 insertions(+), 31 deletions(-)
+
+--- linux-2.6.13.4.orig/arch/s390/appldata/appldata_base.c
++++ linux-2.6.13.4/arch/s390/appldata/appldata_base.c
+@@ -592,12 +592,15 @@ int appldata_register_ops(struct appldat
*/
void appldata_unregister_ops(struct appldata_ops *ops)
{
P_INFO("%s-ops unregistered!\n", ops->name);
}
/********************** module-ops management <END> **************************/
-diff -urN current/include/linux/proc_fs.h sysctl/include/linux/proc_fs.h
---- current/include/linux/proc_fs.h 2005-08-28 23:09:48.000000000 -0400
-+++ sysctl/include/linux/proc_fs.h 2005-11-03 08:43:22.000000000 -0500
-@@ -66,6 +66,7 @@
+--- linux-2.6.13.4.orig/include/linux/proc_fs.h
++++ linux-2.6.13.4/include/linux/proc_fs.h
+@@ -66,6 +66,7 @@ struct proc_dir_entry {
write_proc_t *write_proc;
atomic_t count; /* use count */
int deleted; /* delete flag */
};
struct kcore_list {
-diff -urN current/include/linux/sysctl.h sysctl/include/linux/sysctl.h
---- current/include/linux/sysctl.h 2005-10-28 16:42:49.000000000 -0400
-+++ sysctl/include/linux/sysctl.h 2005-11-03 08:43:22.000000000 -0500
+--- linux-2.6.13.4.orig/include/linux/sysctl.h
++++ linux-2.6.13.4/include/linux/sysctl.h
@@ -24,6 +24,7 @@
#include <linux/compiler.h>
#define CTL_MAXNAME 10 /* how many path components do we allow in a
call to sysctl? In other words, what is
-@@ -925,6 +926,8 @@
+@@ -894,6 +895,8 @@ struct ctl_table_header
{
ctl_table *ctl_table;
struct list_head ctl_entry;
};
struct ctl_table_header * register_sysctl_table(ctl_table * table,
-diff -urN current/kernel/sysctl.c sysctl/kernel/sysctl.c
---- current/kernel/sysctl.c 2005-10-28 16:42:49.000000000 -0400
-+++ sysctl/kernel/sysctl.c 2005-11-03 08:50:17.000000000 -0500
-@@ -169,7 +169,7 @@
+--- linux-2.6.13.4.orig/kernel/sysctl.c
++++ linux-2.6.13.4/kernel/sysctl.c
+@@ -171,7 +171,7 @@ struct file_operations proc_sys_file_ope
extern struct proc_dir_entry *proc_sys_root;
static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
#endif
-@@ -992,10 +992,51 @@
+@@ -994,10 +994,51 @@ static ctl_table dev_table[] = {
extern void init_irq_proc (void);
init_irq_proc();
#endif
}
-@@ -1004,6 +1045,7 @@
+@@ -1006,6 +1047,7 @@ int do_sysctl(int __user *name, int nlen
void __user *newval, size_t newlen)
{
struct list_head *tmp;
if (nlen <= 0 || nlen >= CTL_MAXNAME)
return -ENOTDIR;
-@@ -1012,20 +1054,30 @@
+@@ -1014,20 +1056,30 @@ int do_sysctl(int __user *name, int nlen
if (!oldlenp || get_user(old_len, oldlenp))
return -EFAULT;
}
+
+ spin_unlock(&sysctl_lock);
+
-+ error = parse_table(name, nlen, oldval, oldlenp,
++ error = parse_table(name, nlen, oldval, oldlenp,
newval, newlen, head->ctl_table,
&context);
kfree(context);
}
asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
-@@ -1236,12 +1288,16 @@
+@@ -1238,12 +1290,16 @@ struct ctl_table_header *register_sysctl
return NULL;
tmp->ctl_table = table;
INIT_LIST_HEAD(&tmp->ctl_entry);
#endif
return tmp;
}
-@@ -1255,10 +1311,13 @@
+@@ -1257,10 +1313,13 @@ struct ctl_table_header *register_sysctl
*/
void unregister_sysctl_table(struct ctl_table_header * header)
{
kfree(header);
}
-@@ -1269,7 +1328,7 @@
+@@ -1271,7 +1330,7 @@ void unregister_sysctl_table(struct ctl_
#ifdef CONFIG_PROC_FS
/* Scan the sysctl entries in table and add them all into /proc */
{
struct proc_dir_entry *de;
int len;
-@@ -1305,13 +1364,14 @@
+@@ -1307,13 +1366,14 @@ static void register_proc_table(ctl_tabl
de = create_proc_entry(table->procname, mode, root);
if (!de)
continue;
}
}
-@@ -1336,6 +1396,13 @@
+@@ -1338,6 +1398,13 @@ static void unregister_proc_table(ctl_ta
continue;
}
/* Don't unregister proc entries that are still being used.. */
if (atomic_read(&de->count))
continue;
-@@ -1349,27 +1416,38 @@
+@@ -1351,27 +1418,38 @@ static ssize_t do_rw_proc(int write, str
size_t count, loff_t *ppos)
{
int op;
+ op = (write ? 002 : 004);
+ if (ctl_perm(table, op))
+ goto out;
-+
++
+ /* careful: calling conventions are nasty here */
+ res = count;
+ error = (*table->proc_handler)(table, write, file,
}
static int proc_opensys(struct inode *inode, struct file *file)
-_______________________________________________
-Security mailing list
-Security@linux.kernel.org
-http://linux.kernel.org/mailman/listinfo/security
-