diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/fs.pm | 2 | ||||
-rw-r--r-- | perl-install/fs/remote/davfs.pm | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index e8ff46afe..0327ffd7c 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,6 +1,7 @@ - diskdrake o never pass username/password as options with davfs2 o store credentials in davfs2 secret file before mounting + o when user does not specify user/pass with davfs2, fallback to nobody/nobody - adduserdrake o now use password weakness display - added password weakness display feature in interactive diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 61947c0a8..535769d22 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -253,7 +253,7 @@ sub prepare_write_fstab { $options = $opts; push @smb_credentials, $smb_credentials; } - } elsif ($_->{fs_type} eq 'davfs2' && $options =~ /password=/ && !$b_keep_credentials) { + } elsif ($_->{fs_type} eq 'davfs2' && !$b_keep_credentials) { require fs::remote::davfs; if (my ($opts, $davfs_credentials) = fs::remote::davfs::fstab_entry_to_credentials($_)) { $options = $opts || 'defaults'; diff --git a/perl-install/fs/remote/davfs.pm b/perl-install/fs/remote/davfs.pm index 8c2062c19..f6571b502 100644 --- a/perl-install/fs/remote/davfs.pm +++ b/perl-install/fs/remote/davfs.pm @@ -12,8 +12,10 @@ sub fstab_entry_to_credentials { my ($part) = @_; my ($options, $unknown) = fs::mount_options::unpack($part); - $options->{'username='} && $options->{'password='} or return; my %h = map { $_ => delete $options->{"$_="} } qw(username password); + foreach (qw(username password)) { + $h{$_} = 'nobody' if !$h{$_}; + } $h{mntpoint} = $part->{mntpoint} or return; fs::mount_options::pack_($part, $options, $unknown), \%h; } |