summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-09-15 12:10:13 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-09-15 12:10:13 -1000
commit1bc0e782a381b51adb0070ea5d31ed418e0d85ba (patch)
tree9bf73d6af6e5da4bc6ef8e5aeae3eab8fb47cfb1 /network.py
parente87ffe53f8022c086613487b848ce7bb1205bcad (diff)
downloadanaconda-1bc0e782a381b51adb0070ea5d31ed418e0d85ba.tar.gz
anaconda-1bc0e782a381b51adb0070ea5d31ed418e0d85ba.tar.xz
anaconda-1bc0e782a381b51adb0070ea5d31ed418e0d85ba.zip
Use POSIX and LSB hostname length limit.
Going with 255 for now even though this seems to be loosely defined on Linux. POSIX specifies 255 as the max length, but Linux doesn't seem to have a maximum. But LSB likes the POSIX specification, so we'll stick with that.
Diffstat (limited to 'network.py')
-rw-r--r--network.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/network.py b/network.py
index e05109fe7..e3a87672e 100644
--- a/network.py
+++ b/network.py
@@ -51,10 +51,8 @@ def sanityCheckHostname(hostname):
if len(hostname) < 1:
return None
- # XXX: POSIX says this limit is 255, but Linux also defines HOST_NAME_MAX
- # as 64, so I don't know which we should believe. --dcantrell
- if len(hostname) > 64:
- return _("Hostname must be 64 or fewer characters in length.")
+ if len(hostname) > 255:
+ return _("Hostname must be 255 or fewer characters in length.")
validStart = string.ascii_letters + string.digits
validAll = validStart + ".-"