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

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

accessible.
parent ecce80e1
......@@ -2,7 +2,7 @@
#
# 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.
#
......@@ -187,6 +187,10 @@ if ($inout eq "modify" && @ARGV > 2) {
else {
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";
}
......
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