MOON
Server: Apache
System: Linux cl1170g 4.19.62-mod-std-ipv6-64-rescue #828825 SMP Tue Jul 30 13:54:49 UTC 2019 x86_64
User: wh0f20bb (1057)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //proc/thread-self/root/root/webmin-1.740/iscsi-target/down_allow.cgi
#!/usr/bin/perl
# Move an allowed address down

use strict;
use warnings;
require './iscsi-target-lib.pl';
our (%text, %in);
&ReadParse();

&lock_file(&get_allow_file($in{'mode'}));
my $allow = &get_allow_config($in{'mode'});
my $a = $allow->[$in{'idx'}];
my $s = $allow->[$in{'idx'}+1];
($a->{'line'}, $s->{'line'}) = ($s->{'line'}, $a->{'line'});
&modify_allow($a);
&modify_allow($s);

&webmin_log('move', $in{'mode'}, $a->{'name'});
&lock_file(&get_allow_file($in{'mode'}));
&redirect("list_allow.cgi?mode=$in{'mode'}");