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.
This commit is contained in:
@@ -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;
|
||||
@@ -123,7 +123,7 @@ fuzzers += [
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
[['src/fuzz/fuzz-hostname-util.c'],
|
||||
[['src/fuzz/fuzz-hostname-setup.c'],
|
||||
[libshared],
|
||||
[]],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user