| Server IP : 89.117.53.150 / Your IP : 216.73.216.11 Web Server : Apache System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : iscmbt-kufa-atu ( 1014) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/nis/ |
Upload File : |
#!/usr/bin/perl
# save_protocols.cgi
# Create, update or delete a protocol
require './nis-lib.pl';
&ReadParse();
($t, $lnums, $protocol) = &table_edit_setup($in{'table'}, $in{'line'}, '\s+');
if ($in{'delete'}) {
# Just delete the service
&table_delete($t, $lnums);
}
else {
# Validate inputs and save the protocol
&error_setup($text{'protocols_err'});
$in{'name'} =~ /^[A-Za-z0-9\_\-]+$/ || &error($text{'protocols_ename'});
$in{'number'} =~ /^\d+$/ || &error($text{'protocols_enumber'});
@protocol = ( $in{'name'}, $in{'number'}, split(/\s+/, $in{'aliases'}) );
if ($in{'line'} eq '') {
&table_add($t, "\t", \@protocol);
}
else {
&table_update($t, $lnums, "\t", \@protocol);
}
}
&apply_table_changes() if (!$config{'manual_build'});
&redirect("edit_tables.cgi?table=$in{'table'}");