diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-12-11 16:26:04 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-12-15 17:59:44 +0100 |
commit | 9e815cf2c2d8463e58c6609edb6a33f9bb62e7b5 (patch) | |
tree | 157c026429c2f8699e02b7bf104aff6715c643af /src/basic/hostname-util.c | |
parent | logs-show: drop redundant validation of machine name (diff) | |
download | systemd-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.c | 2 |
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') || |