Commit 31c18595 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Hmm, the default group for a project has to have the same idx as the

project. Or put a better way, when pid=gid then have to set
pid_idx=gid_idx to keep everyone happy.
parent bb7aabf8
......@@ -129,9 +129,6 @@ while (getpwuid($uid)) { $uid++; }
my $gid = $MINGID;
while (getgrgid($gid)) { $gid++; }
my $ggid = $gid + 1;
while (getgrgid($ggid)) { $ggid++; }
# We put the proto-user in the tbadmin group, because the emulab-ops
# group does not exist yet
my $agid = (getgrnam($tbadmin))[2];
......@@ -193,7 +190,8 @@ if (!defined($opts{u})) {
DBQueryFatal("insert into groups set pid='$protoproj', gid='$protoproj', ".
"leader='$protouser', created=now(), ".
"description='Default Group', " .
"unix_gid=$ggid, gid_idx=$ggid, unix_name='$protoproj'");
"unix_gid=$gid, gid_idx=$gid, pid_idx=$gid, ".
"unix_name='$protoproj'");
DBQueryFatal("insert into group_stats set ".
"pid='$protoproj',gid='$protoproj',gid_idx=$gid");
......
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