%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 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/usermin/ |
Upload File : |
#!/usr/bin/perl # clone_mod.cgi # Clone an existing usermin module under a new name require './usermin-lib.pl'; &ReadParse(); &error_setup($text{'clone_err'}); $access{'umods'} || &error($text{'acl_ecannot'}); # Filter out potentially dangerous strings $in{'desc'} = &filter_javascript($in{'desc'}); # Symlink the code directory &get_usermin_miniserv_config(\%miniserv); $src = $in{'mod'}; %minfo = &get_usermin_module_info($src); $count = 2; do { $dst = $src.$count; $count++; } while(-d "$miniserv{'root'}/$dst"); &symlink_logged($src, "$miniserv{'root'}/$dst") || &error(&text('clone_elink', $!)); # Copy the config directory mkdir("$config{'usermin_dir'}/$dst", 0755); $out = &backquote_logged("( (cd $config{'usermin_dir'}/$src ; tar cf - .) | (cd $config{'usermin_dir'}/$dst ; tar xpf -) ) 2>&1"); if ($?) { &error(&text('clone_ecopy', $out)); } $in{'desc'} = &text('clone_desc', $minfo{'desc'}) if (!$in{'desc'}); &open_tempfile(CLONE, ">$config{'usermin_dir'}/$dst/clone"); &print_tempfile(CLONE, "desc=$in{'desc'}\n"); &close_tempfile(CLONE); # Grant access to the clone to this user &read_usermin_acl(undef, \%acl); @mods = &unique(@{$acl{"user"}}, $dst); &save_usermin_acl("user", \@mods); if ($in{'cat'} ne '*') { # Assign to category &lock_file("$config{'usermin_dir'}/webmin.cats"); &read_file("$config{'usermin_dir'}/webmin.cats", \%cats); $cats{$dst} = $in{'cat'}; &write_file("$config{'usermin_dir'}/webmin.cats", \%cats); &unlock_file("$config{'usermin_dir'}/webmin.cats"); } &webmin_log("clone", undef, $in{'mod'}, { 'desc' => $minfo{'desc'}, 'dst' => $dst, 'dstdesc' => $in{'desc'} }); &redirect("");