%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.101 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/acl/ |
Upload File : |
#!/usr/bin/perl
# delete_group.cgi
# Delete a group (and maybe it's members)
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
our (%in, %text, %config, %access, $base_remote_user);
&ReadParse();
&error_setup($text{'gdelete_err'});
$access{'groups'} || &error($text{'gdelete_ecannot'});
my @glist = &list_groups();
my ($group) = grep { $_->{'name'} eq $in{'group'} } @glist;
my @mems = @{$group->{'members'}};
foreach my $m (@mems) {
&error($text{'gdelete_esub'}) if ($m =~ /^\@/);
}
if (&indexof($base_remote_user, @mems) >= 0) {
&error($text{'gdelete_euser'});
}
elsif (@mems && !$in{'confirm'}) {
# Ask if the user really wants to delete the group and members
&ui_print_header(undef, $text{'gdelete_title'}, "");
print &ui_confirmation_form(
"delete_group.cgi",
&text('gdelete_desc', "<tt>$in{'group'}</tt>",
"<tt>".join(" ", @mems)."</tt>"),
[ [ "group", $in{'group'} ] ],
[ [ "confirm", $text{'gdelete_ok'} ] ],
);
&ui_print_footer("", $text{'index_return'});
}
else {
# Delete the group (and members if any)
&delete_group($in{'group'});
foreach my $u (@mems) {
if ($u =~ /^\@(.*)/) {
&delete_group("$1");
}
else {
&delete_user($u);
}
}
&delete_from_groups("\@".$in{'group'});
&reload_miniserv();
&webmin_log("delete", "group", $in{'group'});
&redirect("");
}