Avoid ID clashes in new allocation mode

This commit is contained in:
Jamie Cameron
2007-07-17 02:11:24 +00:00
parent 74f4e728ea
commit 3118112194
3 changed files with 23 additions and 4 deletions

View File

@ -116,8 +116,12 @@ print "<td><b>$text{'uid'}</b></td>\n";
if ($in{'new'}) {
# Find the first free UID above the base
if ($config{'next_uid'}) {
$newuid = $config{'next_uid'};
$config{'next_uid'}++;
while(1) {
$newuid = $config{'next_uid'};
$config{'next_uid'}++;
last if (!&check_uid_used($ldap, &get_user_base(),
"uidNumber", $newuid));
}
&save_module_config();
}
else {