summaryrefslogtreecommitdiffstats
path: root/samba_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-07-13 02:23:01 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-07-13 02:23:01 +0000
commite7b39a967c7ec6f10435e86760621025c5f48a12 (patch)
tree6e2a5db75f5d1ee39dfc12977ea7dd987d6e6ace /samba_wizard
parentb8c0360d94a6d7e750d1bd17d5e414ca4e76ca55 (diff)
downloaddrakwizard-e7b39a967c7ec6f10435e86760621025c5f48a12.tar
drakwizard-e7b39a967c7ec6f10435e86760621025c5f48a12.tar.gz
drakwizard-e7b39a967c7ec6f10435e86760621025c5f48a12.tar.bz2
drakwizard-e7b39a967c7ec6f10435e86760621025c5f48a12.tar.xz
drakwizard-e7b39a967c7ec6f10435e86760621025c5f48a12.zip
hide create mask and directory mask
Diffstat (limited to 'samba_wizard')
-rwxr-xr-xsamba_wizard/Sambashare.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/samba_wizard/Sambashare.pm b/samba_wizard/Sambashare.pm
index 4e74f716..37360bcf 100755
--- a/samba_wizard/Sambashare.pm
+++ b/samba_wizard/Sambashare.pm
@@ -217,14 +217,15 @@ $o->{pages} = {
my $share = $o->{var}{wiz_selected_share};
exists $samba->{$share}{'preserve case'} and $o->{var}{wiz_share_preserve_case} = $samba->{$share}{'preserve case'};
exists $samba->{$share}{'short preserve case'} and $o->{var}{wiz_share_short_preserve_case} = $samba->{$share}{'short preserve case'};
- exists $samba->{$share}{'create mask'} and $o->{var}{wiz_share_create_mask} = $samba->{$share}{'create mask'};
+ exists $samba->{$share}{'create mask'} and $o->{var}{wiz_share_create_mask} = $samba->{$share}{'create mask'} or $samba->{$share}{'create mask'} = "664";
+ exists $samba->{$share}{'directory mask'} and $o->{var}{wiz_share_directory_mask} = $samba->{$share}{'directory mask'} or $samba->{$share}{'directory mask'} = 775;
exists $samba->{$share}{'force create mode'} and $o->{var}{wiz_share_force_create_mode} = $samba->{$share}{'force create mode'};
exists $samba->{$share}{'force directory mode'} and $o->{var}{wiz_share_force_directory_mode} = $samba->{$share}{'force directory mode'};
exists $samba->{$share}{'force group'} and $o->{var}{wiz_share_force_group} = $samba->{$share}{'force group'};
exists $samba->{$share}{'default case'} and $o->{var}{wiz_share_default_case} = $samba->{$share}{'default case'};
},
data => [
- { label => N("create mask"), val => \$o->{var}{wiz_share_create_mask}, help => N("When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise \'AND\'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit not set here will be removed from the modes set on a file when it is created.") },
+# { label => N("create mask"), val => \$o->{var}{wiz_share_create_mask}, help => N("When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise \'AND\'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit not set here will be removed from the modes set on a file when it is created.") },
{ label => N("force create mode"), val => \$o->{var}{wiz_share_force_create_mode}, help => N("This parameter specifies a set of UNIX mode bit permissions that will always be set on a file created by Samba. This is done by bitwise \'OR\'ing these bits onto the mode bits of a file that is being created or having its permissions changed. The default for this parameter is (in octal) 000. ie: force create mode = 0700 ") },
{ label => N("force directory mode"), val => \$o->{var}{wiz_share_force_directory_mode}, help => N("This parameter specifies a set of UNIX mode bit permissions that will always be set on a directory created by Samba. This is done by bitwise \'OR\'ing these bits onto the mode bits of a directory that is being created. The default for this parameter is (in octal) 0000 which will not add any extra permission bits to a created directory. Default: ie: force directory mode = 0755") },
{ label => N("force group"), val => \$o->{var}{wiz_share_force_group}, help => N("This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking. ie: force group = agroup") },
@@ -303,10 +304,12 @@ $o->{pages} = {
pre => sub {
$o->{var}{wiz_addshare_createmode} = "0700";
$o->{var}{wiz_owner} = 1;
+ $o->{var}{wiz_addshare_createmask} = "664";
+ $o->{var}{wiz_addshare_directorymask} = "775";
},
data => [
{ label => N("Writable:"), val => \$o->{var}{wiz_addshare_writable}, fixed_list => \@yesorno },
- { label => N("Create mask:"), val => \$o->{var}{wiz_addshare_createmask} },
+# { label => N("Create mask:"), val => \$o->{var}{wiz_addshare_createmask} },
{ label => N("Read list:"), val => \$o->{var}{wiz_addshare_readlist}, help => N("Specifies a list \of users that have read-only access to a writable share. ie: aginies") },
{ label => N("Write list:"), val => \$o->{var}{wiz_addshare_writelist}, help => N("Specifie a user that have read-write access to a share. ie: guibo") },
{ label => N("User own directory:"), type => 'bool', val => \$o->{var}{wiz_owner} },
@@ -587,6 +590,7 @@ sub do_it_modify_share {
$o->{var}{wiz_share_preserve_case} and $samba->{$share}{'preserve case'} = $o->{var}{wiz_share_preserve_case};
$o->{var}{wiz_share_short_preserve_case} and $samba->{$share}{'short preserve case'} = $o->{var}{wiz_share_short_preserve_case};
$o->{var}{wiz_share_create_mask} and $samba->{$share}{'create mask'} = $o->{var}{wiz_share_create_mask};
+ $o->{var}{wiz_share_directory_mask} and $samba->{$share}{'directory mask'} = $o->{var}{wiz_share_directory_mask};
$o->{var}{wiz_share_force_create_mode} and $samba->{$share}{'force create mode'} = $o->{var}{wiz_share_force_create_mode};
$o->{var}{wiz_share_force_directory_mode} and $samba->{$share}{'force directory mode'} = $o->{var}{wiz_share_force_directory_mode};
$o->{var}{wiz_share_force_group} and $samba->{$share}{'force group'} = $o->{var}{wiz_share_force_group};
@@ -677,6 +681,8 @@ sub do_it_add_share {
create_smbuser($o->{var}{wiz_addshare_writelist});
}
$o->{var}{wiz_addshare_createmask} and $samba->{$share}{'create mask'} = $o->{var}{wiz_addshare_createmask};
+ $o->{var}{wiz_addshare_directorymask} and $samba->{$share}{'directory mask'} = $o->{var}{wiz_addshare_directorymask};
+
write_conf_restart_smb();
undef $w;