From a3d5079d63d53d7a639162a03a89fa8fdcfbee8a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 30 Nov 2001 17:19:30 +0000 Subject: fileshare should be ok, handle diskdrake --fileshare, fix smb import --- perl-install/any.pm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'perl-install/any.pm') 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; -- cgit v1.2.1