Export linux/syslog.h
PATCH v2 1/2 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 <[email protected]>
---
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(-)
include/linux/Kbuild +1 -0
@@ -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
include/linux/syslog.h +3 -3
@@ -1,6 +1,4 @@ -/* Syslog internals -* -* Copyright 2010 Canonical, Ltd. +/* Copyright 2010 Canonical, Ltd. * Author: Kees Cook <[email protected]> * * 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 1int do_syslog (int type,char __user *buf,int count,bool from_file); +#endif #endif /* _LINUX_SYSLOG_H */
Signature · 1 line
1.7.4
Hi,
Looks fine to me.
Quoted 6 lines · Paul Bolle
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.hmakes the more descriptive named constants available as a single reference for these values.Signed-off-by Paul Bolle <[email protected]>
Signed-off-by Kees Cook <[email protected]>
-Kees
Signature · 2 lines
Kees Cook Ubuntu Security Team