summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-05 10:48:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-05 10:48:43 +0000
commit80c54d5ea9cdd5d1237adb563db70077b5d5f0ec (patch)
treea9205e6ed96eab4eae9a2b6e3b31c4acc465e570 /perl-install/network
parentab37fdcc5ebfe36dd23a591b4c62989869d9c705 (diff)
downloaddrakx-backup-do-not-use-80c54d5ea9cdd5d1237adb563db70077b5d5f0ec.tar
drakx-backup-do-not-use-80c54d5ea9cdd5d1237adb563db70077b5d5f0ec.tar.gz
drakx-backup-do-not-use-80c54d5ea9cdd5d1237adb563db70077b5d5f0ec.tar.bz2
drakx-backup-do-not-use-80c54d5ea9cdd5d1237adb563db70077b5d5f0ec.tar.xz
drakx-backup-do-not-use-80c54d5ea9cdd5d1237adb563db70077b5d5f0ec.zip
handle spaces in username
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/smb.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index af201fe68..ef98f6945 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -39,11 +39,11 @@ sub smbclient {
my ($server) = @_;
my $name = $server->{name} || $server->{ip};
my $ip = $server->{ip} ? "-I $server->{ip}" : '';
- my $group = $server->{group} ? " -W $server->{group}" : '';
+ my $group = $server->{group} ? qq( -W "$server->{group}") : '';
my $U = $server->{username} ? sprintf("%s/%s%%%s", @$server{'domain', 'username', 'password'}) : '%';
my %h;
- foreach (`smbclient -g -U $U -L $name $ip$group 2>/dev/null`) {
+ foreach (`smbclient -g -U "$U" -L "$name" $ip$group 2>/dev/null`) {
if (my ($type, $v1, $v2) = /(.*)\|(.*)\|(.*)/) {
push @{$h{$type}}, [ $v1, $v2 ];
} elsif (/^Error returning browse list/) {