Commit a24591db authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add check to make sure that NS (swapmod) file is a plain file and

accessible.
parent ecce80e1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group. # Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -187,6 +187,10 @@ if ($inout eq "modify" && @ARGV > 2) { ...@@ -187,6 +187,10 @@ if ($inout eq "modify" && @ARGV > 2) {
else { else {
die("Tainted nsfile name: $tempnsfile"); die("Tainted nsfile name: $tempnsfile");
} }
if (! -f $tempnsfile || -z $tempnsfile) {
die("*** $0:\n".
" $tempnsfile does not look like an NS file!\n");
}
$modnsfile = "$eid-modify.ns"; $modnsfile = "$eid-modify.ns";
} }
......
Supports Markdown
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