diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-04 18:39:23 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-16 11:02:15 +0100 |
commit | e2054217d506c73232d00c850bb46ea9caf26cd8 (patch) | |
tree | 089308c31dbb9c0ec9a09279f869e91c049c62df /src/fuzz | |
parent | hostnamed: fix return value (diff) | |
download | systemd-e2054217d506c73232d00c850bb46ea9caf26cd8.tar.xz systemd-e2054217d506c73232d00c850bb46ea9caf26cd8.zip |
Move hostname setup logic to new shared/hostname-setup.[ch]
No functional change, just moving a bunch of things around. Before
we needed a rather complicated setup to test hostname_setup(), because
the code was in src/core/. When things are moved to src/shared/
we can just test it as any function.
The test is still "unsafe" because hostname_setup() may modify the
hostname.
Diffstat (limited to 'src/fuzz')
-rw-r--r-- | src/fuzz/fuzz-hostname-setup.c (renamed from src/fuzz/fuzz-hostname-util.c) | 2 | ||||
-rw-r--r-- | src/fuzz/meson.build | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/fuzz/fuzz-hostname-util.c b/src/fuzz/fuzz-hostname-setup.c index 0a81e74424..b8d36da54a 100644 --- a/src/fuzz/fuzz-hostname-util.c +++ b/src/fuzz/fuzz-hostname-setup.c @@ -4,7 +4,7 @@ #include "fd-util.h" #include "fileio.h" #include "fuzz.h" -#include "hostname-util.h" +#include "hostname-setup.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { _cleanup_fclose_ FILE *f = NULL; diff --git a/src/fuzz/meson.build b/src/fuzz/meson.build index 80fa0f6fcc..83527a68fb 100644 --- a/src/fuzz/meson.build +++ b/src/fuzz/meson.build @@ -123,7 +123,7 @@ fuzzers += [ [libshared], []], - [['src/fuzz/fuzz-hostname-util.c'], + [['src/fuzz/fuzz-hostname-setup.c'], [libshared], []], |