lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 07 Feb 2011 12:51:36 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	linux-kernel@...r.kernel.org
Cc:	Kees Cook <kees.cook@...onical.com>,
	David Woodhouse <dwmw2@...radead.org>
Subject: [PATCH] Export linux/syslog.h

Userspace programs (like util-linux' dmesg) still use magic numbers for
the klogctl function (glibc's interface to the syslog system call).
Exporting linux/syslog.h makes the more descriptive named constants
available as a single reference for these values.

Signed-off-by: Paul Bolle <pebolle@...cali.nl>
Signed-off-by: Kees Cook <kees.cook@...onical.com>
---
 include/linux/Kbuild   |    1 +
 include/linux/syslog.h |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index b0ada6f..c80f55f 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -347,6 +347,7 @@ header-y += suspend_ioctls.h
 header-y += swab.h
 header-y += synclink.h
 header-y += sysctl.h
+header-y += syslog.h
 header-y += taskstats.h
 header-y += tcp.h
 header-y += telephony.h
diff --git a/include/linux/syslog.h b/include/linux/syslog.h
index 3891139..75950af 100644
--- a/include/linux/syslog.h
+++ b/include/linux/syslog.h
@@ -44,9 +44,11 @@
 /* Return size of the log buffer */
 #define SYSLOG_ACTION_SIZE_BUFFER   10
 
+#ifdef __KERNEL__
 #define SYSLOG_FROM_CALL 0
 #define SYSLOG_FROM_FILE 1
 
 int do_syslog(int type, char __user *buf, int count, bool from_file);
+#endif
 
 #endif /* _LINUX_SYSLOG_H */
-- 
1.7.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ