Ignore:
Timestamp:
Dec 17, 2011, 3:05:13 AM (13 years ago)
Author:
geofft
Message:
d_zroot: Merge r2093 and r2094 into Debian copy
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/host/debian/scripts-syslog-ng-config/d_zroot.pl

    r2095 r2096  
    1717@USERS{@USERS} = undef;
    1818
    19 sub zwrite($;$$@) {
    20     my ($message, $class, $instance, @recipients) = @_;
     19sub zwrite($;$$\@) {
     20    my ($message, $class, $instance, $recipref) = @_;
     21    my @recipients = ();
     22    if (defined($recipref)) {
     23        if (@$recipref) {
     24            @recipients = @$recipref;
     25        } else {
     26            $message = '@b(Empty recipient list specified, message redacted)';
     27            $class = $ZCLASS;
     28        }
     29    }
    2130    $class ||= $ZCLASS;
    2231    $instance ||= 'root.'.hostname;
     
    2433    print ZWRITE $message;
    2534    close(ZWRITE);
     35}
     36
     37unless (@RECIPIENTS) {
     38    # Also give a warning at startup
     39    zwrite('@b(No .k5login found, sensitive logs will not be zephyred)', $ZCLASS);
    2640}
    2741
     
    127141
    128142    foreach my $class (keys %toclass) {
    129         if ($class eq "scripts-auto") {
     143        if ($class eq $ZCLASS) {
    130144            zwrite($toclass{$class}, $class);
    131145        } else {
Note: See TracChangeset for help on using the changeset viewer.