summaryrefslogtreecommitdiffstats
path: root/perl-install/network/smb.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-29 10:55:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-29 10:55:31 +0000
commit48eb74c3d2e93715b0ac483a3e1f638c674ceca0 (patch)
tree8b8e9786ddd1e6d59ccb27828afca847d2e63a9b /perl-install/network/smb.pm
parentaf7f9c869b7faf1ce0f0aba6d07aeabfcfed2943 (diff)
downloaddrakx-backup-do-not-use-48eb74c3d2e93715b0ac483a3e1f638c674ceca0.tar
drakx-backup-do-not-use-48eb74c3d2e93715b0ac483a3e1f638c674ceca0.tar.gz
drakx-backup-do-not-use-48eb74c3d2e93715b0ac483a3e1f638c674ceca0.tar.bz2
drakx-backup-do-not-use-48eb74c3d2e93715b0ac483a3e1f638c674ceca0.tar.xz
drakx-backup-do-not-use-48eb74c3d2e93715b0ac483a3e1f638c674ceca0.zip
- use $::prefix for reading/writing (it was missing for writing)
- use output_p so that /etc/samba directory is created if needed (fix bug reported by David Eastcott)
Diffstat (limited to 'perl-install/network/smb.pm')
-rw-r--r--perl-install/network/smb.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index d212f5122..abf742800 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -131,14 +131,14 @@ sub remove_bad_credentials {
sub save_credentials {
my ($credentials) = @_;
my $file = $credentials->{file};
- output($file, map { "$_ = $credentials->{$_}\n" } qw(username domain password));
- chmod(0640, $file);
+ output_p($file, map { "$_ = $credentials->{$_}\n" } qw(username domain password));
+ chmod(0640, "$::prefix$file");
}
sub read_credentials_raw {
my ($file) = @_;
- my %h = map { /(.*?)\s*=\s*(.*)/ } cat_($file);
+ my %h = map { /(.*?)\s*=\s*(.*)/ } cat_("$::prefix$file");
\%h;
}