Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2597 → Rev 2598

/conf/nfsen/nfsen-1.3.8.tar.gz
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/conf/nfsen/patch1.diff
0,0 → 1,31
--- Nfcomm.pm.origin
+++ Nfcomm.pm
@@ -261,0 +262,25 @@ sub RunNfdump {
+ #backward compatibility for filter checks
+ if ( $args =~ s/(.*)\s?\-o\s+\"fmt:([^\"]*)\"\s?(.*)// ) {
+ $$opts{'format'} = $2;
+ $args = $1." ".$3;
+ }
+ my $format = $$opts{'format'};
+ if ( exists $$opts{'format'} and $$opts{'format'} ) {
+ my @_tmp;
+ foreach my $line ( split(/[^%a-z]/, $$opts{'format'}) ) {
+ next if $line !~ /^\%/;
+
+ unless ( $line =~ /^\%ff|ts|te|tr|td|pr|exp|eng|sa|da|sap|dap|sp|dp|sn|dn|nh|nhb|ra|sas|das|nas|pas|in|out|pkt|ipkt|opkt|byt|ibyt|obyt|fl|flg|tos|stos|dtos|dir|smk|dmk|fwd|svln|dvln|ismc|odmc|idmc|osmc|mpls1|mpls2|mpls3|mpls4|mpls5|mpls6|mpls7|mpls8|mpls9|mpls10|mpls|bps|pps|bpp|nfc|evt|xevt|msec|iacl|eacl|xsa|xda|xsp|xdp|xsap|xdap|uname|nevt|ivrf|evrf|nsa|nda|nsp|ndp|pbstart|pbend|pbstep|pbsize|cl|sl|al$/ ) {
+ print $socket $EODATA;
+ print $socket "ERR Illegal characters in format\n";
+ return;
+ }
+ }
+ if ( $format =~ /[^\s!-~\n]+/ || $format =~ /['"`\\]/ ) {
+ print $socket $EODATA;
+ print $socket "ERR Illegal characters in format\n";
+ return;
+ }
+ $format = "-o \"fmt:".$$opts{'format'}."\"";
+ }
+
@@ -320 +345 @@ sub RunNfdump {
- my $pid = open(NFDUMP, "$NfConf::PREFIX/nfdump $args '$filter' 2>&1|");
+ my $pid = open(NFDUMP, "$NfConf::PREFIX/nfdump $args $format '$filter' 2>&1|");
/conf/nfsen/patch2.diff
0,0 → 1,33
--- install.pl.origin
+++ install.pl
@@ -553,7 +553,7 @@ sub UpgradeProfiles {
if( ! -f "$NfConf::PROFILEDATADIR/$profilepath/$channel/.nfstat") {
# no shadow profile, but missing channel stat
print "Rebuilding profile stats for '$profilegroup/$profilename'\n";
- NfProfile::DoRebuild(\%profileinfo, $profilename, $profilegroup, $profilepath, 1, 0);
+ NfProfile::DoRebuild(*STDOUT, \%profileinfo, $profilename, $profilegroup, $profilepath, 1, 0);
NfProfile::WriteProfile(\%profileinfo);
}
# make sure it's own by nfsen_uid after the rebuild
diff --git a/libexec/NfProfile.pm b/libexec/NfProfile.pm
index 1ca7436..d58fcd2 100644
--- libexec/NfProfile.pm.origin
+++ libexec/NfProfile.pm
@@ -3441,7 +3441,7 @@ sub CheckProfiles {
} else {
$profileinfo{'type'} = 1;
}
- my $status = DoRebuild(\%profileinfo, $profile, $profilegroup, $profilepath, 0, 0);
+ my $status = DoRebuild(*STDOUT, \%profileinfo, $profile, $profilegroup, $profilepath, 0, 0);
syslog('err', "Rebuilded profile '$profile' in group '$profilegroup': $status ");
}
if ( -f "$NfConf::PROFILESTATDIR/$profilepath/.CANCELED" ) {
@@ -3453,7 +3453,7 @@ sub CheckProfiles {
} else {
$profileinfo{'type'} = 1;
}
- my $status = DoRebuild(\%profileinfo, $profile, $profilegroup, $profilepath, 0, 0);
+ my $status = DoRebuild(*STDOUT, \%profileinfo, $profile, $profilegroup, $profilepath, 0, 0);
syslog('err', "Rebuilded profile '$profile' in group '$profilegroup': $status ");
}
if ( $profileinfo{'locked'} ) {