diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-22 16:45:08 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-22 16:45:08 +0000 |
commit | 6ab1cee89df90efcee57a1592e2a2349bf06ad5c (patch) | |
tree | dcfa57c493f886ed6fbc0180a8f00046ee13b926 /usr.bin | |
parent | 3e9e0d219ea7c964f23585e7408032c0c9d5ac3a (diff) |
Format the flags argument to sendsyslog()
ok deraadt@ bluhm@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/kdump/kdump.c | 6 | ||||
-rw-r--r-- | usr.bin/kdump/kdump_subr.h | 3 | ||||
-rw-r--r-- | usr.bin/kdump/mksubr | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 9f1476b53e2..6c0b2325e9c 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.124 2016/03/21 00:04:03 guenther Exp $ */ +/* $OpenBSD: kdump.c,v 1.125 2016/03/22 16:45:07 guenther Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -546,6 +546,7 @@ static void (*formatters[])(int) = { sigset, uidname, gidname, + syslogflagname, }; enum { @@ -628,6 +629,7 @@ enum { Sigset, Uidname, Gidname, + Syslogflagname, }; #define Pptr Phexlong @@ -724,7 +726,7 @@ static const formatter scargs[][8] = { [SYS_getgroups] = { Pcount, Pptr }, [SYS_setgroups] = { Pcount, Pptr }, [SYS_setpgid] = { Ppid_t, Ppid_t }, - [SYS_sendsyslog] = { Pptr, Psize }, + [SYS_sendsyslog] = { Pptr, Psize, Syslogflagname }, [SYS_utimensat] = { Atfd, Ppath, Pptr, Atflagsname }, [SYS_futimens] = { Pfd, Pptr }, [SYS_clock_gettime] = { Clockname, Pptr }, diff --git a/usr.bin/kdump/kdump_subr.h b/usr.bin/kdump/kdump_subr.h index e6e8b6b6430..44880781509 100644 --- a/usr.bin/kdump/kdump_subr.h +++ b/usr.bin/kdump/kdump_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump_subr.h,v 1.18 2016/01/14 05:27:42 guenther Exp $ */ +/* $OpenBSD: kdump_subr.h,v 1.19 2016/03/22 16:45:07 guenther Exp $ */ /* * Copyright(c) 2006 2006 David Kirchner <dpk@dpk.net> * @@ -95,5 +95,6 @@ void itimername(int); void evfiltername(int); void evflagsname(int); void evfflagsname(int, int); +void syslogflagname(int); extern int decimal, fancy, basecol, arg1; diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr index 4ab95448402..8fe3caff5e7 100644 --- a/usr.bin/kdump/mksubr +++ b/usr.bin/kdump/mksubr @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: mksubr,v 1.29 2016/01/14 05:27:42 guenther Exp $ +# $OpenBSD: mksubr,v 1.30 2016/03/22 16:45:07 guenther Exp $ # # Copyright (c) 2006 David Kirchner <dpk@dpk.net> # @@ -300,6 +300,7 @@ cat <<_EOF_ #include <nfsserver/nfs.h> #endif #include <ufs/ufs/quota.h> +#include <sys/syslog.h> #include "kdump_subr.h" @@ -360,6 +361,7 @@ auto_switch_type "itimername" "ITIMER_[[:alnum:]_]+" "sys/time.h" auto_switch_type "evfiltername" "EVFILT_[[:alnum:]_]+[[:space:]]+[(]" "sys/event.h" # exclude EV_{SYSFLAGS,FLAG1} auto_orz_type "evflagsname" "EV_[^S][A-Z]+[[:space:]]+0x" "sys/event.h" +auto_orz_type "syslogflagname" "LOG_[A-Z]+[[:space:]]+0x0*[1248]0*[[:space:]]" "sys/syslog.h" cat <<_EOF_ /* |