summaryrefslogtreecommitdiff
path: root/lib/sbin/CST
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-09-16 15:35:22 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-09-16 15:35:22 +0000
commit9247164704cd32ef72e3d0f078c5afd679ca3257 (patch)
treef105b5649e9bbc83b9b3f785a5a97ebee6c54543 /lib/sbin/CST
parent049bb18bd1fc1d69841a6286f9e9008141faac9b (diff)
Check thorn names are valid when running CST
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2363 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CST')
-rw-r--r--lib/sbin/CST12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST
index a9c1ce2d..42781521 100644
--- a/lib/sbin/CST
+++ b/lib/sbin/CST
@@ -6,7 +6,7 @@
# @desc
# Parses the the configuration files for thorns.
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.46 2001-09-03 21:48:51 allen Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.47 2001-09-16 15:35:22 allen Exp $
#@@*/
# Global parameter to track the number of errors from the CST
@@ -247,6 +247,16 @@ sub CreateThornList
$package = $1;
$thorn_name = $2;
+
+ # Check valid thornname
+
+ if (!TestName(1,$thorn_name))
+ {
+ $message = "Thorn name $thorn_name is not valid";
+ $hint = "Thorn names must begin with a letter, and can only contain letters, numbers and underscores\n";
+ &CST_error(0,$message,$hint,__LINE__,__FILE__);
+ }
+
# No longer strip thorn_ off the beginning of a thorn name.
# $thorn_name =~ s/thorn_//;