]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname-setup: don't pass "true" to a flags parameter
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Jul 2023 16:02:52 +0000 (18:02 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 5 Jul 2023 19:10:31 +0000 (03:10 +0800)
src/shared/hostname-setup.c

index 0a560702243fa7a4296ce51efe3a6b3a482a4482..a3b2a913b1e126879cfe15122340e681385b8f98 100644 (file)
@@ -150,7 +150,7 @@ int hostname_setup(bool really) {
         if (r < 0)
                 log_warning_errno(r, "Failed to retrieve system hostname from kernel command line, ignoring: %m");
         else if (r > 0) {
-                if (hostname_is_valid(b, true)) {
+                if (hostname_is_valid(b, VALID_HOSTNAME_TRAILING_DOT)) {
                         hn = b;
                         source = HOSTNAME_TRANSIENT;
                 } else  {