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/frox/save_general.cgi
#!/usr/bin/perl
# Save general options

require './frox-lib.pl';
&ReadParse();
&error_setup($text{'general_err'});
$conf = &get_config();

&save_user($conf, "User");
&save_group($conf, "Group");
&save_textbox($conf, "WorkingDir", \&check_dir);
&save_yesno($conf, "DontChroot");
&save_opt_textbox($conf, "LogLevel", \&check_level);
&save_opt_textbox($conf, "PidFile", \&check_pidfile);

&lock_file($config{'frox_conf'});
&flush_file_lines();
&unlock_file($config{'frox_conf'});
&webmin_log("general");
&redirect("");

sub check_dir
{
return -d $_[0] ? undef : $text{'general_edir'};
}

sub check_level
{
return $_[0] =~ /^\d+$/ ? undef : $text{'general_elevel'};
}

sub check_pidfile
{
return $_[0] =~ /^\/\S+$/ ? undef : $text{'general_epidfile'};
}