Skip to content

Commit f6e979c

Browse files
committed
linux reserved UIDs should always be considered in use
1 parent 4b48c3d commit f6e979c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

resources/lib/UnityLDAP.php

+12
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ public function getNextOrgGIDNumber($UnitySQL)
159159

160160
private function UIDNumInUse($id)
161161
{
162+
if ($id >= 100 && $id <= 999){
163+
return true;
164+
}
165+
if ($id >= 60000 && $id <= 64999){
166+
return true;
167+
}
162168
$users = $this->userOU->getChildrenArray(true);
163169
foreach ($users as $user) {
164170
if ($user["uidnumber"][0] == $id) {
@@ -173,6 +179,12 @@ private function UIDNumInUse($id)
173179
// one should conform to the other
174180
private function GIDNumInUse($id)
175181
{
182+
if ($id >= 100 && $id <= 999){
183+
return true;
184+
}
185+
if ($id >= 60000 && $id <= 64999){
186+
return true;
187+
}
176188
$groups = $this->groupOU->getChildrenArray(true);
177189
foreach ($groups as $group) {
178190
if ($group["gidnumber"][0] == $id) {

0 commit comments

Comments
 (0)