[CVE-2009-0029] Make sys_syslog a conditional system call
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 14 Jan 2009 13:13:58 +0000 (14:13 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 14 Jan 2009 13:15:16 +0000 (14:15 +0100)
Remove the -ENOSYS implementation for !CONFIG_PRINTK and use
the cond_syscall infrastructure instead.

Acked-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
kernel/printk.c
kernel/sys_ni.c

index 7015733793e8c2fc71097b49875cdf11f25203a1..e48cf33783fc4366990c8e4f1786c5357474c936 100644 (file)
@@ -742,11 +742,6 @@ EXPORT_SYMBOL(vprintk);
 
 #else
 
-asmlinkage long sys_syslog(int type, char __user *buf, int len)
-{
-       return -ENOSYS;
-}
-
 static void call_console_drivers(unsigned start, unsigned end)
 {
 }
index e14a23281707610c6d52338af9e091116e29b987..27dad29673879ae78b7124280346d418e520572b 100644 (file)
@@ -131,6 +131,7 @@ cond_syscall(sys_io_destroy);
 cond_syscall(sys_io_submit);
 cond_syscall(sys_io_cancel);
 cond_syscall(sys_io_getevents);
+cond_syscall(sys_syslog);
 
 /* arch-specific weak syscall entries */
 cond_syscall(sys_pciconfig_read);