mirror of
https://github.com/webmin/webmin.git
synced 2025-07-25 01:23:45 +00:00
Module config options for next uid and gid
This commit is contained in:
@ -67,7 +67,7 @@ else {
|
||||
@shlist = ($mconfig{'default_shell'} ? ( $mconfig{'default_shell'} ) : ( ));
|
||||
%shells = map { $_, 1 } split(/,/, $config{'shells'});
|
||||
push(@shlist, "/bin/sh", "/bin/csh", "/bin/false") if ($shells{'fixed'});
|
||||
if ($shells{'passwd'} || $in{'new'}) {
|
||||
if ($shells{'passwd'} || $in{'new'} && !$config{'next_uid'}) {
|
||||
# Don't do this unless we need to, as scanning all user is slow
|
||||
&build_user_used(\%used, $shells{'passwd'} ? \@shlist : undef);
|
||||
}
|
||||
@ -115,7 +115,14 @@ else {
|
||||
print "<td><b>$text{'uid'}</b></td>\n";
|
||||
if ($in{'new'}) {
|
||||
# Find the first free UID above the base
|
||||
$newuid = &allocate_uid(\%used);
|
||||
if ($config{'next_uid'}) {
|
||||
$newuid = $config{'next_uid'};
|
||||
$config{'next_uid'}++;
|
||||
&save_module_config();
|
||||
}
|
||||
else {
|
||||
$newuid = &allocate_uid(\%used);
|
||||
}
|
||||
print "<td><input name=uid size=10 value='$newuid'></td> </tr>\n";
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user