| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
for sockets is non-blocking.
This allows us to G/C SS_NBIO. Having to keep the two flags in sync
in a mp-safe way is complicated.
This change introduce a behavior change in sosplice(), it can now
always block. However this should not matter much due to the socket
lock being taken beforhand.
ok bluhm@, benno@, visa@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
via sendsyslog(2) along with the corresponding errno.
Help when troubleshooting which program is triggering an error, like
an overflow.
ok bluhm@
|
|
|
|
| |
okay bluhm@, deraadt@
|
|
|
|
|
|
| |
truncate the length of a syslog message to 8192 bytes. Use one
global define LOG_MAXLINE for all of them.
OK deraadt@ millert@
|
|
|
|
|
| |
Do the same in sendsyslog(2) and document the behavior.
reported by Ilja Van Sprundel; OK millert@ deraadt@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
should not have it either. While there bring some variables in
sync between both functions.
OK deraadt@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
a flags argument
ok guenther sthen
|
|
|
|
| |
OK deraadt@ natano@
|
| |
|
|
|
|
|
|
| |
makes console redirection with senssyslog(2) and LOG_CONS work
again. Also merge the two if else if else blocks into one.
OK deraadt@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
as osendsyslog for a while. The three argument variant is the only
one that will stay.
input kettenis@; OK deraadt@
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
OK deraadt@ millert@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
dropped message error log.
OK benno@
|
|
|
|
|
|
| |
log atempts. sendsyslog(2) is a good place to detect and report
the problem.
OK deraadt@
|
|
|
|
|
|
| |
Diff from Vitaliy Makkoveev.
Manpage tweak and ok millert@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
|
| |
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
|
|
|
|
|
|
|
|
| |
initialized. Calling malloc(9) at that point is not a good idea. So
initialize consbuf later.
Fixes dmesg -s on sparc64 (and probably a few other architectures).
ok miod@, deraadt@
|
|
|
|
|
| |
Help and feedback by Theo and Miod.
OK deraadt@, manpage-ok jmc@
|
|
|
|
| |
ok tedu@ deraadt@
|
| |
|
|
|
|
| |
ok doug tedu
|
|
|
|
|
|
| |
iov_len to 0, we need a propper length calculation. While there,
use -1 for the file descriptor because 0 is reserved for stdin.
OK deraadt@ guenther@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
|
|
| |
a message up into syslogd's /dev/log interface. This will be used to make
syslog_r work during file descriptor exhaustion, or inside sandboxes which
prohibit socket, connect, sendto, etc.
The system call is being added about a week before the library and daemon
changes.
ok guenther tedu miod matthew
|
|
|
|
|
|
|
|
|
| |
struct ucred; struct process then directly links to the ucred
Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.
ok matthew@
|
| |
|
|
|
|
|
|
| |
the obvious cases to return EINVAL and ENXIO.
ok tedu deraadt
|
|
|
|
|
|
|
|
|
|
| |
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).
Based on a diff from tedu.
ok deraadt
|
|
|
|
|
|
| |
not -1;
ok miod@
|
| |
|
| |
|
|
|
|
|
|
| |
detecting phantom devices when scanning dmesg output.
Suggested by miod@, ok deraadt@.
|
|
|
|
|
|
|
| |
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
|
|
|
|
| |
takes a void *. convert uiomove to take a void * as well. ok deraadt@
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
| |
and i converted syslog to libevent and it works now (;
|
| |
|