#
3e676399 |
| 19-Feb-2018 |
mpi <mpi@openbsd.org> |
Remove almost unused `flags' argument of suser().
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field.
No objection from mill
Remove almost unused `flags' argument of suser().
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
show more ...
|
#
1a09950d |
| 17-Oct-2017 |
mpi <mpi@openbsd.org> |
Print the pid of the most recent program that failed to send a log via sendsyslog(2) along with the corresponding errno.
Help when troubleshooting which program is triggering an error, like an overf
Print the pid of the most recent program that failed to send a log via sendsyslog(2) along with the corresponding errno.
Help when troubleshooting which program is triggering an error, like an overflow.
ok bluhm@
show more ...
|
#
38d65f3d |
| 25-Sep-2017 |
espie <espie@openbsd.org> |
sendsyslog should take a const char * everywhere.
okay bluhm@, deraadt@
|
#
e868d397 |
| 08-Aug-2017 |
bluhm <bluhm@openbsd.org> |
Kernel sendsyslog(2), libc syslog(3), and syslogd(8) restrict and truncate the length of a syslog message to 8192 bytes. Use one global define LOG_MAXLINE for all of them. OK deraadt@ millert@
|
#
f87e3989 |
| 18-Jul-2017 |
bluhm <bluhm@openbsd.org> |
Both syslog(3) and syslogd(8) truncate the message at 8192 bytes. Do the same in sendsyslog(2) and document the behavior. reported by Ilja Van Sprundel; OK millert@ deraadt@
|
#
97879693 |
| 27-Mar-2017 |
bluhm <bluhm@openbsd.org> |
Reorder FREF() and FRELE() in a way that the the global variable syslogf always points to a file object with increased reference count. This makes the implementation independent from the fact whethe
Reorder FREF() and FRELE() in a way that the the global variable syslogf always points to a file object with increased reference count. This makes the implementation independent from the fact whether changing the reference counter may sleep. pointed out by Mateusz Guzik; OK deraadt@
show more ...
|
#
599dcb86 |
| 24-Mar-2017 |
bluhm <bluhm@openbsd.org> |
There was a race in dosendsyslog() which resulted in a crash. sosend(syslogf->f_data, ...) could be called with a NULL pointer. syslogf was not NULL, f_data was NULL and f_count was 1. The file stru
There was a race in dosendsyslog() which resulted in a crash. sosend(syslogf->f_data, ...) could be called with a NULL pointer. syslogf was not NULL, f_data was NULL and f_count was 1. The file structure is ref counted, but the global variable syslogf is not protected. So it may change during sleep and dosendsyslog() possibly used a different socket at each access. Solution is to access syslogf only once, use a local copy, and do the ref counting there. OK millert@ deraadt@
show more ...
|
#
88c4a4c3 |
| 23-Jun-2016 |
bluhm <bluhm@openbsd.org> |
As klog dropped message has no ifdef small kernel, sendsyslog should not have it either. While there bring some variables in sync between both functions. OK deraadt@
|
#
bdd0b010 |
| 23-Jun-2016 |
bluhm <bluhm@openbsd.org> |
It is annoying that the dmesg buffer can overflow and loose messages undetected during debugging. To make clear what happens, count the dropped bytes and write message buffer full to syslogd. This
It is annoying that the dmesg buffer can overflow and loose messages undetected during debugging. To make clear what happens, count the dropped bytes and write message buffer full to syslogd. This also helps to have a reliable log system. OK deraadt@ millert@ tedu@
show more ...
|
#
353265c6 |
| 08-Jun-2016 |
bluhm <bluhm@openbsd.org> |
As logging to dmesg with msgbuf_putchar() can happen in any interrupt handler, every access to msg buf counters should be protected by splhigh(). This is already done in some places, make it consist
As logging to dmesg with msgbuf_putchar() can happen in any interrupt handler, every access to msg buf counters should be protected by splhigh(). This is already done in some places, make it consistenly everywhere. OK mpi@ deraadt@
show more ...
|
#
18d324b2 |
| 31-May-2016 |
deraadt <deraadt@openbsd.org> |
sys_osendsyslog can go away; we have transitioned to the new version with a flags argument ok guenther sthen
|
#
c95d2437 |
| 19-May-2016 |
bluhm <bluhm@openbsd.org> |
All msg buf counters are long, so lmin(9) should be used for them. OK deraadt@ natano@
|
#
10e180b8 |
| 18-May-2016 |
bluhm <bluhm@openbsd.org> |
Kill trailing whitespaces.
|
#
c156aeae |
| 18-May-2016 |
bluhm <bluhm@openbsd.org> |
Use constty and cn_devvp for checking wether to use cnwrite(). That makes console redirection with senssyslog(2) and LOG_CONS work again. Also merge the two if else if else blocks into one. OK dera
Use constty and cn_devvp for checking wether to use cnwrite(). That makes console redirection with senssyslog(2) and LOG_CONS work again. Also merge the two if else if else blocks into one. OK deraadt@
show more ...
|
#
89e8e827 |
| 17-May-2016 |
bluhm <bluhm@openbsd.org> |
Allow sendsyslog(2) with LOG_CONS even when /dev/console has not been opened during init(8). Only log with cnwrite() if cn_devvp exists, otherwise use cnputc() as fallback. While there move extern
Allow sendsyslog(2) with LOG_CONS even when /dev/console has not been opened during init(8). Only log with cnwrite() if cn_devvp exists, otherwise use cnputc() as fallback. While there move extern declarations to dev/cons.h. input and OK deraadt@
show more ...
|
#
3401b079 |
| 17-May-2016 |
bluhm <bluhm@openbsd.org> |
Backout the previous fix for the sendsyslog(2) with LOG_CONS solution. Permanently holding /dev/console open in the kernel works only until init(8) calls revoke(2). After that the console device vno
Backout the previous fix for the sendsyslog(2) with LOG_CONS solution. Permanently holding /dev/console open in the kernel works only until init(8) calls revoke(2). After that the console device vnode cannot be used anymore. It still resulted in a hanging init(8) if it tried to syslog(3) something. With the backout also dmesg -s works again.
show more ...
|
#
1f03a107 |
| 10-May-2016 |
bluhm <bluhm@openbsd.org> |
If sendsyslog(2) is called with LOG_CONS before syslogd(8) has been started and before init(8) has opened the console, the kernel could crash as the console device has not been initialized. Open /de
If sendsyslog(2) is called with LOG_CONS before syslogd(8) has been started and before init(8) has opened the console, the kernel could crash as the console device has not been initialized. Open /dev/console in the kernel before starting init(8) and keep it open. This way sendsyslog(2) can be called early in the system. OK beck@ deraadt@
show more ...
|
#
46afc4a4 |
| 21-Mar-2016 |
bluhm <bluhm@openbsd.org> |
Rename the system call sendsyslog2 to sendsyslog. Keep the old one as osendsyslog for a while. The three argument variant is the only one that will stay. input kettenis@; OK deraadt@
|
#
edfe2c56 |
| 13-Jan-2016 |
stefan <stefan@openbsd.org> |
Convert to uiomove(); from Martin Natano, thanks!
ok deraadt@
|
#
4566e8af |
| 07-Jan-2016 |
bluhm <bluhm@openbsd.org> |
In sendsyslogd(2) strip off syslog priority when logging to console. OK deraadt@ millert@
|
#
bec0c223 |
| 01-Jan-2016 |
bluhm <bluhm@openbsd.org> |
The pointer buf is a user space string which was directly passed to tputchar() and could crash the kernel. Better use cnwrite() in sendsyslog2() for writing to console. It takes a struct uio which
The pointer buf is a user space string which was directly passed to tputchar() and could crash the kernel. Better use cnwrite() in sendsyslog2() for writing to console. It takes a struct uio which does the copyin() automatically. In addition cnwrite() outputs to the real console or to a redirected one, whichever is appropriate. One drawback is that the syslog priority cannot be stripped off easily. OK deraadt@
show more ...
|
#
52dd740a |
| 05-Dec-2015 |
tedu <tedu@openbsd.org> |
remove stale lint annotations
|
#
733c0015 |
| 24-Nov-2015 |
deraadt <deraadt@openbsd.org> |
Add sendsyslog2(), which accepts the syslog/openlog "logopt" flag LOG_CONS. If syslogd is not accepting messages, direct them to the console. This allows us to remove the direct /dev/console opening
Add sendsyslog2(), which accepts the syslog/openlog "logopt" flag LOG_CONS. If syslogd is not accepting messages, direct them to the console. This allows us to remove the direct /dev/console opening code from the bowels of libc. Of course, that forgotten code was exposed by pledge. ok kettenis millert beck
show more ...
|
#
8013d6be |
| 11-Sep-2015 |
bluhm <bluhm@openbsd.org> |
The must be no space after the syslog priority in the sendsyslog(2) dropped message error log. OK benno@
|
#
6d39e169 |
| 02-Sep-2015 |
bluhm <bluhm@openbsd.org> |
To make logging to local syslog reliable, log a message about failed log atempts. sendsyslog(2) is a good place to detect and report the problem. OK deraadt@
|