| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/samba/ |
Upload File : |
#!/usr/bin/perl
# Disconnect multiple Samba users
require './samba-lib.pl';
&ReadParse();
@d = split(/\0/, $in{'d'});
@d || &error($text{'viewu_enone'});
# check acls
&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
if ($in{share}) { # this may be cracked very easy, don't know how to do better :(
# per-share acls ...
&error("$text{'eacl_np'} $text{'eacl_pkill'}")
unless &can('rvV',\%access, $in{share}); # read, view conn, kill conn
}
else {
&error("$text{'eacl_np'} $text{'eacl_pgkill'}")
unless $access{'view_all_con'} && $access{'kill_con'};
}
# Kill them
foreach $pid (@d) {
&kill_logged('TERM', $pid);
}
&webmin_log("kills", undef, scalar(@d), \%in);
if ($in{share}) { &redirect("view_users.cgi?share=$in{share}"); }
else { &redirect("view_users.cgi"); }