summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5cfe4a4)
raw | patch | inline | side by side (parent: 5cfe4a4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Dec 2006 08:09:08 +0000 (08:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Dec 2006 08:09:08 +0000 (08:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5358 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupGeneric.inc | patch | blob | history | |
plugins/personal/posix/class_posixAccount.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc
index 588c842c88c6e81599fc153bbfa3de05102fd2e6..dba7c496a53745fb9410f59249b686eb368ce143 100644 (file)
}
/* Find out next free id near to UID_BASE */
- for ($id= $this->config->current['UIDBASE']; $id++; $id<65000){
+ for ($id= $this->config->current['UIDBASE']; $id++; $id < pow(2,32)){
if (!in_array($id, $ids)){
return ($id);
}
}
- /* Should not happen */
- if ($id == 65000){
- print_red(_("Too many users, can't allocate a free ID!"));
+ /* check if id reached maximum of 32 bit*/
+ if ($id >= pow(2,32)){
+ echo _("Too many users, can't allocate a free ID!");
exit;
}
}
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index c6d8eea8e20355b0c2841bbe3ef8ca7ef3005fea..8f44a6257d7aac9228cd41d51006d80549dd2a33 100644 (file)
}
/* Find out next free id near to UID_BASE */
- for ($id= $this->config->current['UIDBASE']; $id++; $id<65000){
+ for ($id= $this->config->current['UIDBASE']; $id++; $id < pow(2,32)){
if (!in_array($id, $ids)){
return ($id);
}
}
- /* Should not happen */
- if ($id == 65000){
- print_red(_("Too many users, can't allocate a free ID!"));
+ /* Check if current id reaches the maximum of 32 bit */
+ if ($id >= pow(2,32)){
+ echo _("Too many users, can't allocate a free ID!");
exit;
}
-
}
function reload()