Changeset 1911 for branches/fc15-dev/server/fedora
- Timestamp:
- Jun 17, 2011, 8:40:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fc15-dev/server/fedora/config/etc/syslog-ng/d_zroot.pl
r1747 r1911 32 32 sub buildKeyMap($) { 33 33 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); 35 35 while (<KEYS>) { 36 36 chomp; … … 58 58 buildKeyMap("/root/.ssh/authorized_keys2"); 59 59 60 while (1) { 61 my @message = scalar(<>); 60 my @message; 61 62 while (my $line = <>) { 63 @message = $line; 62 64 eval { 63 65 local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required … … 80 82 } elsif ($message =~ m|Root (\S+) shell|) { 81 83 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}; 84 86 } elsif ($message =~ m|^Found matching (\w+) key: (\S+)|) { 85 87 if ($sshkeys{$2}) {
Note: See TracChangeset
for help on using the changeset viewer.