Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
0fac2e7e
Commit
0fac2e7e
authored
Oct 17, 2001
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a needed access check, and some other minor cleanups.
parent
015b503e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
db/nfree.in
db/nfree.in
+15
-2
No files found.
db/nfree.in
View file @
0fac2e7e
...
...
@@ -36,6 +36,12 @@ my $pid = shift;
my
$eid
=
shift
;
use
strict
;
use
English
;
#
# Turn off line buffering on output
#
$|
=
1
;
# Make sure that the experiment actually exists
# NOTE: project permissions checking is done later, on an individual
...
...
@@ -44,6 +50,13 @@ if (!ExpState($pid,$eid)) {
die
("
There is no experiment '
$eid
' in project '
$pid
'.
\n
");
}
#
# Make sure the user has the ability to modify this experiment
#
if
(
!
TBExptAccessCheck
(
$UID
,
$pid
,
$eid
,
TB_EXPT_MODIFY
))
{
die
("
You don't have sufficient access to modify '
$eid
' in project '
$pid
'.
\n
");
}
######################################################################
# Step 1 - Free nodes
#
...
...
@@ -120,7 +133,7 @@ foreach my $n (@node_names) {
#
$result
=
DBQueryFatal
("
select node_id,image_id from scheduled_reloads
"
.
"
where node_id='
$n
'
");
if
(
$result
->
num
_
rows
()
>
0
)
{
if
(
$result
->
numrows
()
>
0
)
{
my
@row
=
$result
->
fetchrow
();
my
$image_id
=
$row
[
1
];
...
...
@@ -222,7 +235,7 @@ if ((@reloads > 0) || (keys %reserves > 0)) {
#
# Take care of reloads by putting them into a special experiment,
# which is processed by the
batch
_daemon
# which is processed by the
reload
_daemon
#
foreach
my
$n
(
@reloads
)
{
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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