Commit 76fcb8aa authored by Leigh Stoller's avatar Leigh Stoller

Bump where we starting hunting for an unused gid since there are bunch

of dead groups at the bottom from the really early days of emulab.
parent 8e5a021d
......@@ -187,6 +187,10 @@ class Group
global $TBBASE, $TBMAIL_APPROVAL, $TBMAIL_AUDIT, $TBMAIL_WWW;
global $MIN_UNIX_GID;
# There appear to be a lot of old groups still around on boss/ops.
$starting_gid = $MIN_UNIX_GID + 200;
$ending_gid = 50000;
#
# Check that we can guarantee uniqueness of the unix group name.
#
......@@ -218,8 +222,8 @@ class Group
DBQueryWarn("select g.unix_gid + 1 as start from groups as g ".
"left outer join groups as r on ".
" g.unix_gid + 1 = r.unix_gid ".
"where g.unix_gid>$MIN_UNIX_GID and ".
" g.unix_gid<50000 and ".
"where g.unix_gid>$starting_gid and ".
" g.unix_gid<$ending_gid and ".
" r.unix_gid is null limit 1");
if (!$query_result || !mysql_num_rows($query_result)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment