mirror of
https://github.com/webmin/webmin.git
synced 2026-09-19 03:50:39 +01:00
Skip duplicate users https://github.com/webmin/webmin/issues/673
This commit is contained in:
@@ -191,7 +191,9 @@ if ($access{'gedit_mode'} == 2 || $access{'gedit_mode'} == 3) {
|
||||
map { $gcan{$_}++ } split(/\s+/, $access{'gedit'});
|
||||
}
|
||||
setgrent();
|
||||
local %doneg;
|
||||
while(@ginfo = getgrent()) {
|
||||
next if ($doneg{$ginfo[0]}++);
|
||||
@mems = &unique( split(/ /, $ginfo[3]), @{$members{$ginfo[2]}} );
|
||||
if (@mems > 3) { @mems = (@mems[0..1], "..."); }
|
||||
$ginfo[3] = join(' ', @mems);
|
||||
|
||||
@@ -182,7 +182,9 @@ if ($access{'uedit_mode'} == 2 || $access{'uedit_mode'} == 3) {
|
||||
map { $ucan{$_}++ } split(/\s+/, $access{'uedit'});
|
||||
}
|
||||
setpwent();
|
||||
local %doneu;
|
||||
while(@uinfo = getpwent()) {
|
||||
next if ($doneu{$uinfo[0]}++);
|
||||
if ($access{'uedit_mode'} == 5 && $access{'uedit'} !~ /^\d+$/) {
|
||||
# Get group for matching by group name
|
||||
@ginfo = getgrgid($uinfo[3]);
|
||||
|
||||
Reference in New Issue
Block a user