Thread View: news.software.nntp
5 messages
5 total messages
Started by Maurice Janssen
Sun, 02 Jan 2005 09:30
controlchan logging on OpenBSD
Author: Maurice Janssen
Date: Sun, 02 Jan 2005 09:30
Date: Sun, 02 Jan 2005 09:30
37 lines
2384 bytes
2384 bytes
Hi,
A few weeks ago, I posted a message (Msg-ID: <cnkbvn$k11$1@linux.z74.net>)
about processing of control messages on my feeder. After upgrading to
INN-2.4.2 last night (which seems to be running fine), I noticed that
the problem persisted.
However, it appears that control messages are being processed, but
there's nothing in the news.notice logfile. (BTW: this was also the
case for INN-2.4.1, but I noticed this some time after my initial
posting).
After reading ~/bin/controlchan I made the following tiny patch:
$ diff -u controlchan.orig controlchan
--- controlchan.orig Sun Jan 2 10:09:17 2005
+++ controlchan Sun Jan 2 10:14:58 2005
@@ -50,7 +50,7 @@
if ($use_syslog) {
eval "sub Sys::Syslog::_PATH_LOG { '/dev/log' }" if $^O eq 'dec_osf';
- Sys::Syslog::setlogsock('unix') if $^O =~ /linux|dec_osf|freebsd|darwin/;
+ Sys::Syslog::setlogsock('unix') if $^O =~ /linux|dec_osf|freebsd|openbsd|darwin/;
openlog('controlchan', 'pid', $inn::syslog_facility);
}
logmsg('starting');
After restarting INN, the 'starting' line showed up in news.notice, so I
assume that all other messages will also end up there:
Jan 2 10:15:01 gemini controlchan[1981]: starting
Is there a specific reason that openbsd was left out? Maybe other
systems (netbsd?) can be added as well.
--
Maurice
Re: controlchan logging on OpenBSD
Author: Marco d'Itri
Date: Sun, 02 Jan 2005 11:39
Date: Sun, 02 Jan 2005 11:39
10 lines
1235 bytes
1235 bytes
mauricej@xs4all.nl wrote: >Is there a specific reason that openbsd was left out? Maybe other >systems (netbsd?) can be added as well. It's probably time to start listing which systems do NOT allow logging over /dev/log... -- ciao, | Marco | * The Internet is full. Go away. -- Joel Furr *
Re: controlchan logging on OpenBSD
Author: Russ Allbery
Date: Sun, 02 Jan 2005 19:17
Date: Sun, 02 Jan 2005 19:17
24 lines
2242 bytes
2242 bytes
Maurice Janssen <mauricej@xs4all.nl> writes:
> A few weeks ago, I posted a message (Msg-ID:
> <cnkbvn$k11$1@linux.z74.net>) about processing of control messages on my
> feeder. After upgrading to INN-2.4.2 last night (which seems to be
> running fine), I noticed that the problem persisted.
> However, it appears that control messages are being processed, but
> there's nothing in the news.notice logfile. (BTW: this was also the
> case for INN-2.4.1, but I noticed this some time after my initial
> posting).
> After reading ~/bin/controlchan I made the following tiny patch:
What version of Perl are you running? This is supposed to not matter any
more with current versions of Perl and Sys::Syslog; it's supposed to try
TCP, UDP, and then /dev/log in sequence until one of them works. That
code is only in there for versions of Perl older than 5.6.1, I thought.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: controlchan logging on OpenBSD
Author: Maurice Janssen
Date: Sun, 02 Jan 2005 20:40
Date: Sun, 02 Jan 2005 20:40
41 lines
2884 bytes
2884 bytes
Russ Allbery wrote:
>Maurice Janssen <mauricej@xs4all.nl> writes:
>
>> A few weeks ago, I posted a message (Msg-ID:
>> <cnkbvn$k11$1@linux.z74.net>) about processing of control messages on my
>> feeder. After upgrading to INN-2.4.2 last night (which seems to be
>> running fine), I noticed that the problem persisted.
>
>> However, it appears that control messages are being processed, but
>> there's nothing in the news.notice logfile. (BTW: this was also the
>> case for INN-2.4.1, but I noticed this some time after my initial
>> posting).
>
>> After reading ~/bin/controlchan I made the following tiny patch:
>
>What version of Perl are you running? This is supposed to not matter any
>more with current versions of Perl and Sys::Syslog; it's supposed to try
>TCP, UDP, and then /dev/log in sequence until one of them works. That
>code is only in there for versions of Perl older than 5.6.1, I thought.
Ah, that might explain it. By default, syslogd on OpenBSD runs in
secure more, discarding anything it receives on the UDP socket.
Only if the -u switch is used, the input is logged.
Two parts from the syslogd manpage:
-u Select the historical ``insecure'' mode, in which syslogd will
accept input from the UDP port. Some software wants this, but
you can be subjected to a variety of attacks over the network,
including attackers remotely filling logs.
syslogd opens the above described socket whether or not it is running in
secure mode. If syslogd is running in secure mode, all incoming data on
this socket is discarded. The socket is required for sending forwarded
messages.
BTW: Perl version is 5.8.5.
--
Maurice
Re: controlchan logging on OpenBSD
Author: Russ Allbery
Date: Sun, 02 Jan 2005 21:10
Date: Sun, 02 Jan 2005 21:10
27 lines
2409 bytes
2409 bytes
Maurice Janssen <mauricej@xs4all.nl> writes:
> Russ Allbery wrote:
>> What version of Perl are you running? This is supposed to not matter
>> any more with current versions of Perl and Sys::Syslog; it's supposed
>> to try TCP, UDP, and then /dev/log in sequence until one of them works.
>> That code is only in there for versions of Perl older than 5.6.1, I
>> thought.
> Ah, that might explain it. By default, syslogd on OpenBSD runs in
> secure more, discarding anything it receives on the UDP socket.
> Only if the -u switch is used, the input is logged.
I think the problem may be that it's *listening* to the UDP socket, but
discarding everything it gets. If it didn't listen to the socket at all,
I wonder if the fallback would work.
In any case, I wonder if we should go for changing the default order,
telling Sys::Syslog to try unix and stream first, and only if they fail,
to fall back on TCP and UDP. Since unix and stream should at least have
clear failure modes.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads