Ignore:
Timestamp:
Nov 22, 2011, 12:45:17 AM (11 years ago)
Author:
achernya
Message:
Merge branches/fc15-dev to trunk
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/server/fedora/config/etc/syslog-ng/d_zroot.pl

    r1747 r2066  
    3232sub buildKeyMap($) {
    3333    my ($file) = @_;
    34     open (KEYS, $file) or warn "Couldn't open $file: $!";
     34    open (KEYS, $file) or (warn "Couldn't open $file: $!\n" and return);
    3535    while (<KEYS>) {
    3636        chomp;
     
    5858buildKeyMap("/root/.ssh/authorized_keys2");
    5959
    60 while (1) {
    61     my @message = scalar(<>);
     60my @message;
     61
     62while (my $line = <>) {
     63    @message = $line;
    6264    eval {
    6365        local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
     
    8082        } elsif ($message =~ m|Root (\S+) shell|) {
    8183            sendmsg($message);
    82         } elsif ($message =~ m|session \S+ for user (\S+)|) {
    83             sendmsg($message) if exists $USERS{$1};
     84        } elsif ($message =~ m|pam_unix\(([^:]+):session\): session \S+ for user (\S+)|) {
     85            sendmsg($message) if $1 ne "cron" and exists $USERS{$2};
    8486        } elsif ($message =~ m|^Found matching (\w+) key: (\S+)|) {
    8587            if ($sshkeys{$2}) {
     
    117119        } elsif ($message =~ m|^ *root : TTY=|) {
    118120        } elsif ($message =~ m|^Set /proc/self/oom_adj to |) {
     121        } elsif ($message =~ m|^fatal: mm_request_receive: read: Connection reset by peer$|) {
    119122        } else {
    120123            sendmsg($message, "scripts-spew");
  • trunk/server/fedora/config/etc/syslog-ng/syslog-ng.conf

    r1259 r2066  
     1@version:3.2
     2
    13# syslog-ng configuration file.
    24#
     
    810
    911options {
    10         sync (0);
     12        flush_lines (0);
    1113        time_reopen (10);
    1214        log_fifo_size (1000);
     
    1618        create_dirs (no);
    1719        keep_hostname (yes);
     20        stats_freq (0);
    1821};
    1922
    2023source s_sys {
    21         file ("/proc/kmsg" log_prefix("kernel: "));
     24        file ("/proc/kmsg" program_override("kernel: "));
    2225        unix-stream ("/dev/log");
    2326        internal();
     
    2831destination d_mesg { file("/var/log/messages"); };
    2932destination d_auth { file("/var/log/secure"); };
    30 destination d_mail { file("/var/log/maillog" sync(10)); };
     33destination d_mail { file("/var/log/maillog" flush_lines(10)); };
    3134destination d_spol { file("/var/log/spooler"); };
    3235destination d_boot { file("/var/log/boot.log"); };
Note: See TracChangeset for help on using the changeset viewer.