| 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/acl/ |
Upload File : |
#!/usr/bin/perl
# Re-set the session user to be some other user, and redirect to /
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, %sessiondb);
&ReadParse();
&can_edit_user($in{'user'}) && $access{'switch'} ||
&error($text{'switch_euser'});
my %miniserv;
&get_miniserv_config(\%miniserv);
&open_session_db(\%miniserv);
my $skey = &session_db_key($main::session_id);
my ($olduser, $oldtime) = split(/\s+/, $sessiondb{$skey});
$olduser || &error($text{'switch_eold'});
$sessiondb{$skey} = "$in{'user'} $oldtime $ENV{'REMOTE_ADDR'}";
dbmclose(%sessiondb);
&reload_miniserv();
&webmin_log("switch", undef, $in{'user'});
&redirect("/");