mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
20 lines
562 B
Perl
Executable File
20 lines
562 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# save_allow.cgi
|
|
# Save the cron allow/deny settings
|
|
|
|
require './cron-lib.pl';
|
|
&ReadParse();
|
|
$access{'allow'} || &error($text{'allow_ecannot'});
|
|
|
|
&lock_file($config{cron_allow_file});
|
|
&lock_file($config{cron_deny_file});
|
|
unlink($config{cron_allow_file});
|
|
unlink($config{cron_deny_file});
|
|
if ($in{mode} == 1) { &save_allowed(split(/\s+/, $in{'allow'})); }
|
|
elsif ($in{mode} == 2) { &save_denied(split(/\s+/, $in{'deny'})); }
|
|
&unlock_file($config{cron_allow_file});
|
|
&unlock_file($config{cron_deny_file});
|
|
&webmin_log("allow");
|
|
&redirect("");
|
|
|