Changeset 2177
- Timestamp:
- 06/07/08 11:17:41 (6 months ago)
- Files:
-
- psad/trunk/psad (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
psad/trunk/psad
r2170 r2177 632 632 unless $debug; 633 633 634 ### psad _requires_that kmsgsd is running to receive any data (unless634 ### psad requires that kmsgsd is running to receive any data (unless 635 635 ### SYSLOG_DAEMON is set to ulogd or psad is configured to acquire data 636 636 ### from a normal file via IPT_SYSLOG_FILE), so let's start it here for good … … 640 640 ### place to start the other daemons since we just wrote the psad pid 641 641 ### to PID_FILE above. 642 unless ($config{'ENABLE_SYSLOG_FILE'} eq 'Y') { 643 system $cmds{'kmsgsd'} 644 unless $no_kmsgsd 642 unless ($config{'ENABLE_SYSLOG_FILE'} eq 'Y' 643 or $no_kmsgsd 645 644 or $config{'SYSLOG_DAEMON'} =~ /ulog/i 646 or $kmsgsd_started; 645 or $kmsgsd_started) { 646 system $cmds{'kmsgsd'}; 647 $kmsgsd_started = 1; 648 } 649 650 unless ($kmsgsd_started) { 651 my $pid = &is_running($pidfiles{'kmsgsd'}); 652 653 if ($pid) { 654 kill 9, $pid unless kill 15, $pid; 655 } 656 unlink $pidfiles{'kmsgsd'} if -e $pidfiles{'kmsgsd'}; 647 657 } 648 658 … … 1424 1434 ($pkt_hr->{'flags'} =~ /ACK/ || $pkt_hr->{'flags'} =~ /RST/)) { 1425 1435 1426 ### $dp > 1024 && ($pkt_hr->{'flags'} =~ /ACK/ ||1436 ### $dp > 1024 && ($pkt_hr->{'flags'} =~ /ACK/ || 1427 1437 1428 1438 ### FIXME: ignore TCP packets that have the ACK or RST … … 6528 6538 my $print = 1; 6529 6539 if ($pidname eq 'kmsgsd' 6530 and $config{'SYSLOG_DAEMON'} =~ /ulog/i) { 6540 and ($config{'SYSLOG_DAEMON'} =~ /ulog/i 6541 or $config{'ENABLE_SYSLOG_FILE'} eq 'Y')) { 6531 6542 $print = 0; 6532 6543 } … … 6538 6549 my $print = 1; 6539 6550 if ($pidname eq 'kmsgsd' 6540 and $config{'SYSLOG_DAEMON'} =~ /ulog/i) { 6551 and ($config{'SYSLOG_DAEMON'} =~ /ulog/i 6552 or $config{'ENABLE_SYSLOG_FILE'} eq 'Y')) { 6541 6553 $print = 0; 6542 6554 } … … 7732 7744 my $print = 1; 7733 7745 if ($pidname eq 'kmsgsd' 7734 and $config{'SYSLOG_DAEMON'} =~ /ulog/i) { 7746 and ($config{'SYSLOG_DAEMON'} =~ /ulog/i 7747 or $config{'ENABLE_SYSLOG_FILE'} eq 'Y')) { 7735 7748 $print = 0; 7736 7749 } … … 7741 7754 my $print = 1; 7742 7755 if ($pidname eq 'kmsgsd' 7743 and $config{'SYSLOG_DAEMON'} =~ /ulog/i) { 7756 and ($config{'SYSLOG_DAEMON'} =~ /ulog/i 7757 or $config{'ENABLE_SYSLOG_FILE'} eq 'Y')) { 7744 7758 $print = 0; 7745 7759 } … … 8678 8692 my $print = 1; 8679 8693 if ($pidname eq 'kmsgsd' 8680 and $config{'SYSLOG_DAEMON'} =~ /ulog/i) { 8694 and ($config{'SYSLOG_DAEMON'} =~ /ulog/i 8695 or $config{'ENABLE_SYSLOG_FILE'} eq 'Y')) { 8681 8696 $print = 0; 8682 8697 } … … 9067 9082 sub restart_kmsgsd() { 9068 9083 9084 return if $config{'ENABLE_SYSLOG_FILE'} eq 'Y'; 9069 9085 return if $no_kmsgsd or $config{'SYSLOG_DAEMON'} =~ /ulog/i; 9070 9086 return unless -e $pidfiles{'kmsgsd'};
