in reply to Sys::Syslog LOG_AUTH perl-5.6.1 and Solaris 2.8

This is the default setting on Solaris, and it tosses away logs related to LOG_AUTH facility.

You can simply modify your /etc/syslog.conf, and add one line:
auth.info /var/log/authlog

Replies are listed 'Best First'.
Re: Re: Sys::Syslog LOG_AUTH perl-5.6.1 and Solaris 2.8
by zengargoyle (Deacon) on Dec 22, 2002 at 00:35 UTC

    the concept of throwing away auth by default sounds foolish. nevertheless, it's not the problem here.

    # fgrep auth.info /etc/syslog.conf auth.info /var/log/auth auth.info @authloghost # logger -p auth.info "hello world" # tail -1 /var/log/auth Dec 21 16:22:04 host.sub.dom username: [ID 702911 auth.info] hello wor +ld

    meanwhile...

    # perl -v This is perl, v5.6.1 built for sun4-solaris ... # perl -e 'use Sys::Syslog; syslog "auth.info", "from perl"' syslog: invalid level/facility: auth at -e line 1 # perl -e 'use Sys::Syslog; sub Sys::Syslog::LOG_AUTH () { 4<<3 }; sys +log "auth.info", "from perl"' # tail -1 /var/log/auth Dec 21 16:30:08 host.sub.dom username: from perl

    i've tried a fresh build of 5.6.1 using Sun's compiler and the auto-everything flags (-des). somehow when it builds the Sys::Syslog module it misses LOG_AUTH (even though it's in sys/syslog.h with everything else). 5.8.1 built with the same compiler/flags works properly. adding the missing function works as well.

      1. So your building environment is correct. Now, read perldelta for perl 5.8.0, search for 'LOG_AUTH', in section "selected bug fixes", it clearly tells you: "Sys::Syslog ignored the LOG_AUTH constant. "

      2. You said: "the concept of throwing away auth by default sounds foolish." On the contrary, this is not foolish at all, when you install Solaris, the default is that Solaris will toss those away. It doesn't matter whether you realize it or whether you like it, it is the default from Solaris.