MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/libexec/webmin/bind8/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/libexec/webmin/bind8/save_net.cgi
#!/usr/bin/perl
# save_net.cgi
# Save global address and topology options

require './bind8-lib.pl';
$access{'defaults'} || &error($text{'net_ecannot'});
&error_setup($text{'net_err'});
&ReadParse();

&lock_file(&make_chroot($config{'named_conf'}));
$conf = &get_config();
$options = &find("options", $conf);
if (!$in{'listen_def'}) {
	for($i=0; defined($addr = $in{"addrs_$i"}); $i++) {
		next if (!$addr);
		local $l = { 'name' => 'listen-on',
			     'type' => 1 };
		if (!$in{"pdef_$i"}) {
			$in{"port_$i"} =~ /^\d+$/ ||
				&error(&text('net_eport', $in{"port_$i"}));
			$l->{'values'} = [ 'port', $in{"port_$i"} ];
			}
		$port = $in{"pdef_$i"} ? 53 : $in{"port_$i"};
		$used{$port}++ && &error(&text('net_eusedport', $port));
		$l->{'members'} =
			[ map { { 'name' => $_ } } split(/\s+/, $addr) ];
		push(@listen, $l);
		}
	}
&save_directive($options, 'listen-on', \@listen, 1);
if (!$in{'saddr_def'}) {
	&check_ipaddress($in{'saddr'}) ||
		&error(&text('net_eaddr', $in{'saddr'}));
	push(@qvals, "address", $in{'saddr'});
	}
if (!$in{'sport_def'}) {
	$in{'sport'} =~ /^\d+$/ || &error(&text('net_eport', $in{'sport'}));
	push(@qvals, "port", $in{'sport'});
	}
if (@qvals) {
	&save_directive($options, 'query-source',
			[ { 'name' => 'query-source',
			    'values' => \@qvals } ], 1);
	}
else {
	&save_directive($options, 'query-source', [ ], 1);
	}
$in{'topology_def'} || $in{'topology'} || &error($text{'net_etopology'});
&save_addr_match('topology', $options, 1);
$in{'allow-recursion_def'} || $in{'allow-recursion'} ||
	&error($text{'net_erecur'});
&save_addr_match('allow-recursion', $options, 1);

&flush_file_lines();
&unlock_file(&make_chroot($config{'named_conf'}));
&webmin_log("net", undef, undef, \%in);
&redirect("");

Anon7 - 2021