aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-10-06 21:27:25 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-10-06 21:27:25 -0700
commit41a003ca5dab2b832ffb8660866d5e0a9ba4cc31 (patch)
treeb56477abf6b31a6bb5b5093b21f1c490364bf567
parentfdb0d5ffe2f2c506e867ecce88d2aa45d7979a3b (diff)
downloadkup-41a003ca5dab2b832ffb8660866d5e0a9ba4cc31.tar.gz
kup: need to escape literal @ in regexps, correct matching operator
Fix literal @ in regexps and use of != when !~ was intended. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-xkup4
1 files changed, 2 insertions, 2 deletions
diff --git a/kup b/kup
index c881ae2..02ed90a 100755
--- a/kup
+++ b/kup
@@ -172,11 +172,11 @@ sub setup_output()
# In batch mode, we dump the output to stdout so the user can
# aggregate it best they wish
unless ($opt{'batch'}) {
- if ($opt{'rsh'} !~ /^([-a-zA-Z0-9._=@:\s]+)$/) {
+ if ($opt{'rsh'} !~ /^([-a-zA-Z0-9._=\@:\s]+)$/) {
die "$0: suspicious KUP_RSH command (if this is bogus let hpa know)\n";
}
my $rsh = $1;
- if ($opt{'host'} != /^([-a-zA-Z0-9._@]+)$/) {
+ if ($opt{'host'} !~ /^([-a-zA-Z0-9._\@]+)$/) {
die "$0: suspicious KUP_HOST (if this is bogus let hpa know)\n";
}
$rsh .= " \Q$1";