From 8c4c6b120e7778c97aa4b817b6d09d0c9f1dc126 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 25 Mar 2005 14:20:26 +0000 Subject: [PATCH] fixed problem if GIDs greater than maxGID exist --- lam/lib/modules/posixGroup.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 02450cac..ac43a9d6 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -776,10 +776,12 @@ class posixGroup extends baseModule { $minID = intval($this->moduleSettings['posixGroup_minGID'][0]); $maxID = intval($this->moduleSettings['posixGroup_maxGID'][0]); $dn_gids = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', '*'); - // get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) + // get_cache will return an array ( dn1 => array(gidnumber1), dn2 => array(gidnumber2), ... ) $gids = array(); if(is_array($dn_gids)) { - foreach ($dn_gids as $gid) $gids[] = $gid[0]; + foreach ($dn_gids as $gid) { + if (($gid[0] < $maxID) && ($gid[0] > $minID)) $gids[] = $gid[0]; // ignore GIDs > maxID and GIDs < minID + } sort ($gids, SORT_NUMERIC); } for ($i = 0; $i < $count; $i++) {