-#!/bin/perl
+#!/usr/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_tarExtract: extract data from a dump
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001-2007 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.2.0beta0, released 5 April 2009.
#
# See http://backuppc.sourceforge.net.
#
exit(1);
}
my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
+if ( $ARGV[1] =~ m{(^|/)\.\.(/|$)} ) {
print("$0: bad share name '$ARGV[1]'\n");
exit(1);
}
-my $ShareNameUM = $1;
+my $ShareNameUM = $1 if ( $ARGV[1] =~ /(.*)/ );
my $ShareName = $bpc->fileNameEltMangle($ShareNameUM);
if ( $ARGV[2] !~ /^(\d+)$/ ) {
print("$0: bad compress level '$ARGV[2]'\n");