%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.102 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/usr/share/webmin/apache/ |
Upload File : |
#!/usr/bin/perl
# save_authuser.cgi
# Save, create or delete a user
require './apache-lib.pl';
require './auth-lib.pl';
&ReadParse();
&allowed_auth_file($in{'file'}) ||
&error(&text('authu_ecannot', $in{'file'}));
if ($in{'delete'}) {
# Deleting a user
&delete_authuser($in{'file'}, $in{'olduser'});
}
else {
# Creating or updating
&error_setup($text{'authu_err'});
$in{'user'} =~ /\S/ || &error($text{'authu_euser'});
$in{'user'} !~ /:/ || &error($text{'authu_euser2'});
$oldu = &get_authuser($in{'file'}, $in{'olduser'});
$uinfo{'user'} = $in{'user'};
if ($in{'mode'}) {
$uinfo{'pass'} = $in{'enc'};
}
else {
$salt = chr(int(rand(26))+65).chr(int(rand(26))+65);
$uinfo{'pass'} = &unix_crypt($in{'pass'}, $salt);
}
if (defined($in{'olduser'})) {
# updating an old user
if ($in{'olduser'} ne $in{'user'} &&
&get_authuser($in{'file'}, $in{'user'})) {
&error(&text('authu_edup', $in{'user'}));
}
&save_authuser($in{'file'}, $in{'olduser'}, \%uinfo);
}
else {
# creating a new one
if (&get_authuser($in{'file'}, $in{'user'})) {
&error(&text('authu_edup', $in{'user'}));
}
&create_authuser($in{'file'}, \%uinfo);
}
}
&redirect($in{'url'});