diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-03 13:18:16 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-03 13:18:16 -0800 |
commit | 67437a202498f8ae9fd3a2a9828142390ddd46e1 (patch) | |
tree | 3f83e4a94ba0c266e62278dabf8eef5d1c913116 /templates/system | |
parent | b3e932f1a726000bf9e11392d01fd617f1d5c8e3 (diff) | |
download | vyatta-cfg-system-67437a202498f8ae9fd3a2a9828142390ddd46e1.tar.gz vyatta-cfg-system-67437a202498f8ae9fd3a2a9828142390ddd46e1.zip |
don't allow illegal hostnames
Be more restrictive on hostnames to conform with RFC 952.
Host name can't begin or end with a minus sign.
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/host-name/node.def | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/system/host-name/node.def b/templates/system/host-name/node.def index 54ed9fef..437a939d 100644 --- a/templates/system/host-name/node.def +++ b/templates/system/host-name/node.def @@ -1,7 +1,7 @@ type: txt help: Configure system host name default: "vyatta" -syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" +syntax:expression: pattern $VAR(@) "^[[:alpha:]][-.[:alpha:]]*[[:alpha:]]$" ; "invalid host name $VAR(@)" update: sudo sh -c " \ hostname '$VAR(@)' |