Commit 1c0d1a2d authored by Leigh B Stoller's avatar Leigh B Stoller

Hmm, we do not add nonlocal users to groups on ops, so doing the image

import as the updater does not work in this case, so use the creator which
is always going to have local groups (since it is geniuser or a real
user). I need to think about why we do not do this, it dates back to the
original stuff we did for the Probe cluster, but we are now using nonlocal
users and projects n a different way for the Cloudlab portal.
parent 4c766a97
......@@ -257,6 +257,11 @@ if ($update) {
$user = undef;
if (defined($updater_uid)) {
$user = User->Lookup($updater_idx);
# Ick, setgroups skips nonlocal users, so user does not have
# permission to do this on ops. Needs thought.
if ($user->IsNonLocal()) {
$user = undef;
if (!defined($user)) {
$user = User->Lookup($image->creator_idx());
......@@ -266,7 +271,9 @@ if ($update) {
$UID = $SAVEUID = $user->unix_uid();
$EUID = 0;
else {
if (!defined($image->metadata_url())) {
Markdown is supported
0% or
Finish editing this message first!
Please register or to comment