summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /kernel/sysctl.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c43
1 files changed, 10 insertions, 33 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 47bb36171..27616bfee 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -33,7 +33,7 @@
#include <linux/nfs_fs.h>
#endif
-#ifdef CONFIG_SYSCTL
+#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
/* External variables not in a header file. */
extern int panic_timeout;
@@ -43,7 +43,9 @@ extern char binfmt_java_interpreter[], binfmt_java_appletviewer[];
extern int sysctl_overcommit_memory;
#ifdef CONFIG_KMOD
extern char modprobe_path[];
-extern int kmod_unload_delay;
+#endif
+#ifdef CONFIG_CHR_DEV_SG
+extern int sg_big_buff;
#endif
#ifdef __sparc__
@@ -52,8 +54,6 @@ extern char reboot_command [];
static int parse_table(int *, int, void *, size_t *, void *, size_t,
ctl_table *, void **);
-static int do_securelevel_strategy (ctl_table *, int *, int, void *, size_t *,
- void *, size_t, void **);
static ctl_table root_table[];
@@ -156,8 +156,6 @@ static ctl_table kern_table[] = {
0644, NULL, &proc_dointvec},
{KERN_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int),
0444, NULL, &proc_dointvec},
- {KERN_SECURELVL, "securelevel", &securelevel, sizeof(int),
- 0444, NULL, &proc_dointvec, (ctl_handler *)&do_securelevel_strategy},
{KERN_PANIC, "panic", &panic_timeout, sizeof(int),
0644, NULL, &proc_dointvec},
#ifdef CONFIG_BLK_DEV_INITRD
@@ -181,8 +179,10 @@ static ctl_table kern_table[] = {
#ifdef CONFIG_KMOD
{KERN_MODPROBE, "modprobe", &modprobe_path, 256,
0644, NULL, &proc_dostring, &sysctl_string },
- {KERN_KMOD_UNLOAD_DELAY, "kmod_unload_delay", &kmod_unload_delay,
- sizeof(int), 0644, NULL, &proc_dointvec},
+#endif
+#ifdef CONFIG_CHR_DEV_SG
+ {KERN_NRFILE, "sg-big-buff", &sg_big_buff, sizeof (int),
+ 0444, NULL, &proc_dointvec},
#endif
{0}
};
@@ -408,29 +408,6 @@ int do_sysctl_strategy (ctl_table *table,
return 0;
}
-/*
- * This function only checks permission for changing the security level
- * If the tests are successful, the actual change is done by
- * do_sysctl_strategy
- */
-static int do_securelevel_strategy (ctl_table *table,
- int *name, int nlen,
- void *oldval, size_t *oldlenp,
- void *newval, size_t newlen, void **context)
-{
- int level;
-
- if (newval && newlen) {
- if (newlen != sizeof (int))
- return -EINVAL;
- if(copy_from_user (&level, newval, newlen))
- return -EFAULT;
- if (level < securelevel && current->pid != 1)
- return -EPERM;
- }
- return 0;
-}
-
struct ctl_table_header *register_sysctl_table(ctl_table * table,
int insert_at_head)
{
@@ -1031,7 +1008,7 @@ int do_struct (
}
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_FS && CONFIG_SYSCTL */
extern asmlinkage int sys_sysctl(struct __sysctl_args *args)
@@ -1087,7 +1064,7 @@ void unregister_sysctl_table(struct ctl_table_header * table)
{
}
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_FS && CONFIG_SYSCTL */