#
#========================================================================
#
-# Version 2.1.0_CVS, released 13 Mar 2004.
+# Version 3.0.0alpha, released 23 Jan 2006.
#
# See http://backuppc.sourceforge.net.
#
$file = "$TopDir/pc/$host/LOG$ext";
$linkHosts = 1;
} else {
- $file = "$TopDir/log/LOG$ext";
+ $file = "$LogDir/LOG$ext";
$linkHosts = 1;
}
- if ( !$Privileged ) {
+ if ( $type ne "docs" && !$Privileged ) {
ErrorExit($Lang->{Only_privileged_users_can_view_log_or_config_files});
}
if ( !-f $file && -f "$file.z" ) {
my($contentPre, $contentSub, $contentPost);
$contentPre .= eval("qq{$Lang->{Log_File__file__comment}}");
if ( defined($fh = BackupPC::FileZIO->open($file, 0, $compress)) ) {
+
+ $fh->utf8(1);
my $mtimeStr = $bpc->timeStamp((stat($file))[9], 1);
$contentPre .= eval("qq{$Lang->{Contents_of_log_file}}");
last if ( $s eq "" );
$s =~ s/[\n\r]+//g;
# remove any passwords and user names
- $s =~ s/(SmbSharePasswd.*=.*['"]).*(['"])/$1$2/ig;
- $s =~ s/(SmbShareUserName.*=.*['"]).*(['"])/$1$2/ig;
- $s =~ s/(RsyncdPasswd.*=.*['"]).*(['"])/$1$2/ig;
- $s =~ s/(ServerMesgSecret.*=.*['"]).*(['"])/$1$2/ig;
+ $s =~ s/(SmbSharePasswd.*=.*['"]).*(['"])/$1****$2/ig;
+ $s =~ s/(SmbShareUserName.*=.*['"]).*(['"])/$1****$2/ig;
+ $s =~ s/(RsyncdPasswd.*=.*['"]).*(['"])/$1****$2/ig;
+ $s =~ s/(ServerMesgSecret.*=.*['"]).*(['"])/$1****$2/ig;
$s = ${EscHTML($s)};
$s =~ s[(\$Conf\{.*?\})][
my $c = $1;
my $s = lc($c);
$s =~ s{(\W)}{sprintf("%%%02x", ord($1) )}gxe;
- "<a href=\"?action=view&type=docs#item_$s\">$c</a>"
+ "<a href=\"?action=view&type=docs#item_$s\"><tt>$c</tt></a>"
]eg;
$c .= $s . "\n";
}
return $c;
};
#
- # Documentation a different header and no pre or post text,
+ # Documentation has a different header and no pre or post text,
# so just handle it here
#
Header($Lang->{BackupPC__Documentation}, "", 0, $contentSub);