Commit 75b39948 authored by Mike Hibler's avatar Mike Hibler
Browse files

Take out the hardwired IQN prefix and check.

An alternative would be to autoconf the value from the defs file,
but I don't want the client side to depend on the defs file at all.
parent 5a2bc8fd
......@@ -48,7 +48,6 @@ if ($EUID != 0) {
}
# Script specific goo
my $IQN_PREFIX = "iqn.2000-10.net.emulab";
my $OLDCONFIG = "$VARDIR/db/storage.conf";
my $STORAGEMAP = "$BOOTDIR/storagemap";
......@@ -408,8 +407,7 @@ sub process($$$$)
warn("*** No iSCSI target portal specified\n");
return 0;
}
if ($href->{'UUID_TYPE'} ne "iqn" ||
$href->{'UUID'} !~ /^$IQN_PREFIX/) {
if ($href->{'UUID_TYPE'} ne "iqn") {
warn("*** Invalid iSCSI target name '".$href->{'UUID'}."'\n");
return 0;
}
......
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