diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-11-30 17:19:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-11-30 17:19:30 +0000 |
commit | a3d5079d63d53d7a639162a03a89fa8fdcfbee8a (patch) | |
tree | ca49369788e9776ddfce6e0b93e33413908b6ea0 /perl-install/any.pm | |
parent | 2f9e01cce5dba4fa11add841f63d0afea97d85eb (diff) | |
download | drakx-a3d5079d63d53d7a639162a03a89fa8fdcfbee8a.tar drakx-a3d5079d63d53d7a639162a03a89fa8fdcfbee8a.tar.gz drakx-a3d5079d63d53d7a639162a03a89fa8fdcfbee8a.tar.bz2 drakx-a3d5079d63d53d7a639162a03a89fa8fdcfbee8a.tar.xz drakx-a3d5079d63d53d7a639162a03a89fa8fdcfbee8a.zip |
fileshare should be ok, handle diskdrake --fileshare, fix smb import
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 45db781a7..9e459af1c 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -864,4 +864,33 @@ sub devfssymlinkf { symlinkf($if, "$prefix/$_") foreach ("dev/$of", "lib/dev-state/$of"); } +sub fileshare_config { + my ($in) = @_; + + my $file = '/etc/security/fileshare.conf'; + my %conf = getVarsFromSh($file); + + my @l = (__("No sharing"), __("Allow all users"), __("Custom")); + my $restrict = exists $conf{RESTRICT} ? text2bool($conf{RESTRICT}) : 1; + + my $r = $in->ask_from_list_('fileshare', +'Do you want to allow users to export some directories in their home? +Allowing this will permit users to simply click on "Share" in konqueror and nautilus. + +"Custom" permit a per-user granularity. +', + \@l, $l[$restrict ? 0 : 1]) or return; + $restrict = $r ne $l[1]; + $conf{RESTRICT} = bool2yesno($restrict); + + setVarsInSh($file, \%conf); + if ($r eq $l[2]) { + # custom + $in->ask_warn('', +'The per-user sharing uses the group "fileshare". +You can use userdrake to add a user in this group. +Or on the command line use: "usermod -G fileshare user_name"'); + } +} + 1; |