Print this page
5516 perl problems in libbsm/auditxml
Reviewed by: Richard Lowe <richlowe@richlowe.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libbsm/auditxml
          +++ new/usr/src/lib/libbsm/auditxml
↓ open down ↓ 45 lines elided ↑ open up ↑
  46   46  
  47   47  our $debug = 0; # normal use is to set via the file being parsed.
  48   48                 # <debug set="on"/> or <debug set="off"/> or <debug/>
  49   49                 # if the set attribute is omitted, debug state is toggled
  50   50                 # Override with appDebug, but toggle won't do what you
  51   51                 # want.
  52   52  my $appDebug = 0; # used after return from "new auditxml";
  53   53  
  54   54  # Process command-line options
  55   55  our ($opt_d, $opt_e, $opt_i, $opt_o);
       56 +$opt_e = "";
       57 +$opt_i = "";
       58 +$opt_o = "";
  56   59  if (!getopts('de:i:o:') || $#ARGV != 0) {
  57   60      die $usage;
  58   61  }
  59   62  my $outdir = $opt_o || ".";
  60   63  my $pfx_adt = lc($opt_i) || "adt";
  61   64  my $pfx_ADT = uc($pfx_adt);
  62   65  my $pfx_AUE = uc($opt_e) || "AUE";
  63   66  
  64   67  $appDebug = $opt_d;
  65   68  
↓ open down ↓ 634 lines elided ↑ open up ↑
 700  703            else {
 701  704              print STDERR "token id $tokenId not implemented\n";
 702  705            }
 703  706          }
 704  707          else {
 705  708            print STDERR "token = $tokenId is undefined\n";
 706  709            $tokenId = 'error';
 707  710          }
 708  711          my ($xlate, $jni) =
 709  712            formatTableEntry ('', $tokenId, $eventId, '', 0, 0,
 710      -                            $tokenOrder[$sequence], 'NULL', $omit);
      713 +                            $tokenOrder[$sequence], 'NULL', '', $omit);
 711  714          push (@xlateEntryList, $xlate);
 712  715        }
 713  716        else {
 714  717          my $dataType = $extEntry->getAttr('type');
 715  718          $dataType =~ s/\s+//g;   # remove blanks (char * => char*)
 716  719  
 717  720          my $enumGroup = '';
 718  721          if ($dataType =~ /^msg/i) {
 719  722              $enumGroup = $dataType;
 720  723              $enumGroup =~ s/^msg\s*//i;
↓ open down ↓ 392 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX