} elsif ($normstate eq 'html') {
$this .= $_;
} elsif ($normstate eq 'go') {
+ s/^\030//;
if ($mail) {
$mail .= $_;
} else {
#!/usr/bin/perl
-# $Id: db2html.in,v 1.9 2002/09/25 16:16:55 doogie Exp $
+# $Id: db2html.in,v 1.10 2002/10/15 23:33:37 cjwatson Exp $
# usage: db2html [-diff] [-stampfile=<stampfile>] [-lastrun=<days>] <wwwbase>
#load the necessary libraries/configuration
} elsif ($normstate eq 'html') {
$this .= $_;
} elsif ($normstate eq 'go') {
+ s/^\030//;
$this .= &sani($_);
} elsif ($normstate eq 'go-nox') {
next if !s/^X//;
# -*- perl -*-
-# $Id: errorlib.in,v 1.7 2002/10/06 22:54:48 cjwatson Exp $
+# $Id: errorlib.in,v 1.8 2002/10/15 23:33:37 cjwatson Exp $
sub F_SETLK { 6; } sub F_WRLCK{ 1; }
$flockstruct= 'sslll'; # And there ought to be something for this too.
return undef;
}
+sub escapelog {
+ my @log = @_;
+ map { s/^([\01-\07\030])/\030$1/gm } @log;
+ return \@log;
+}
+
@severities= @gSeverityList;
@showseverities= @severities;
#!/usr/bin/perl
-# $Id: process.in,v 1.50 2002/10/09 00:02:33 cjwatson Exp $
+# $Id: process.in,v 1.51 2002/10/15 23:33:37 cjwatson Exp $
#
# Usage: process nn
# Temps: incoming/Pnn
print DEBUG "failed open log err $!<\n";
&quit("opening db-h/$hash/$ref.log (li): $!");
}
- print(AP "\7\n",@log,"\n\3\n") || &quit("writing db-h/$hash/$ref.log (li): $!");
+ print(AP "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/$hash/$ref.log (li): $!");
close(AP) || &quit("closing db-h/$hash/$ref.log (li): $!");
}
my $hash = get_hashname($ref);
#save email to the log
open(AP,">>db-h/$hash/$ref.log") || &quit("opening db-h/$hash/$ref.log (lo): $!");
- print(AP "\2\n",join("\4",@recips),"\n\5\n$msg\n\3\n") ||
+ print(AP "\2\n",join("\4",@recips),"\n\5\n",@{escapelog($msg)},"\n\3\n") ||
&quit("writing db-h/$hash/$ref.log (lo): $!");
close(AP) || &quit("closing db-h/$hash/$ref.log (lo): $!");
#!/usr/bin/perl
-# $Id: service.in,v 1.55 2002/10/12 18:39:01 cjwatson Exp $
+# $Id: service.in,v 1.56 2002/10/15 23:33:37 cjwatson Exp $
# ^ more or less ^
#
# Usage: service <code>.nn
&sani($header{'from'})."</code>\n".
"to <code>".&sani($controlrequestaddr)."</code>\n".
"\3\n".
- "\7\n",@log,"\n\3\n") || &quit("writing db-h/-1.log: $!");
+ "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/-1.log: $!");
close(AP) || &quit("open db-h/-1.log: $!");
&unfilelock;
utime(time,time,"db-h");
"Request was from <code>".&sani($header{'from'})."</code>\n".
"to <code>".&sani($controlrequestaddr)."</code>. \n".
"\3\n".
- "\7\n",@log,"\n\3\n") || &quit("writing db-h/$hash/$ref.log: $!");
+ "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/$hash/$ref.log: $!");
close(L) || &quit("closing db-h/$hash/$ref.log: $!");
open(S,">db-h/$hash/$ref.status.new") || &quit("opening db-h/$hash/$ref.status.new: $!");
print(S