diff options
author | carlosg <carlosg> | 2004-09-14 11:33:03 +0000 |
---|---|---|
committer | carlosg <carlosg> | 2004-09-14 11:33:03 +0000 |
commit | b61d9a1b91eaf24803104e6868fa0bf84d357e62 (patch) | |
tree | 2ab03e4117832326586b9b82a5886d80eb43fc23 | |
parent | c9d60fa464360c0c4b85b79de3c022de0a4799b2 (diff) |
2004-09-14 Carlos Garnacho Parro <carlosg@gnome.org>
* added lots of stuff from the development-for-1-2 branch, namely:
- shares tool skeleton, more is to come
- added group descriptions, so the users tool now shows
"can use cdrom devices" and stuff like that
- updated pixmaps for services, time and users
- beer for adults and candies for children
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | share.pl.in | 2 | ||||
-rwxr-xr-x | shares-conf.in | 29 | ||||
-rw-r--r-- | users-conf.in | 21 |
4 files changed, 51 insertions, 10 deletions
@@ -1,3 +1,12 @@ +2004-09-14 Carlos Garnacho Parro <carlosg@gnome.org> + + * shares-conf.in: made "/etc/exports" the default NFS exports file + for all distros, this is pretty standard + * share.pl.in, shares-conf.in: small fixes, made it work (at least + the SMB exports) with all the distributions that network-conf + already supports + * users-conf.in: Added <allows_to> tag for some groups. + 2004-09-13 Carlos Garnacho Parro <carlosg@gnome.org> * Release 1.0 diff --git a/share.pl.in b/share.pl.in index 4af57c7..7d4f65b 100644 --- a/share.pl.in +++ b/share.pl.in @@ -368,7 +368,7 @@ sub gst_share_parse_smb_conf for $section (@sections) { next if ($section =~ /^(global)|(homes)|(printers)$/); - next if (&gst_parse_ini_bool ($smb_conf_name, $section, "printable")); + next if (!&gst_parse_ini_bool ($smb_conf_name, $section, "printable")); my $sesi = &gst_share_smb_info_new (); my $point, $comment, $enabled, $browseable, $public, $writable, $printable; diff --git a/shares-conf.in b/shares-conf.in index d57bab8..e455217 100755 --- a/shares-conf.in +++ b/shares-conf.in @@ -63,12 +63,18 @@ BEGIN { $name = "shares"; $version = "@VERSION@"; @platforms = ("redhat-5.2", "redhat-6.0", "redhat-6.1", "redhat-6.2", "redhat-7.0", "redhat-7.1", - "redhat-7.2", + "redhat-7.2", "redhat-8.0", "redhat-9", "openna-1.0", - "mandrake-7.2", - "debian-2.2", "debian-woody", - "suse-7.0", "turbolinux-7.0", - "freebsd-4", "freebsd-5", "freebsd-6"); + "mandrake-7.1", "mandrake-7.2", "mandrake-9.0", "mandrake-9.1", "mandrake-9.2", + "mandrake-10.0", "mandrake-10.1", + "blackpanther-4.0", + "debian-2.2", "debian-3.0", "debian-sarge", + "suse-7.0", "suse-9.0", + "turbolinux-7.0", "fedora-1", "fedora-2", + "pld-1.0", "pld-1.1", "pld-1.99", + "conectiva-9", "conectiva-10", + "slackware-9.1.0", "slackware-10.0.0", + "gentoo", "freebsd-4", "freebsd-5", "freebsd-6"); $description =<<"end_of_description;"; Configures network shares for import or export. @@ -626,9 +632,16 @@ sub get_configured_imports sub get_configured_exports { my ($smb_exports, $nfs_exports); + my (%dist_attrib, $smb_conf, $exports); + + %dist_attrib = &gst_network_get_parse_table (); + $smb_conf = $dist_attrib{"fn"}{"SMB_CONF"}; + + # This is pretty standard + $exports = "/etc/exports"; - $smb_exports = &gst_share_parse_smb_conf (&distro_file ("smb.conf")); - $nfs_exports = &gst_share_parse_nfs_exports (&distro_file ("exports")); + $smb_exports = &gst_share_parse_smb_conf ($smb_conf); + $nfs_exports = &gst_share_parse_nfs_exports ($exports); return ($smb_exports, $nfs_exports); } @@ -641,7 +654,7 @@ sub get my $config = {}; $tools = &get_installed_tools (); - $imports = &get_configured_imports (); +# $imports = &get_configured_imports (); ($smb_exports, $nfs_exports) = &get_configured_exports (); $$config{"tools"} = $tools; diff --git a/users-conf.in b/users-conf.in index c2067ec..1b426b1 100644 --- a/users-conf.in +++ b/users-conf.in @@ -172,6 +172,20 @@ for ($i = 0; $groups_prop_array[$i] ne ""; $i += 2) $groups_prop_map {$groups_prop_array[$i + 1]} = $groups_prop_array[$i]; } +# Please, keep this list sorted +%groups_desc_map = ( + # TRANSLATORS: this is a list of infinitive actions + "adm" => _("Monitorize system logs"), + "audio" => _("Use audio devices"), + "cdrom" => _("Access to CD-ROM drives"), + "dialout" => _("Access to modem devices"), + "dip" => _("Connect to internet through modem devices"), + "fax" => _("Send and receive faxes"), + "floppy" => _("Access to floppy drives"), + "tape" => _("Access to tape drives"), + "wheel" => _("Be able to get administrator privileges"), +); + %login_defs_prop_map = (); %profiles_prop_map = (); @@ -1391,7 +1405,7 @@ sub xml_print { my ($hash) = @_; my ($key, $value, $i, $j, $k); - my ($passwd_last_modified, $users); + my ($passwd_last_modified, $users, $desc); $passwd_last_modified = $$hash{"passwd_last_modified"}; $users = $$hash{"users"}; @@ -1446,6 +1460,11 @@ sub xml_print { &gst_xml_print_pcdata ($groups_prop_map{$j}, $$i[$j]); } + + # Add the description based on the group name + $desc = $groups_desc_map{$$i[1]}; + &gst_xml_print_pcdata ("allows_to", $desc) if ($desc ne undef); + &gst_xml_container_enter ('users'); $k = $$i[$groups_prop_map{"users"}]; foreach $j (@$k) |