diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-12-05 12:26:29 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-12-10 09:56:56 +0100 |
commit | d65652f1f21a4b0c59711320f34266c635393c89 (patch) | |
tree | 1486de1f51215bf0a6577f4594eaf9f42f26a481 /src/basic/hostname-util.h | |
parent | resolve: reject host names with leading or trailing dashes in /etc/hosts (diff) | |
download | systemd-d65652f1f21a4b0c59711320f34266c635393c89.tar.xz systemd-d65652f1f21a4b0c59711320f34266c635393c89.zip |
Partially unify hostname_is_valid() and dns_name_is_valid()
This makes hostname_is_valid() apply the ldh checks too, rejecting more
hostnames.
Diffstat (limited to 'src/basic/hostname-util.h')
-rw-r--r-- | src/basic/hostname-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index 749481723d..7ba386a0fd 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -11,6 +11,7 @@ bool hostname_is_set(void); char* gethostname_malloc(void); int gethostname_strict(char **ret); +bool valid_ldh_char(char c) _const_; bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_; char* hostname_cleanup(char *s); |