| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__unused, and change local variables named `sin' (struct
sockaddr_in) to `sin4'. (`sin' conflicts with the definition of
sin(3), which gcc assumes to be defined even if math.h isn't
included (it's a builtin). This is probably a bug in gcc.)
- Apply WARNS=1. WARNS=2 was not used because this program assigns
string literals to (struct iovec).iov_base for writing, and the only
clean way to silence -Wwrite-strings in that case would be to
strdup() and consequently free() those literals, which I considered
too disruptive.
Reviewed by: bde (partially)
|
| |
|
|
|
|
|
|
|
| |
bind to. This is useful for hosts running jails that need syslog to
maintain an open socket to log to a remote host.
Reviewed by: sheldonh
|
|
|
|
|
|
|
|
| |
Fix some string buffer operations.
Based on: OpenBSD
Reviewed by: audit
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
the system on which it is running. The hostname is reloaded when
'HUPped' and a log message generated to note a change (before anyone
points it out, this is not an added security feature).
PR: bin/24444
Reviewed by: freebsd-audit
Approved by: ru
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
- Lose any stray host bits that a user may have entered when providing
a network number and netmask to the `-a' option for IPv6. This is
corresponding to 1.79 that is for IPv4 only.
MFC after: 1 week
|
|
|
|
|
|
|
| |
a network number and netmask to the '-a' option.
Approved by: ru
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
PR: 25784
Submitted by: Jon Villarreal <jonv@ivmg.net>
Reviewed by: iedowse
|
| |
|
|
|
|
|
|
| |
is that LOG_FAC doesn't do quite what you think it does.
PR: 24704
|
|
|
|
|
| |
Reviewed by: freebsd-current
Obtained from: NetBSD
|
|
|
|
| |
console devices.
|
|
|
|
|
|
|
|
|
|
| |
user unless they come directly from the kernel. Document this and
add a flag to syslogd which prevents this conversion.
Sort getopt args while I'm at it.
PR: 21788
Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
|
| |
|
| |
|
|
|
|
|
|
| |
in getopt.
Submitted by: Clive Lin <clive@CirX.ORG>
|
|
|
|
|
|
|
|
|
|
| |
Remove extra parens from my host selection commit.
Add white space after if, while, for and switch.
Get rid of braces around a single statement if.
There should be no functional changes in this commit.
Reviewed by: sheldonh
|
|
|
|
| |
Reviewed by: sheldonh
|
|
|
|
|
|
|
| |
I guess it serves me right for using a patch directly from Jan
Koum. :)
Requested by: many
|
|
|
|
|
|
|
| |
request. This is useful when you have a large site pointed at a
single syslog server.
Submitted by: Jan Koum <jkb@yahoo-inc.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a similar way to the way it can select messages from a given program.
Lines beginning with "+hostname" or "#+hostname" select messaes
from that hostname and lines beginning with "-hostname" or "#-hostname"
match messages not from that hostname.
There are some significant style issues left in the original program
selection code and the man page. This should be cleared up in some
later commits.
Reviewed by: sheldonh
Based on an original patch by: Bernd Walter <ticso@cicely8.cicely.de>
Man page stylist: sheldonh
|
|
|
|
|
|
| |
Reported by: twitch <twitch@vicar.org>
Submitted by: Guido van Rooij <guido@gvr.org>
Reviewed by: security-officer
|
|
|
|
|
|
| |
It was not discussed and should probably not happen.
Requested by: msmith and others
|
|
|
|
|
|
|
|
| |
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
|
| |
|
|
|
|
|
|
|
|
| |
as they ought to be. The description of SA_RESTART was a little
unobvious to me in the man page, so i missed it. Thanks to Bruce for
spotting this.
Submitted by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
would cause syslogd to eventually kill innocent processes in the
system over time (note: not `could' but `would'). Many thanks to my
colleague Mirko for digging into the kernel structures and providing
me with the debugging framework to find out about the nature of this
bug (and to isolate that syslogd was the culprit) in a rather large
set of distributed machines at client sites where this happened
occasionally.
Whenever a child process was no longer responsive, or when syslogd
receives a SIGHUP so it closes all its logging file descriptors, for
any descriptor that refers to a pipe syslogd enters the data about the
old logging child process into a `dead queue', where it is being
removed from (and the status of the dead kitten being fetched) upon
receipt of a SIGCHLD. However, there's a high probability that the
SIGCHLD already arrives before the child's data are actually entered
into the dead queue inside the SIGHUP handler, so the SIGCHLD handler
has nothing to fetch and remove and simply continues. Whenever this
happens, the process'es data remain on the dead queue forever, and
since domark() tried to get rid of totally unresponsive children by
first sending a SIGTERM and later a SIGKILL, it was only a matter of
time until the system had recycled enough PIDs so an innocent process
got shot to death.
Fix the race by masking SIGHUP and SIGCHLD from both handlers mutually.
Add additional bandaids ``just in case'', i. e. don't enter a process
into the dead queue if we can't signal it (this should only happen in
case it is already dead by that time so we can fetch the status
immediately instead of deferring this to the SIGCHLD handler); for the
kill(2) inside domark(), check for an error status (/* Can't happen */
:) and remove it from the dead queue in this case (which if it would
have been there in the first place would have reduced the problem to a
statistically minimal likelihood so i certainly would never have
noticed the bug at all :).
Mirko also reviewed the fix in priciple (mutual blocking of both
signals inside the handlers), but not the actual code.
Reviewed by: Mirko Kaffka <mirko@interface-business.de>
Approved by: jkh
|
|
|
|
| |
fprintf -> warnx.
|
|
|
|
|
|
| |
with the size of the receive buffer.
Pointed out by: ru
|
|
|
|
|
|
|
|
|
| |
vogons, set the size of the receive buffer to 1 and rely on the kernel to
simply drop incoming packets. The logging code was buggy anyway.
Use socklen_t instead of int for the length argument to recvfrom.
Add a 'continue' at the end of a loop for ANSI conformance.
|
|
|
|
|
|
| |
PR: 16098
Submitted by: Alan.Judge@indigo.ie
Reviewed by: ru
|
| |
|
| |
|
|
|
|
|
|
| |
and '1'.
Requested by: mckay
|
| |
|
| |
|
|
|
|
|
| |
after we read a newline, or we have nothing to read from /dev/klog. Read
/dev/klog in non-blocking mode.
|
| |
|
|
|
|
|
| |
arbitrary sources.
Obtained from: OpenBSD
|
|
|
|
|
| |
PR: 8447
Submitted by: Gaspar Chilingarov <nightmar@lemming.acc.am>
|
|
|
|
|
|
| |
PR: 5548
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Obtained from: OpenBSD
|
|
|
|
|
| |
PR: 8762
Submitted by: Igor Roshchin <str@giganda.komkon.org>
|
|
|
|
| |
address of the most recent offender.
|
|
|
|
| |
quieten cc -Wall
|
|
|
|
|
|
|
|
|
|
| |
-current (Thanks Harald). However, on my attempt to try this on -STABLE,
I found that when forwarding to another host the actual messages gets lost.
This is due to a wrong index because when the -v option was added, the
indexes shifted one place.
PR: 7407
Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
|
|
|
|
|
|
|
| |
logging verbosity about facility & priority levels.
PR: 7278
Reviewed by: phk
Submitted by: Harlan Stenn <Harlan.Stenn@pfcs.com>
|
| |
|