summaryrefslogtreecommitdiffstats
path: root/samba_wizard/Samba.pm
diff options
context:
space:
mode:
Diffstat (limited to 'samba_wizard/Samba.pm')
-rwxr-xr-xsamba_wizard/Samba.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/samba_wizard/Samba.pm b/samba_wizard/Samba.pm
index d40a51a5..e192d0d2 100755
--- a/samba_wizard/Samba.pm
+++ b/samba_wizard/Samba.pm
@@ -23,6 +23,7 @@ package MDK::Wizard::Samba;
use strict;
use common;
+use services;
use MDK::Wizard::Wizcommon;
my $wiz = new MDK::Wizard::Wizcommon;
@@ -112,7 +113,7 @@ $o->{pages} = {
next => 'ask_services'
},
ask_netmask => {
- name => N('Access control') . "\n\n" . N('* Example 1: allow all IPs in 150.203.*.*; except one\nhosts allow = 150.203. EXCEPT 150.203.6.66') . "\n\n" . N('* Example 2: allow hosts that match the given network/netmask\nhosts allow = 150.203.15.0/255.255.255.0') . "\n\n" . N('* Example 3: allow a couple of hosts\nhosts allow = lapland, arvidsjaur') . "\n\n" . N('* Example 4: allow only hosts in NIS netgroup \qfoonet\q, but deny access from one particular host\nhosts allow = @foonet\nhosts deny = pirate') . "\n\n" . N('Note that access still requires suitable user-level passwords.'),
+ name => N('Access control') . "\n\n" . N('* Example 1: allow all IPs in 150.203.*.*; except one\nhosts allow = 150.203. EXCEPT 150.203.6.66') . "\n\n" . N('* Example 2: allow hosts that match the given network/netmask\nhosts allow = 150.203.15.0/255.255.255.0') . "\n\n" . N('* Example 3: allow a couple of hosts\nhosts allow = lapland, arvidsjaur') . "\n\n" . N('* Example 4: allow only hosts in NIS netgroup "foonet", but deny access from one particular host\nhosts allow = @foonet\nhosts deny = pirate') . "\n\n" . N('Note that access still requires suitable user-level passwords.'),
pre => sub {
$o->{var}{wiz_hosts_allow} ||= get_allow_host();
$o->{var}{wiz_hosts_allow} ||= get_deny_host()
@@ -322,10 +323,14 @@ sub list_printers {
my @list if 0;
return @list if @list;
- @list = sort grep /^(?!\#).*/, map {
+ @list = sort grep /^(?!\#).+/, map {
my ($printer) = split(':', $_);
} cat_("/etc/printcap");
- @list
+ if (@list) {
+ @list
+ } else {
+ ()
+ }
}
@@ -466,7 +471,7 @@ sub do_it {
$conf->chg_var("global", "server string", $o->{var}{wiz_banner});
$conf->chg_var("public", "write list", $o->{var}{wiz_write_list}) if $o->{var}{wiz_do_file_sharing};
$conf->chg_var("public", "read list", $o->{var}{wiz_read_list}) if $o->{var}{wiz_do_file_sharing};
- my $ip = $o->itf_get("IPADDR");
+ my $ip = $wiz->{net}->itf_get("IPADDR");
if ($o->{var}{wiz_do_file_sharing}) {
standalone->explanations("Enabling $o->{var}{wiz_dir} samba file sharing");
$conf->comment_menu("public", " ");