Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e91f68fb
Commit
e91f68fb
authored
Apr 03, 2014
by
Leigh B Stoller
Browse files
Set a per-vnode root password on shared VMs.
Doing this here allows jailconfig in tmcd to return it.
parent
fddcd467
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/Node.pm.in
View file @
e91f68fb
...
...
@@ -2541,6 +2541,13 @@ sub CreateVnodes($$$)
}
$node->SetNodeHistory(TB_NODEHISTORY_OP_CREATE(),
$user, $experiment);
#
# On a shared node, generate a new root password so that
# tmcd can return it in the jail config call. On a dedicated
# node, the physical host password is used.
#
$node->NewRootPasswd()
if (defined($sharing_mode) && $sharing_mode);
}
}
@$rptr = @created;
...
...
@@ -2559,6 +2566,7 @@ sub CreateVnodes($$$)
DBQueryWarn("delete from node_activity where node_id='
$
vnodeid
'");
DBQueryWarn("delete from node_idlestats where node_id='
$
vnodeid
'");
DBQueryWarn("delete from iface_counters where node_id='
$
vnodeid
'");
DBQueryWarn("delete from node_attributes where node_id='
$
vnodeid
'");
}
}
DBQueryFatal("unlock tables");
...
...
@@ -2958,7 +2966,7 @@ sub NewRootPasswd($)
my $hash = TBGenSecretKey();
# But only part of it.
$hash = substr($hash, 0, 1
0
);
$hash = substr($hash, 0, 1
2
);
DBQueryWarn("replace into node_attributes set ".
" node_id='
$
node_id
',".
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment