syslog and bind

Igmar Palsenberg maillist at chello.nl
Sat Oct 21 10:24:30 UTC 2000


On Fri, 20 Oct 2000, Riley McIntire wrote:

> Greetings:
> I have need to operate a name server on a system without root access and
> without read access to /var/log/messages.
> bind is 8.2.2-p5 running on FreeBSD 4.1
> Is it possible to run a userland instance of syslogd? Or use another logging
> utility?

Main problem is that the port syslog listen on is in the reserved
range. The system won't let you bind to it as a normal user, and you have
the problem that their probably already is a syslog alive.

On this machine, I have no problem syslogging as a normal user, so I don't
see a problem with that. Only problem is that the syslog() function and
family have the port hard-coded in.

> I've tried this in the named.conf file without any luck:
> 
> logging {
>         channel syslog_errors {
>         syslog user;
>         file "/usr/home/vweb/var/log/messages";

I don't this this is right. When logging to syslog, you only specify the
facility and severity, you can't control what syslog does with the
messages.

In this case, named tries to open /usr/home/vweb/var/log/messages, and
will fail if it has no permissions to open it.

>         severity error;
>         };
> 
>         channel default_syslog {
>                        syslog daemon;
>                         file "/usr/home/vweb/var/log/messages";
>                         severity info;
>          };
> };
> 
> And this to test running a separate syslogd:
> 
> syslogd -f /usr/home/vweb/etc/syslog.conf -p /usr/home/vweb/var/run/log
> syslogd: child pid 74533 exited with return code 1

Probably it can't open the file for write.

In your case, the best option is to drop syslog (you can't control it),
and let named write to files.


> Any ideas?
> 
> Thanks much,
> 
> Riley





	Igmar




More information about the bind-users mailing list