diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-12-11 16:40:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-12-15 17:59:48 +0100 |
commit | 52ef5dd7989d886945e18ab50de31bf5a21ba158 (patch) | |
tree | ed64c0d2c22b0ea1a1375c24ca692fdad3e4e07e /src/import/import-tar.c | |
parent | 9e815cf2c2d8463e58c6609edb6a33f9bb62e7b5 (diff) | |
download | systemd-52ef5dd7989d886945e18ab50de31bf5a21ba158.tar.gz |
hostname-util: flagsify hostname_is_valid(), drop machine_name_is_valid()
Let's clean up hostname_is_valid() a bit: let's turn the second boolean
argument into a more explanatory flags field, and add a flag that
accepts the special name ".host" as valid. This is useful for the
container logic, where the special hostname ".host" refers to the "root
container", i.e. the host system itself, and can be specified at various
places.
let's also get rid of machine_name_is_valid(). It was just an alias,
which is confusing and even more so now that we have the flags param.
Diffstat (limited to 'src/import/import-tar.c')
-rw-r--r-- | src/import/import-tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/import-tar.c b/src/import/import-tar.c index 9f68d45eac..d68ce91613 100644 --- a/src/import/import-tar.c +++ b/src/import/import-tar.c @@ -329,7 +329,7 @@ int tar_import_start(TarImport *i, int fd, const char *local, bool force_local, assert(fd >= 0); assert(local); - if (!machine_name_is_valid(local)) + if (!hostname_is_valid(local, 0)) return -EINVAL; if (i->input_fd >= 0) |