#!@PERL@
# Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# 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 the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
use Sys::Hostname;
use Symbol;
use IO::Handle;
+use MIME::Base64 ();
use Amanda::Constants;
use Amanda::Config qw( :init :getconf config_dir_relative );
use Amanda::Debug qw( :logging );
$self->{domain} = $domain if defined $domain && $domain ne "";
my ($username, $password) = split('%', $userpasswd, 2);
$self->{username} = $username;
+ if ($password =~ /^6G\!dr(.*)/) {
+ my $base64 = $1;
+ $password = MIME::Base64::decode($base64);
+ }
$self->{password} = $password;
$self->{password} = undef if (defined $password && $password eq "");
} else {
sub command_selfcheck {
my $self = shift;
- $self->print_to_server("disk " . quote_string($self->{disk}));
+ $self->print_to_server("disk " . quote_string($self->{disk}),
+ $Amanda::Script_App::GOOD);
$self->print_to_server("amsamba version " . $Amanda::Constants::VERSION,
$Amanda::Script_App::GOOD);