You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.6 KiB

  1. --- a/bin/BackupPC_archive
  2. +++ b/bin/BackupPC_archive
  3. @@ -299,7 +299,7 @@ sub ArchiveCleanup
  4. if ( $NeedPostCmd ) {
  5. UserCommandRun("ArchivePostUserCmd");
  6. if ( $? && $Conf{UserCmdCheckStatus} ) {
  7. - $stat{hostError} = "RestorePreUserCmd returned error status $?";
  8. + $stat{hostError} = "ArchivePostUserCmd returned error status $?";
  9. $stat{xferOK} = 0;
  10. }
  11. }
  12. --- a/bin/BackupPC_dump
  13. +++ b/bin/BackupPC_dump
  14. @@ -1067,7 +1067,7 @@ sub catch_signal
  15. # Send ALRMs to BackupPC_tarExtract if we are using it
  16. #
  17. if ( $tarPid > 0 ) {
  18. - kill($bpc->sigName2num("ARLM"), $tarPid);
  19. + kill($bpc->sigName2num("ALRM"), $tarPid);
  20. }
  21. #
  22. --- a/configure.pl
  23. +++ b/configure.pl
  24. @@ -333,7 +333,10 @@ while ( 1 ) {
  25. $Conf{BackupPCUser} || "backuppc",
  26. "backuppc-user");
  27. if ( $opts{"set-perms"} ) {
  28. - ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
  29. + #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
  30. + $name = 'backuppc';
  31. + $Uid=`id -u`;
  32. + $Gid=`id -g`;
  33. last if ( $name ne "" );
  34. print <<EOF;
  35. @@ -800,6 +803,7 @@ $Conf{ParPath} = '' if ( $Conf{ParPath}
  36. #
  37. # Figure out sensible arguments for the ping command
  38. #
  39. +$Conf{PingArgs} = '-c 1 $host';
  40. if ( defined($Conf{PingArgs}) ) {
  41. $Conf{PingCmd} = '$pingPath ' . $Conf{PingArgs};
  42. } elsif ( !defined($Conf{PingCmd}) ) {
  43. --- a/lib/BackupPC/CGI/View.pm
  44. +++ b/lib/BackupPC/CGI/View.pm
  45. @@ -46,7 +46,7 @@ sub action
  46. my $compress = 0;
  47. my $fh;
  48. my $host = $In{host};
  49. - my $num = $In{num};
  50. + my $num = ${EscHTML($In{num})};
  51. my $type = $In{type};
  52. my $linkHosts = 0;
  53. my($file, $comment);
  54. @@ -136,6 +136,10 @@ sub action
  55. }
  56. $s =~ s/[\n\r]+//g;
  57. if ( $s =~ /smb: \\>/
  58. + || $s =~ /^tar:\d+\s/
  59. + || $s =~ /^ NTLMSSP_/
  60. + || $s =~ /^GENSEC backend /
  61. + || $s =~ /^doing parameter /
  62. || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/
  63. || $s =~ /^tar: dumped \d+ files/
  64. || $s =~ /^\s*added interface/i
  65. --- a/lib/BackupPC/Lib.pm
  66. +++ b/lib/BackupPC/Lib.pm
  67. @@ -512,7 +512,8 @@ sub dirRead
  68. }
  69. if ( $IODirentOk ) {
  70. @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
  71. - map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
  72. + #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
  73. + map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types
  74. } else {
  75. @entries = map { { name => $_} } readdir($fh);
  76. }
  77. --- a/lib/BackupPC/Xfer/Smb.pm
  78. +++ b/lib/BackupPC/Xfer/Smb.pm
  79. @@ -219,7 +219,7 @@ sub readOutput
  80. #
  81. # MAKSYM 14082016: The next regex will never match on Samba-4.3, as
  82. # smbclient doesn't produce output required; keeping it for older Sambas
  83. - if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) {
  84. + if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) {
  85. my $sambaFileSize = $1;
  86. my $pcFileName = $2;
  87. (my $fileName = $pcFileName) =~ s/\\/\//g;
  88. @@ -281,6 +281,9 @@ sub readOutput
  89. } elsif ( /smb: \\>/
  90. || /^\s*tar:\d+/ # MAKSYM 14082016: ignoring 2 more Samba-4.3 specific lines
  91. || /^\s*WARNING:/i
  92. + || /^ NTLMSSP_/
  93. + || /^GENSEC backend /
  94. + || /^doing parameter /
  95. || /^\s*added interface/i
  96. || /^\s*tarmode is now/i
  97. || /^\s*Total bytes written/i