3 # Save NIS server security options
5 require './nis-lib.pl';
7 &error_setup($text{'security_err'});
10 if ($config{'securenets'}) {
11 for($i=0; defined($in{"net_$i"}); $i++) {
12 next if ($in{"def_$i"} == -1);
13 if ($in{"def_$i"} == 0) {
14 &check_ipaddress($in{"net_$i"}) ||
15 &error(&text('security_enet', $in{"net_$i"}));
16 &check_ipaddress($in{"mask_$i"}) ||
17 &error(&text('security_emask', $in{"mask_$i"}));
18 $mask = $in{"mask_$i"};
20 elsif ($in{"def_$i"} == 1) {
21 &check_ipaddress($in{"net_$i"}) ||
22 &error(&text('security_enet', $in{"net_$i"}));
25 elsif ($in{"def_$i"} == 2) {
26 $in{"net_$i"} = "0.0.0.0";
29 push(@lines, $mask." ".$in{"net_$i"}."\n");
31 &open_tempfile(SERVERS, ">$config{'securenets'}");
32 &print_tempfile(SERVERS, @lines);
33 &close_tempfile(SERVERS);
36 # Save OS-specific security options
37 &parse_server_security();