From 8fb494435889dcb9e1c09b8c7220e47bab717bf9 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 27 Jul 2015 22:15:26 -0400 Subject: hostname-util: add relax parameter to hostname_is_valid Tests are modified to check behaviour with relax and without relax. New tests are added for hostname_cleanup(). Tests are moved a new file (test-hostname-util) because there's now a bunch of them. New parameter is not used anywhere, except in tests, so there should be no observable change. --- src/network/networkd-network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network/networkd-network.c') diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index d8f42621af..e3ac70ff33 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -838,7 +838,7 @@ int config_parse_hostname(const char *unit, if (r < 0) return r; - if (!hostname_is_valid(hn)) { + if (!hostname_is_valid(hn, false)) { log_syntax(unit, LOG_ERR, filename, line, EINVAL, "hostname is not valid, ignoring assignment: %s", rvalue); free(hn); -- cgit v1.2.3-54-g00ecf