* [PATCH v2 1/2] Export linux/syslog.h
@ 2011-02-08 22:15 Paul Bolle
2011-02-08 22:23 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Paul Bolle @ 2011-02-08 22:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Kees Cook, David Woodhouse, Arnd Bergmann, mtk.manpages
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@tiscali.nl>
---
Changes in v2:
- dropped the "Syslog internals" comment;
- dropped Kees' Singed-off-by, since the patch has changed.
include/linux/Kbuild | 1 +
include/linux/syslog.h | 6 +++---
2 files changed, 4 insertions(+), 3 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..69b85e6 100644
--- a/include/linux/syslog.h
+++ b/include/linux/syslog.h
@@ -1,6 +1,4 @@
-/* Syslog internals
- *
- * Copyright 2010 Canonical, Ltd.
+/* Copyright 2010 Canonical, Ltd.
* Author: Kees Cook <kees.cook@canonical.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -44,9 +42,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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/2] Export linux/syslog.h
2011-02-08 22:15 [PATCH v2 1/2] Export linux/syslog.h Paul Bolle
@ 2011-02-08 22:23 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2011-02-08 22:23 UTC (permalink / raw)
To: Paul Bolle; +Cc: linux-kernel, David Woodhouse, Arnd Bergmann, mtk.manpages
Hi,
Looks fine to me.
On Tue, Feb 08, 2011 at 11:15:08PM +0100, Paul Bolle wrote:
> 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@tiscali.nl>
Signed-off-by: Kees Cook <kees.cook@canonical.com>
-Kees
--
Kees Cook
Ubuntu Security Team
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-08 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 22:15 [PATCH v2 1/2] Export linux/syslog.h Paul Bolle
2011-02-08 22:23 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®