summaryrefslogtreecommitdiffstats
path: root/src/basic/hostname-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-12-11 16:26:04 +0100
committerLennart Poettering <lennart@poettering.net>2020-12-15 17:59:44 +0100
commit9e815cf2c2d8463e58c6609edb6a33f9bb62e7b5 (patch)
tree157c026429c2f8699e02b7bf104aff6715c643af /src/basic/hostname-util.c
parentlogs-show: drop redundant validation of machine name (diff)
downloadsystemd-9e815cf2c2d8463e58c6609edb6a33f9bb62e7b5.tar.xz
systemd-9e815cf2c2d8463e58c6609edb6a33f9bb62e7b5.zip
hostname-util: explain what 'LDH' is
Diffstat (limited to 'src/basic/hostname-util.c')
-rw-r--r--src/basic/hostname-util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index 5c3157fdf2..82cd37b154 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -89,6 +89,8 @@ int gethostname_strict(char **ret) {
}
bool valid_ldh_char(char c) {
+ /* "LDH" → "Letters, digits, hyphens", as per RFC 5890, Section 2.3.1 */
+
return
(c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||