mirror of
https://github.com/systemd/systemd
synced 2025-09-28 16:24:45 +02:00
Compare commits
No commits in common. "7b5ed18779992a62ac705952b4dc63b783be93b8" and "4c6dd238b81b7d5825a45b443cbe625ce365f086" have entirely different histories.
7b5ed18779
...
4c6dd238b8
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -36,3 +36,4 @@ timedate:
|
|||||||
- src/timedate/*
|
- src/timedate/*
|
||||||
timesync:
|
timesync:
|
||||||
- src/timesync/*
|
- src/timesync/*
|
||||||
|
- src/time-wait-sync/*
|
||||||
|
2
TODO
2
TODO
@ -21,7 +21,7 @@ Janitorial Clean-ups:
|
|||||||
Features:
|
Features:
|
||||||
|
|
||||||
* sd-boot: define a drop-in dir in the ESP that may contain X.509
|
* sd-boot: define a drop-in dir in the ESP that may contain X.509
|
||||||
certificates. If the firmware is detected to be in setup mode, automatically
|
certificates. If the firmware is detected to be in setup mode, automaticallly
|
||||||
enroll them as PK/KEK/db, turn off setup mode and proceed. Optionally,
|
enroll them as PK/KEK/db, turn off setup mode and proceed. Optionally,
|
||||||
instead of auto-enrolling them add them to the sd-boot menu, giving the user
|
instead of auto-enrolling them add them to the sd-boot menu, giving the user
|
||||||
the option to manually enroll them, after selecting the menu entry. This way,
|
the option to manually enroll them, after selecting the menu entry. This way,
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
|
|
||||||
# Do not edit. Generated by update-man-rules.py.
|
# Do not edit. Generated by update-man-rules.py.
|
||||||
# Update with:
|
# Update with:
|
||||||
# ninja -C build man/update-man-rules
|
# ninja -C build man/update-man-rules
|
||||||
|
401
meson.build
401
meson.build
@ -1553,6 +1553,9 @@ conf.set10('ENABLE_NSS', enable_nss)
|
|||||||
|
|
||||||
conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd'))
|
conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd'))
|
||||||
|
|
||||||
|
tests = []
|
||||||
|
fuzzers = []
|
||||||
|
|
||||||
conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
|
conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
@ -1586,8 +1589,44 @@ else
|
|||||||
endif
|
endif
|
||||||
conf.set10('ENABLE_EFI', have)
|
conf.set10('ENABLE_EFI', have)
|
||||||
|
|
||||||
############################################################
|
#####################################################################
|
||||||
|
|
||||||
|
config_h = configure_file(
|
||||||
|
output : 'config.h',
|
||||||
|
configuration : conf)
|
||||||
|
|
||||||
|
meson_apply_m4 = find_program('tools/meson-apply-m4.sh')
|
||||||
|
|
||||||
|
includes = include_directories('src/basic',
|
||||||
|
'src/boot',
|
||||||
|
'src/core',
|
||||||
|
'src/home',
|
||||||
|
'src/journal',
|
||||||
|
'src/journal-remote',
|
||||||
|
'src/libsystemd-network',
|
||||||
|
'src/libsystemd/sd-bus',
|
||||||
|
'src/libsystemd/sd-device',
|
||||||
|
'src/libsystemd/sd-event',
|
||||||
|
'src/libsystemd/sd-hwdb',
|
||||||
|
'src/libsystemd/sd-id128',
|
||||||
|
'src/libsystemd/sd-netlink',
|
||||||
|
'src/libsystemd/sd-network',
|
||||||
|
'src/libsystemd/sd-resolve',
|
||||||
|
'src/login',
|
||||||
|
'src/nspawn',
|
||||||
|
'src/resolve',
|
||||||
|
'src/shared',
|
||||||
|
'src/shutdown',
|
||||||
|
'src/systemd',
|
||||||
|
'src/time-wait-sync',
|
||||||
|
'src/timesync',
|
||||||
|
'src/udev',
|
||||||
|
'src/xdg-autostart-generator',
|
||||||
|
'.')
|
||||||
|
|
||||||
|
add_project_arguments('-include', 'config.h', language : 'c')
|
||||||
|
|
||||||
|
generate_gperfs = find_program('tools/generate-gperfs.py')
|
||||||
autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
|
autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
|
||||||
hwdb_update_sh = find_program('tools/hwdb-update.sh')
|
hwdb_update_sh = find_program('tools/hwdb-update.sh')
|
||||||
make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
|
make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py')
|
||||||
@ -1596,62 +1635,38 @@ make_man_index_py = find_program('tools/make-man-index.py')
|
|||||||
syscall_table_update_sh = find_program('tools/syscall-table-update.sh')
|
syscall_table_update_sh = find_program('tools/syscall-table-update.sh')
|
||||||
xml_helper_py = find_program('tools/xml_helper.py')
|
xml_helper_py = find_program('tools/xml_helper.py')
|
||||||
update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
|
update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
|
||||||
meson_apply_m4 = find_program('tools/meson-apply-m4.sh')
|
|
||||||
generate_gperfs = find_program('tools/generate-gperfs.py')
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
config_h = configure_file(
|
|
||||||
output : 'config.h',
|
|
||||||
configuration : conf)
|
|
||||||
|
|
||||||
add_project_arguments('-include', 'config.h', language : 'c')
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# binaries that have --help and are intended for use by humans,
|
|
||||||
# usually, but not always, installed in /bin.
|
|
||||||
public_programs = []
|
|
||||||
|
|
||||||
tests = []
|
|
||||||
fuzzers = []
|
|
||||||
|
|
||||||
basic_includes = include_directories(
|
|
||||||
'src/basic',
|
|
||||||
'src/systemd',
|
|
||||||
'.')
|
|
||||||
|
|
||||||
libsystemd_includes = [basic_includes, include_directories(
|
|
||||||
'src/libsystemd/sd-bus',
|
|
||||||
'src/libsystemd/sd-device',
|
|
||||||
'src/libsystemd/sd-event',
|
|
||||||
'src/libsystemd/sd-hwdb',
|
|
||||||
'src/libsystemd/sd-id128',
|
|
||||||
'src/libsystemd/sd-journal',
|
|
||||||
'src/libsystemd/sd-netlink',
|
|
||||||
'src/libsystemd/sd-network',
|
|
||||||
'src/libsystemd/sd-resolve')]
|
|
||||||
|
|
||||||
includes = [libsystemd_includes, include_directories('src/shared')]
|
|
||||||
|
|
||||||
subdir('po')
|
subdir('po')
|
||||||
subdir('catalog')
|
subdir('catalog')
|
||||||
|
subdir('src/libudev')
|
||||||
|
subdir('src/systemd')
|
||||||
subdir('src/basic')
|
subdir('src/basic')
|
||||||
subdir('src/libsystemd')
|
subdir('src/libsystemd')
|
||||||
subdir('src/shared')
|
subdir('src/libsystemd-network')
|
||||||
subdir('src/udev')
|
subdir('src/journal')
|
||||||
subdir('src/libudev')
|
subdir('src/login')
|
||||||
|
|
||||||
|
libjournal_core = static_library(
|
||||||
|
'journal-core',
|
||||||
|
libjournal_core_sources,
|
||||||
|
journald_gperf_c,
|
||||||
|
include_directories : includes,
|
||||||
|
install : false)
|
||||||
|
|
||||||
|
libsystemd_sym_path = '@0@/@1@'.format(project_source_root, libsystemd_sym)
|
||||||
libsystemd = shared_library(
|
libsystemd = shared_library(
|
||||||
'systemd',
|
'systemd',
|
||||||
disable_mempool_c,
|
disable_mempool_c,
|
||||||
version : libsystemd_version,
|
version : libsystemd_version,
|
||||||
include_directories : libsystemd_includes,
|
include_directories : includes,
|
||||||
link_args : ['-shared',
|
link_args : ['-shared',
|
||||||
'-Wl,--version-script=' + libsystemd_sym_path],
|
'-Wl,--version-script=' + libsystemd_sym_path],
|
||||||
link_with : [libbasic,
|
link_with : [libbasic,
|
||||||
libbasic_gcrypt],
|
libbasic_gcrypt],
|
||||||
link_whole : [libsystemd_static],
|
link_whole : [libsystemd_static,
|
||||||
|
libjournal_client],
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
librt,
|
librt,
|
||||||
libxz,
|
libxz,
|
||||||
@ -1661,17 +1676,21 @@ libsystemd = shared_library(
|
|||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibdir)
|
install_dir : rootlibdir)
|
||||||
|
|
||||||
|
static_libsystemd = get_option('static-libsystemd')
|
||||||
|
static_libsystemd_pic = static_libsystemd == 'true' or static_libsystemd == 'pic'
|
||||||
|
|
||||||
install_libsystemd_static = static_library(
|
install_libsystemd_static = static_library(
|
||||||
'systemd',
|
'systemd',
|
||||||
libsystemd_sources,
|
libsystemd_sources,
|
||||||
|
journal_client_sources,
|
||||||
basic_sources,
|
basic_sources,
|
||||||
basic_gcrypt_sources,
|
basic_gcrypt_sources,
|
||||||
disable_mempool_c,
|
disable_mempool_c,
|
||||||
include_directories : libsystemd_includes,
|
include_directories : includes,
|
||||||
build_by_default : static_libsystemd != 'false',
|
build_by_default : static_libsystemd != 'false',
|
||||||
install : static_libsystemd != 'false',
|
install : static_libsystemd != 'false',
|
||||||
install_dir : rootlibdir,
|
install_dir : rootlibdir,
|
||||||
pic : static_libsystemd_pic,
|
pic : static_libsystemd == 'true' or static_libsystemd == 'pic',
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
librt,
|
librt,
|
||||||
libxz,
|
libxz,
|
||||||
@ -1684,76 +1703,39 @@ install_libsystemd_static = static_library(
|
|||||||
libgcrypt],
|
libgcrypt],
|
||||||
c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC']))
|
c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC']))
|
||||||
|
|
||||||
libudev = shared_library(
|
|
||||||
'udev',
|
|
||||||
disable_mempool_c,
|
|
||||||
version : libudev_version,
|
|
||||||
include_directories : includes,
|
|
||||||
link_args : ['-shared',
|
|
||||||
'-Wl,--version-script=' + libudev_sym_path],
|
|
||||||
link_with : [libsystemd_static, libshared_static],
|
|
||||||
link_whole : libudev_basic,
|
|
||||||
dependencies : [threads],
|
|
||||||
link_depends : libudev_sym,
|
|
||||||
install : true,
|
|
||||||
install_dir : rootlibdir)
|
|
||||||
|
|
||||||
install_libudev_static = static_library(
|
|
||||||
'udev',
|
|
||||||
basic_sources,
|
|
||||||
shared_sources,
|
|
||||||
libsystemd_sources,
|
|
||||||
libudev_sources,
|
|
||||||
disable_mempool_c,
|
|
||||||
include_directories : includes,
|
|
||||||
build_by_default : static_libudev != 'false',
|
|
||||||
install : static_libudev != 'false',
|
|
||||||
install_dir : rootlibdir,
|
|
||||||
link_depends : libudev_sym,
|
|
||||||
dependencies : libshared_deps + [libmount],
|
|
||||||
c_args : static_libudev_pic ? [] : ['-fno-PIC'],
|
|
||||||
pic : static_libudev_pic)
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# systemd-analyze requires 'libcore'
|
# binaries that have --help and are intended for use by humans,
|
||||||
|
# usually, but not always, installed in /bin.
|
||||||
|
public_programs = []
|
||||||
|
|
||||||
|
subdir('src/shared')
|
||||||
subdir('src/core')
|
subdir('src/core')
|
||||||
# systemd-journal-remote requires 'libjournal_core'
|
subdir('src/shutdown')
|
||||||
subdir('src/journal')
|
subdir('src/udev')
|
||||||
# systemd-networkd requires 'libsystemd_network'
|
subdir('src/network')
|
||||||
subdir('src/libsystemd-network')
|
|
||||||
|
|
||||||
subdir('src/analyze')
|
subdir('src/analyze')
|
||||||
subdir('src/boot/efi')
|
subdir('src/journal-remote')
|
||||||
subdir('src/busctl')
|
|
||||||
subdir('src/coredump')
|
subdir('src/coredump')
|
||||||
subdir('src/cryptenroll')
|
subdir('src/pstore')
|
||||||
subdir('src/cryptsetup')
|
subdir('src/oom')
|
||||||
subdir('src/home')
|
|
||||||
subdir('src/hostname')
|
subdir('src/hostname')
|
||||||
subdir('src/import')
|
subdir('src/import')
|
||||||
subdir('src/journal-remote')
|
subdir('src/partition')
|
||||||
subdir('src/kernel-install')
|
subdir('src/kernel-install')
|
||||||
subdir('src/locale')
|
subdir('src/locale')
|
||||||
subdir('src/login')
|
|
||||||
subdir('src/machine')
|
subdir('src/machine')
|
||||||
subdir('src/network')
|
|
||||||
subdir('src/nspawn')
|
|
||||||
subdir('src/oom')
|
|
||||||
subdir('src/partition')
|
|
||||||
subdir('src/portable')
|
subdir('src/portable')
|
||||||
subdir('src/pstore')
|
subdir('src/userdb')
|
||||||
|
subdir('src/home')
|
||||||
|
subdir('src/nspawn')
|
||||||
subdir('src/resolve')
|
subdir('src/resolve')
|
||||||
subdir('src/shutdown')
|
|
||||||
subdir('src/systemctl')
|
|
||||||
subdir('src/timedate')
|
subdir('src/timedate')
|
||||||
subdir('src/timesync')
|
subdir('src/timesync')
|
||||||
subdir('src/tmpfiles')
|
subdir('src/tmpfiles')
|
||||||
subdir('src/userdb')
|
|
||||||
subdir('src/vconsole')
|
subdir('src/vconsole')
|
||||||
subdir('src/xdg-autostart-generator')
|
subdir('src/boot/efi')
|
||||||
|
|
||||||
subdir('src/systemd')
|
|
||||||
|
|
||||||
subdir('src/test')
|
subdir('src/test')
|
||||||
subdir('src/fuzz')
|
subdir('src/fuzz')
|
||||||
@ -1774,9 +1756,9 @@ test_dlopen = executable(
|
|||||||
build_by_default : want_tests != 'false')
|
build_by_default : want_tests != 'false')
|
||||||
|
|
||||||
foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
||||||
['systemd', 'ENABLE_NSS_SYSTEMD', ['nss-systemd.h', 'userdb-glue.c', 'userdb-glue.h']],
|
['systemd', 'ENABLE_NSS_SYSTEMD', 'src/nss-systemd/userdb-glue.c src/nss-systemd/userdb-glue.h src/nss-systemd/nss-systemd.h'],
|
||||||
['mymachines', 'ENABLE_NSS_MYMACHINES'],
|
['mymachines', 'ENABLE_NSS_MYMACHINES'],
|
||||||
['resolve', 'ENABLE_NSS_RESOLVE', [], resolve_includes]]
|
['resolve', 'ENABLE_NSS_RESOLVE']]
|
||||||
|
|
||||||
condition = tuple[1] == '' or conf.get(tuple[1]) == 1
|
condition = tuple[1] == '' or conf.get(tuple[1]) == 1
|
||||||
if condition
|
if condition
|
||||||
@ -1787,19 +1769,15 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
|||||||
|
|
||||||
sources = ['src/nss-@0@/nss-@0@.c'.format(module)]
|
sources = ['src/nss-@0@/nss-@0@.c'.format(module)]
|
||||||
if tuple.length() > 2
|
if tuple.length() > 2
|
||||||
foreach s : tuple[2]
|
sources += tuple[2].split()
|
||||||
sources += ['src/nss-@0@/@1@'.format(module, s)]
|
|
||||||
endforeach
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
incs = tuple.length() > 3 ? tuple[3] : includes
|
|
||||||
|
|
||||||
nss = shared_library(
|
nss = shared_library(
|
||||||
'nss_' + module,
|
'nss_' + module,
|
||||||
sources,
|
sources,
|
||||||
disable_mempool_c,
|
disable_mempool_c,
|
||||||
version : '2',
|
version : '2',
|
||||||
include_directories : incs,
|
include_directories : includes,
|
||||||
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
|
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
|
||||||
link_args : ['-Wl,-z,nodelete',
|
link_args : ['-Wl,-z,nodelete',
|
||||||
'-shared',
|
'-shared',
|
||||||
@ -1854,7 +1832,7 @@ meson.add_install_script(meson_make_symlink,
|
|||||||
public_programs += executable(
|
public_programs += executable(
|
||||||
'systemd-analyze',
|
'systemd-analyze',
|
||||||
systemd_analyze_sources,
|
systemd_analyze_sources,
|
||||||
include_directories : core_includes,
|
include_directories : includes,
|
||||||
link_with : [libcore,
|
link_with : [libcore,
|
||||||
libshared],
|
libshared],
|
||||||
dependencies : [versiondep,
|
dependencies : [versiondep,
|
||||||
@ -1938,7 +1916,8 @@ executable(
|
|||||||
'systemd-fstab-generator',
|
'systemd-fstab-generator',
|
||||||
'src/fstab-generator/fstab-generator.c',
|
'src/fstab-generator/fstab-generator.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : systemgeneratordir)
|
install_dir : systemgeneratordir)
|
||||||
@ -1982,6 +1961,7 @@ if conf.get('HAVE_BLKID') == 1
|
|||||||
executable(
|
executable(
|
||||||
'systemd-gpt-auto-generator',
|
'systemd-gpt-auto-generator',
|
||||||
'src/gpt-auto-generator/gpt-auto-generator.c',
|
'src/gpt-auto-generator/gpt-auto-generator.c',
|
||||||
|
'src/shared/blkid-util.h',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
dependencies : libblkid,
|
dependencies : libblkid,
|
||||||
@ -2002,7 +1982,7 @@ if conf.get('ENABLE_RESOLVE') == 1
|
|||||||
executable(
|
executable(
|
||||||
'systemd-resolved',
|
'systemd-resolved',
|
||||||
systemd_resolved_sources,
|
systemd_resolved_sources,
|
||||||
include_directories : resolve_includes,
|
include_directories : includes,
|
||||||
link_with : [libshared,
|
link_with : [libshared,
|
||||||
libbasic_gcrypt,
|
libbasic_gcrypt,
|
||||||
libsystemd_resolve_core],
|
libsystemd_resolve_core],
|
||||||
@ -2165,9 +2145,90 @@ public_programs += executable(
|
|||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true)
|
install : true)
|
||||||
|
|
||||||
|
if get_option('link-systemctl-shared')
|
||||||
|
systemctl_link_with = [libshared]
|
||||||
|
else
|
||||||
|
systemctl_link_with = [libsystemd_static,
|
||||||
|
libshared_static,
|
||||||
|
libjournal_client,
|
||||||
|
libbasic_gcrypt]
|
||||||
|
endif
|
||||||
|
|
||||||
public_programs += executable(
|
public_programs += executable(
|
||||||
'systemctl',
|
'systemctl',
|
||||||
systemctl_sources,
|
'src/systemctl/systemctl-add-dependency.c',
|
||||||
|
'src/systemctl/systemctl-add-dependency.h',
|
||||||
|
'src/systemctl/systemctl-cancel-job.c',
|
||||||
|
'src/systemctl/systemctl-cancel-job.h',
|
||||||
|
'src/systemctl/systemctl-clean-or-freeze.c',
|
||||||
|
'src/systemctl/systemctl-clean-or-freeze.h',
|
||||||
|
'src/systemctl/systemctl-compat-halt.c',
|
||||||
|
'src/systemctl/systemctl-compat-halt.h',
|
||||||
|
'src/systemctl/systemctl-compat-runlevel.c',
|
||||||
|
'src/systemctl/systemctl-compat-runlevel.h',
|
||||||
|
'src/systemctl/systemctl-compat-shutdown.c',
|
||||||
|
'src/systemctl/systemctl-compat-shutdown.h',
|
||||||
|
'src/systemctl/systemctl-compat-telinit.c',
|
||||||
|
'src/systemctl/systemctl-compat-telinit.h',
|
||||||
|
'src/systemctl/systemctl-daemon-reload.c',
|
||||||
|
'src/systemctl/systemctl-daemon-reload.h',
|
||||||
|
'src/systemctl/systemctl-edit.c',
|
||||||
|
'src/systemctl/systemctl-edit.h',
|
||||||
|
'src/systemctl/systemctl-enable.c',
|
||||||
|
'src/systemctl/systemctl-enable.h',
|
||||||
|
'src/systemctl/systemctl-is-active.c',
|
||||||
|
'src/systemctl/systemctl-is-active.h',
|
||||||
|
'src/systemctl/systemctl-is-enabled.c',
|
||||||
|
'src/systemctl/systemctl-is-enabled.h',
|
||||||
|
'src/systemctl/systemctl-is-system-running.c',
|
||||||
|
'src/systemctl/systemctl-is-system-running.h',
|
||||||
|
'src/systemctl/systemctl-kill.c',
|
||||||
|
'src/systemctl/systemctl-kill.h',
|
||||||
|
'src/systemctl/systemctl-list-dependencies.c',
|
||||||
|
'src/systemctl/systemctl-list-dependencies.h',
|
||||||
|
'src/systemctl/systemctl-list-jobs.c',
|
||||||
|
'src/systemctl/systemctl-list-jobs.h',
|
||||||
|
'src/systemctl/systemctl-list-machines.c',
|
||||||
|
'src/systemctl/systemctl-list-machines.h',
|
||||||
|
'src/systemctl/systemctl-list-unit-files.c',
|
||||||
|
'src/systemctl/systemctl-list-unit-files.h',
|
||||||
|
'src/systemctl/systemctl-list-units.c',
|
||||||
|
'src/systemctl/systemctl-list-units.h',
|
||||||
|
'src/systemctl/systemctl-log-setting.c',
|
||||||
|
'src/systemctl/systemctl-log-setting.h',
|
||||||
|
'src/systemctl/systemctl-logind.c',
|
||||||
|
'src/systemctl/systemctl-logind.h',
|
||||||
|
'src/systemctl/systemctl-mount.c',
|
||||||
|
'src/systemctl/systemctl-mount.h',
|
||||||
|
'src/systemctl/systemctl-preset-all.c',
|
||||||
|
'src/systemctl/systemctl-preset-all.h',
|
||||||
|
'src/systemctl/systemctl-reset-failed.c',
|
||||||
|
'src/systemctl/systemctl-reset-failed.h',
|
||||||
|
'src/systemctl/systemctl-service-watchdogs.c',
|
||||||
|
'src/systemctl/systemctl-service-watchdogs.h',
|
||||||
|
'src/systemctl/systemctl-set-default.c',
|
||||||
|
'src/systemctl/systemctl-set-default.h',
|
||||||
|
'src/systemctl/systemctl-set-environment.c',
|
||||||
|
'src/systemctl/systemctl-set-environment.h',
|
||||||
|
'src/systemctl/systemctl-set-property.c',
|
||||||
|
'src/systemctl/systemctl-set-property.h',
|
||||||
|
'src/systemctl/systemctl-show.c',
|
||||||
|
'src/systemctl/systemctl-show.h',
|
||||||
|
'src/systemctl/systemctl-start-special.c',
|
||||||
|
'src/systemctl/systemctl-start-special.h',
|
||||||
|
'src/systemctl/systemctl-start-unit.c',
|
||||||
|
'src/systemctl/systemctl-start-unit.h',
|
||||||
|
'src/systemctl/systemctl-switch-root.c',
|
||||||
|
'src/systemctl/systemctl-switch-root.h',
|
||||||
|
'src/systemctl/systemctl-sysv-compat.c',
|
||||||
|
'src/systemctl/systemctl-sysv-compat.h',
|
||||||
|
'src/systemctl/systemctl-trivial-method.c',
|
||||||
|
'src/systemctl/systemctl-trivial-method.h',
|
||||||
|
'src/systemctl/systemctl-util.c',
|
||||||
|
'src/systemctl/systemctl-util.c',
|
||||||
|
'src/systemctl/systemctl-util.h',
|
||||||
|
'src/systemctl/systemctl.c',
|
||||||
|
'src/systemctl/systemctl.h',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : systemctl_link_with,
|
link_with : systemctl_link_with,
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
@ -2254,7 +2315,7 @@ if conf.get('ENABLE_HOMED') == 1
|
|||||||
executable(
|
executable(
|
||||||
'systemd-homed',
|
'systemd-homed',
|
||||||
systemd_homed_sources,
|
systemd_homed_sources,
|
||||||
include_directories : home_includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
libcrypt,
|
libcrypt,
|
||||||
@ -2341,6 +2402,27 @@ executable(
|
|||||||
install_dir : systemgeneratordir)
|
install_dir : systemgeneratordir)
|
||||||
|
|
||||||
if conf.get('HAVE_LIBCRYPTSETUP') == 1
|
if conf.get('HAVE_LIBCRYPTSETUP') == 1
|
||||||
|
systemd_cryptsetup_sources = files('''
|
||||||
|
src/cryptsetup/cryptsetup-fido2.h
|
||||||
|
src/cryptsetup/cryptsetup-keyfile.c
|
||||||
|
src/cryptsetup/cryptsetup-keyfile.h
|
||||||
|
src/cryptsetup/cryptsetup-pkcs11.h
|
||||||
|
src/cryptsetup/cryptsetup-tpm2.h
|
||||||
|
src/cryptsetup/cryptsetup.c
|
||||||
|
'''.split())
|
||||||
|
|
||||||
|
if conf.get('HAVE_P11KIT') == 1
|
||||||
|
systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-pkcs11.c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if conf.get('HAVE_LIBFIDO2') == 1
|
||||||
|
systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-fido2.c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if conf.get('HAVE_TPM2') == 1
|
||||||
|
systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-tpm2.c')
|
||||||
|
endif
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-cryptsetup',
|
'systemd-cryptsetup',
|
||||||
systemd_cryptsetup_sources,
|
systemd_cryptsetup_sources,
|
||||||
@ -2380,6 +2462,34 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
|
|||||||
install : true,
|
install : true,
|
||||||
install_dir : systemgeneratordir)
|
install_dir : systemgeneratordir)
|
||||||
|
|
||||||
|
systemd_cryptenroll_sources = files('''
|
||||||
|
src/cryptenroll/cryptenroll-fido2.h
|
||||||
|
src/cryptenroll/cryptenroll-list.c
|
||||||
|
src/cryptenroll/cryptenroll-list.h
|
||||||
|
src/cryptenroll/cryptenroll-password.c
|
||||||
|
src/cryptenroll/cryptenroll-password.h
|
||||||
|
src/cryptenroll/cryptenroll-pkcs11.h
|
||||||
|
src/cryptenroll/cryptenroll-recovery.c
|
||||||
|
src/cryptenroll/cryptenroll-recovery.h
|
||||||
|
src/cryptenroll/cryptenroll-tpm2.h
|
||||||
|
src/cryptenroll/cryptenroll-wipe.c
|
||||||
|
src/cryptenroll/cryptenroll-wipe.h
|
||||||
|
src/cryptenroll/cryptenroll.c
|
||||||
|
src/cryptenroll/cryptenroll.h
|
||||||
|
'''.split())
|
||||||
|
|
||||||
|
if conf.get('HAVE_P11KIT') == 1 and conf.get('HAVE_OPENSSL') == 1
|
||||||
|
systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-pkcs11.c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if conf.get('HAVE_LIBFIDO2') == 1
|
||||||
|
systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-fido2.c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if conf.get('HAVE_TPM2') == 1
|
||||||
|
systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-tpm2.c')
|
||||||
|
endif
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-cryptenroll',
|
'systemd-cryptenroll',
|
||||||
systemd_cryptenroll_sources,
|
systemd_cryptenroll_sources,
|
||||||
@ -2417,7 +2527,8 @@ endif
|
|||||||
if conf.get('ENABLE_XDG_AUTOSTART') == 1
|
if conf.get('ENABLE_XDG_AUTOSTART') == 1
|
||||||
executable(
|
executable(
|
||||||
'systemd-xdg-autostart-generator',
|
'systemd-xdg-autostart-generator',
|
||||||
systemd_xdg_autostart_generator_sources,
|
'src/xdg-autostart-generator/xdg-autostart-generator.c',
|
||||||
|
'src/xdg-autostart-generator/xdg-autostart-service.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -2503,11 +2614,20 @@ if conf.get('ENABLE_TIMEDATECTL') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_TIMESYNCD') == 1
|
if conf.get('ENABLE_TIMESYNCD') == 1
|
||||||
|
if get_option('link-timesyncd-shared')
|
||||||
|
timesyncd_link_with = [libshared]
|
||||||
|
else
|
||||||
|
timesyncd_link_with = [libsystemd_static,
|
||||||
|
libshared_static,
|
||||||
|
libjournal_client,
|
||||||
|
libbasic_gcrypt]
|
||||||
|
endif
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-timesyncd',
|
'systemd-timesyncd',
|
||||||
systemd_timesyncd_sources,
|
systemd_timesyncd_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libtimesyncd_core],
|
link_with : [timesyncd_link_with],
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
libm],
|
libm],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -2516,9 +2636,9 @@ if conf.get('ENABLE_TIMESYNCD') == 1
|
|||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-time-wait-sync',
|
'systemd-time-wait-sync',
|
||||||
'src/timesync/wait-sync.c',
|
'src/time-wait-sync/time-wait-sync.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libtimesyncd_core],
|
link_with : [timesyncd_link_with],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
@ -2809,7 +2929,8 @@ executable(
|
|||||||
'systemd-remount-fs',
|
'systemd-remount-fs',
|
||||||
'src/remount-fs/remount-fs.c',
|
'src/remount-fs/remount-fs.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
@ -2818,7 +2939,8 @@ executable(
|
|||||||
'systemd-machine-id-setup',
|
'systemd-machine-id-setup',
|
||||||
'src/machine-id-setup/machine-id-setup-main.c',
|
'src/machine-id-setup/machine-id-setup-main.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootbindir)
|
install_dir : rootbindir)
|
||||||
@ -3032,7 +3154,9 @@ public_programs += executable(
|
|||||||
|
|
||||||
public_programs += executable(
|
public_programs += executable(
|
||||||
'busctl',
|
'busctl',
|
||||||
busctl_sources,
|
'src/busctl/busctl.c',
|
||||||
|
'src/busctl/busctl-introspect.c',
|
||||||
|
'src/busctl/busctl-introspect.h',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -3065,7 +3189,8 @@ if enable_sysusers
|
|||||||
link_with : [libshared_static,
|
link_with : [libshared_static,
|
||||||
libbasic,
|
libbasic,
|
||||||
libbasic_gcrypt,
|
libbasic_gcrypt,
|
||||||
libsystemd_static],
|
libsystemd_static,
|
||||||
|
libjournal_client],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootbindir)
|
install_dir : rootbindir)
|
||||||
public_programs += exe
|
public_programs += exe
|
||||||
@ -3107,7 +3232,8 @@ if conf.get('ENABLE_TMPFILES') == 1
|
|||||||
link_with : [libshared_static,
|
link_with : [libshared_static,
|
||||||
libbasic,
|
libbasic,
|
||||||
libbasic_gcrypt,
|
libbasic_gcrypt,
|
||||||
libsystemd_static],
|
libsystemd_static,
|
||||||
|
libjournal_client],
|
||||||
dependencies : [libacl],
|
dependencies : [libacl],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootbindir)
|
install_dir : rootbindir)
|
||||||
@ -3118,6 +3244,7 @@ if conf.get('ENABLE_HWDB') == 1
|
|||||||
public_programs += executable(
|
public_programs += executable(
|
||||||
'systemd-hwdb',
|
'systemd-hwdb',
|
||||||
'src/hwdb/hwdb.c',
|
'src/hwdb/hwdb.c',
|
||||||
|
'src/libsystemd/sd-hwdb/hwdb-internal.h',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : udev_link_with,
|
link_with : udev_link_with,
|
||||||
install_rpath : udev_rpath,
|
install_rpath : udev_rpath,
|
||||||
@ -3166,7 +3293,8 @@ executable(
|
|||||||
'systemd-shutdown',
|
'systemd-shutdown',
|
||||||
systemd_shutdown_sources,
|
systemd_shutdown_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
dependencies : [libmount],
|
dependencies : [libmount],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
@ -3214,7 +3342,8 @@ public_programs += executable(
|
|||||||
'systemd-nspawn',
|
'systemd-nspawn',
|
||||||
systemd_nspawn_sources,
|
systemd_nspawn_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libnspawn_core,
|
link_with : [libcore_shared,
|
||||||
|
libnspawn_core,
|
||||||
libshared],
|
libshared],
|
||||||
dependencies : [libblkid,
|
dependencies : [libblkid,
|
||||||
libseccomp],
|
libseccomp],
|
||||||
@ -3225,7 +3354,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
executable(
|
executable(
|
||||||
'systemd-networkd',
|
'systemd-networkd',
|
||||||
systemd_networkd_sources,
|
systemd_networkd_sources,
|
||||||
include_directories : network_includes,
|
include_directories : network_include_dir,
|
||||||
link_with : [libnetworkd_core,
|
link_with : [libnetworkd_core,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
networkd_link_with],
|
networkd_link_with],
|
||||||
@ -3238,7 +3367,8 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
'systemd-networkd-wait-online',
|
'systemd-networkd-wait-online',
|
||||||
systemd_networkd_wait_online_sources,
|
systemd_networkd_wait_online_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [networkd_link_with],
|
link_with : [libnetworkd_core,
|
||||||
|
networkd_link_with],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
@ -3246,7 +3376,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
public_programs += executable(
|
public_programs += executable(
|
||||||
'networkctl',
|
'networkctl',
|
||||||
networkctl_sources,
|
networkctl_sources,
|
||||||
include_directories : libsystemd_network_includes,
|
include_directories : includes,
|
||||||
link_with : [libsystemd_network,
|
link_with : [libsystemd_network,
|
||||||
networkd_link_with],
|
networkd_link_with],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -3272,7 +3402,7 @@ endif
|
|||||||
|
|
||||||
executable(
|
executable(
|
||||||
'systemd-sulogin-shell',
|
'systemd-sulogin-shell',
|
||||||
'src/sulogin-shell/sulogin-shell.c',
|
['src/sulogin-shell/sulogin-shell.c'],
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
@ -3292,13 +3422,13 @@ custom_target(
|
|||||||
|
|
||||||
foreach tuple : tests
|
foreach tuple : tests
|
||||||
sources = tuple[0]
|
sources = tuple[0]
|
||||||
link_with = tuple.length() > 1 and tuple[1].length() > 0 ? tuple[1] : [libshared]
|
link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
|
||||||
dependencies = tuple.length() > 2 ? tuple[2] : []
|
dependencies = tuple[2]
|
||||||
incs = tuple.length() > 3 and tuple[3].length() > 0 ? tuple[3] : includes
|
condition = tuple.length() >= 4 ? tuple[3] : ''
|
||||||
condition = tuple.length() > 4 ? tuple[4] : ''
|
type = tuple.length() >= 5 ? tuple[4] : ''
|
||||||
type = tuple.length() > 5 ? tuple[5] : ''
|
defs = tuple.length() >= 6 ? tuple[5] : []
|
||||||
defs = tuple.length() > 6 ? tuple[6] : []
|
incs = tuple.length() >= 7 ? tuple[6] : includes
|
||||||
parallel = tuple.length() > 7 ? tuple[7] : true
|
parallel = tuple.length() >= 8 ? tuple[7] : true
|
||||||
timeout = 30
|
timeout = 30
|
||||||
|
|
||||||
name = sources[0].split('/')[-1].split('.')[0]
|
name = sources[0].split('/')[-1].split('.')[0]
|
||||||
@ -3393,10 +3523,10 @@ fuzzer_exes = []
|
|||||||
|
|
||||||
foreach tuple : fuzzers
|
foreach tuple : fuzzers
|
||||||
sources = tuple[0]
|
sources = tuple[0]
|
||||||
link_with = tuple.length() > 1 and tuple[1].length() > 0 ? tuple[1] : [libshared]
|
link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
|
||||||
dependencies = tuple.length() > 2 ? tuple[2] : []
|
dependencies = tuple[2]
|
||||||
incs = tuple.length() > 3 and tuple[3].length() > 0 ? tuple[3] : includes
|
defs = tuple.length() >= 4 ? tuple[3] : []
|
||||||
defs = tuple.length() > 4 ? tuple[4] : []
|
incs = tuple.length() >= 5 ? tuple[4] : includes
|
||||||
link_args = []
|
link_args = []
|
||||||
|
|
||||||
if want_ossfuzz
|
if want_ossfuzz
|
||||||
@ -3788,7 +3918,6 @@ foreach tuple : [
|
|||||||
['kernel-install', get_option('kernel-install')],
|
['kernel-install', get_option('kernel-install')],
|
||||||
['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1],
|
['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1],
|
||||||
['fexecve'],
|
['fexecve'],
|
||||||
['standalone-binaries', get_option('standalone-binaries')],
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if tuple.length() >= 2
|
if tuple.length() >= 2
|
||||||
|
@ -115,17 +115,14 @@ static int verify_socket(Unit *u) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int verify_executable(Unit *u, const ExecCommand *exec) {
|
int verify_executable(Unit *u, const ExecCommand *exec) {
|
||||||
int r;
|
|
||||||
|
|
||||||
if (!exec)
|
if (!exec)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (exec->flags & EXEC_COMMAND_IGNORE_FAILURE)
|
if (exec->flags & EXEC_COMMAND_IGNORE_FAILURE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
r = find_executable_full(exec->path, false, NULL, NULL);
|
if (access(exec->path, X_OK) < 0)
|
||||||
if (r < 0)
|
return log_unit_error_errno(u, errno, "Command %s is not executable: %m", exec->path);
|
||||||
return log_unit_error_errno(u, r, "Command %s is not executable: %m", exec->path);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,3 @@ systemd_analyze_sources = files('''
|
|||||||
analyze-security.c
|
analyze-security.c
|
||||||
analyze-security.h
|
analyze-security.h
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
tests += [
|
|
||||||
[['src/analyze/test-verify.c',
|
|
||||||
'src/analyze/analyze-verify.c',
|
|
||||||
'src/analyze/analyze-verify.h'],
|
|
||||||
[libcore,
|
|
||||||
libshared],
|
|
||||||
[],
|
|
||||||
core_includes],
|
|
||||||
]
|
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/* Length of a single label, with all escaping removed, excluding any trailing dot or NUL byte */
|
|
||||||
#define DNS_LABEL_MAX 63
|
|
||||||
|
|
||||||
/* Worst case length of a single label, with all escaping applied and room for a trailing NUL byte. */
|
|
||||||
#define DNS_LABEL_ESCAPED_MAX (DNS_LABEL_MAX*4+1)
|
|
||||||
|
|
||||||
/* Maximum length of a full hostname, consisting of a series of unescaped labels, and no trailing dot or NUL byte */
|
|
||||||
#define DNS_HOSTNAME_MAX 253
|
|
||||||
|
|
||||||
/* Maximum length of a full hostname, on the wire, including the final NUL byte */
|
|
||||||
#define DNS_WIRE_FORMAT_HOSTNAME_MAX 255
|
|
||||||
|
|
||||||
/* Maximum number of labels per valid hostname */
|
|
||||||
#define DNS_N_LABELS_MAX 127
|
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "sd-id128.h"
|
#include "sd-id128.h"
|
||||||
|
|
||||||
|
#include "efi/loader-features.h"
|
||||||
#include "time-util.h"
|
#include "time-util.h"
|
||||||
|
|
||||||
#define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f)
|
#define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f)
|
||||||
|
@ -42,7 +42,6 @@ basic_sources = files('''
|
|||||||
dirent-util.h
|
dirent-util.h
|
||||||
dlfcn-util.c
|
dlfcn-util.c
|
||||||
dlfcn-util.h
|
dlfcn-util.h
|
||||||
dns-def.h
|
|
||||||
efivars.c
|
efivars.c
|
||||||
efivars.h
|
efivars.h
|
||||||
env-file.c
|
env-file.c
|
||||||
@ -245,8 +244,6 @@ basic_sources = files('''
|
|||||||
unaligned.h
|
unaligned.h
|
||||||
unit-def.c
|
unit-def.c
|
||||||
unit-def.h
|
unit-def.h
|
||||||
unit-file.c
|
|
||||||
unit-file.h
|
|
||||||
unit-name.c
|
unit-name.c
|
||||||
unit-name.h
|
unit-name.h
|
||||||
user-util.c
|
user-util.c
|
||||||
@ -381,7 +378,7 @@ run_target(
|
|||||||
libbasic = static_library(
|
libbasic = static_library(
|
||||||
'basic',
|
'basic',
|
||||||
basic_sources,
|
basic_sources,
|
||||||
include_directories : basic_includes,
|
include_directories : includes,
|
||||||
dependencies : [versiondep,
|
dependencies : [versiondep,
|
||||||
threads,
|
threads,
|
||||||
libcap,
|
libcap,
|
||||||
@ -403,6 +400,6 @@ basic_gcrypt_sources = files(
|
|||||||
libbasic_gcrypt = static_library(
|
libbasic_gcrypt = static_library(
|
||||||
'basic-gcrypt',
|
'basic-gcrypt',
|
||||||
basic_gcrypt_sources,
|
basic_gcrypt_sources,
|
||||||
include_directories : basic_includes,
|
include_directories : includes,
|
||||||
dependencies : [libgcrypt],
|
dependencies : [libgcrypt],
|
||||||
c_args : ['-fvisibility=default'])
|
c_args : ['-fvisibility=default'])
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
#include "missing_network.h"
|
#include "missing_network.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "process-util.h"
|
#include "process-util.h"
|
||||||
|
#if HAVE_SECCOMP
|
||||||
|
#include "seccomp-util.h"
|
||||||
|
#endif
|
||||||
#include "stat-util.h"
|
#include "stat-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "strv.h"
|
#include "strv.h"
|
||||||
@ -314,6 +317,46 @@ int parse_errno(const char *t) {
|
|||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_SECCOMP
|
||||||
|
int parse_syscall_and_errno(const char *in, char **name, int *error) {
|
||||||
|
_cleanup_free_ char *n = NULL;
|
||||||
|
char *p;
|
||||||
|
int e = -1;
|
||||||
|
|
||||||
|
assert(in);
|
||||||
|
assert(name);
|
||||||
|
assert(error);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This parse "syscall:errno" like "uname:EILSEQ", "@sync:255".
|
||||||
|
* If errno is omitted, then error is set to -1.
|
||||||
|
* Empty syscall name is not allowed.
|
||||||
|
* Here, we do not check that the syscall name is valid or not.
|
||||||
|
*/
|
||||||
|
|
||||||
|
p = strchr(in, ':');
|
||||||
|
if (p) {
|
||||||
|
e = seccomp_parse_errno_or_action(p + 1);
|
||||||
|
if (e < 0)
|
||||||
|
return e;
|
||||||
|
|
||||||
|
n = strndup(in, p - in);
|
||||||
|
} else
|
||||||
|
n = strdup(in);
|
||||||
|
|
||||||
|
if (!n)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
if (isempty(n))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
*error = e;
|
||||||
|
*name = TAKE_PTR(n);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *mangle_base(const char *s, unsigned *base) {
|
static const char *mangle_base(const char *s, unsigned *base) {
|
||||||
const char *k;
|
const char *k;
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@ int parse_mtu(int family, const char *s, uint32_t *ret);
|
|||||||
int parse_size(const char *t, uint64_t base, uint64_t *size);
|
int parse_size(const char *t, uint64_t base, uint64_t *size);
|
||||||
int parse_range(const char *t, unsigned *lower, unsigned *upper);
|
int parse_range(const char *t, unsigned *lower, unsigned *upper);
|
||||||
int parse_errno(const char *t);
|
int parse_errno(const char *t);
|
||||||
|
#if HAVE_SECCOMP
|
||||||
|
int parse_syscall_and_errno(const char *in, char **name, int *error);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SAFE_ATO_REFUSE_PLUS_MINUS (1U << 30)
|
#define SAFE_ATO_REFUSE_PLUS_MINUS (1U << 30)
|
||||||
#define SAFE_ATO_REFUSE_LEADING_ZERO (1U << 29)
|
#define SAFE_ATO_REFUSE_LEADING_ZERO (1U << 29)
|
||||||
|
@ -586,11 +586,10 @@ char* path_join_internal(const char *first, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int check_x_access(const char *path, int *ret_fd) {
|
static int check_x_access(const char *path, int *ret_fd) {
|
||||||
_cleanup_close_ int fd = -1;
|
|
||||||
const char *with_dash;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
if (ret_fd) {
|
if (ret_fd) {
|
||||||
|
_cleanup_close_ int fd = -1;
|
||||||
|
int r;
|
||||||
|
|
||||||
/* We need to use O_PATH because there may be executables for which we have only exec
|
/* We need to use O_PATH because there may be executables for which we have only exec
|
||||||
* permissions, but not read (usually suid executables). */
|
* permissions, but not read (usually suid executables). */
|
||||||
fd = open(path, O_PATH|O_CLOEXEC);
|
fd = open(path, O_PATH|O_CLOEXEC);
|
||||||
@ -600,24 +599,14 @@ static int check_x_access(const char *path, int *ret_fd) {
|
|||||||
r = access_fd(fd, X_OK);
|
r = access_fd(fd, X_OK);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
*ret_fd = TAKE_FD(fd);
|
||||||
} else {
|
} else {
|
||||||
/* Let's optimize things a bit by not opening the file if we don't need the fd. */
|
/* Let's optimize things a bit by not opening the file if we don't need the fd. */
|
||||||
if (access(path, X_OK) < 0)
|
if (access(path, X_OK) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
with_dash = strjoina(path, "/");
|
|
||||||
|
|
||||||
/* If this passes, it must be a directory. */
|
|
||||||
if (access(with_dash, X_OK) >= 0)
|
|
||||||
return -EISDIR;
|
|
||||||
|
|
||||||
if (errno != ENOTDIR)
|
|
||||||
return -errno;
|
|
||||||
|
|
||||||
if (ret_fd)
|
|
||||||
*ret_fd = TAKE_FD(fd);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,20 +663,32 @@ int find_executable_full(const char *name, bool use_path_envvar, char **ret_file
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
r = check_x_access(j, ret_fd ? &fd : NULL);
|
r = check_x_access(j, ret_fd ? &fd : NULL);
|
||||||
if (r < 0) {
|
if (r >= 0) {
|
||||||
/* PATH entries which we don't have access to are ignored, as per tradition. */
|
_cleanup_free_ char *with_dash;
|
||||||
if (r != -EACCES)
|
|
||||||
last_error = r;
|
with_dash = strjoin(j, "/");
|
||||||
continue;
|
if (!with_dash)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* If this passes, it must be a directory, and so should be skipped. */
|
||||||
|
if (access(with_dash, X_OK) >= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* We can't just `continue` inverting this case, since we need to update last_error. */
|
||||||
|
if (errno == ENOTDIR) {
|
||||||
|
/* Found it! */
|
||||||
|
if (ret_filename)
|
||||||
|
*ret_filename = path_simplify(TAKE_PTR(j), false);
|
||||||
|
if (ret_fd)
|
||||||
|
*ret_fd = TAKE_FD(fd);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Found it! */
|
/* PATH entries which we don't have access to are ignored, as per tradition. */
|
||||||
if (ret_filename)
|
if (errno != EACCES)
|
||||||
*ret_filename = path_simplify(TAKE_PTR(j), false);
|
last_error = -errno;
|
||||||
if (ret_fd)
|
|
||||||
*ret_fd = TAKE_FD(fd);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return last_error;
|
return last_error;
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
|
|
||||||
busctl_sources = files(
|
|
||||||
'busctl-introspect.c',
|
|
||||||
'busctl-introspect.h',
|
|
||||||
'busctl.c')
|
|
@ -1,5 +1,16 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
libcore_shared_sources = '''
|
||||||
|
killall.c
|
||||||
|
killall.h
|
||||||
|
loopback-setup.c
|
||||||
|
loopback-setup.h
|
||||||
|
machine-id-setup.c
|
||||||
|
machine-id-setup.h
|
||||||
|
mount-setup.c
|
||||||
|
mount-setup.h
|
||||||
|
'''.split()
|
||||||
|
|
||||||
libcore_sources = '''
|
libcore_sources = '''
|
||||||
apparmor-setup.c
|
apparmor-setup.c
|
||||||
apparmor-setup.h
|
apparmor-setup.h
|
||||||
@ -140,12 +151,22 @@ load_fragment_gperf_nulstr_c = custom_target(
|
|||||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||||
capture : true)
|
capture : true)
|
||||||
|
|
||||||
|
# A convenience library to share code with other binaries:
|
||||||
|
# systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
|
||||||
|
libcore_shared = static_library(
|
||||||
|
'core-shared',
|
||||||
|
libcore_shared_sources,
|
||||||
|
include_directories : includes,
|
||||||
|
dependencies : [versiondep,
|
||||||
|
libmount])
|
||||||
|
|
||||||
libcore = static_library(
|
libcore = static_library(
|
||||||
'core',
|
'core',
|
||||||
libcore_sources,
|
libcore_sources,
|
||||||
load_fragment_gperf_c,
|
load_fragment_gperf_c,
|
||||||
load_fragment_gperf_nulstr_c,
|
load_fragment_gperf_nulstr_c,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
|
link_whole : libcore_shared,
|
||||||
dependencies : [versiondep,
|
dependencies : [versiondep,
|
||||||
threads,
|
threads,
|
||||||
librt,
|
librt,
|
||||||
@ -158,8 +179,6 @@ libcore = static_library(
|
|||||||
libmount,
|
libmount,
|
||||||
libacl])
|
libacl])
|
||||||
|
|
||||||
core_includes = [includes, include_directories('.')]
|
|
||||||
|
|
||||||
systemd_sources = files('main.c')
|
systemd_sources = files('main.c')
|
||||||
|
|
||||||
in_files = [['macros.systemd', rpmmacrosdir],
|
in_files = [['macros.systemd', rpmmacrosdir],
|
||||||
@ -203,12 +222,3 @@ if install_sysconfdir
|
|||||||
meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
|
meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
|
||||||
meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
|
meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
fuzzers += [
|
|
||||||
[['src/core/fuzz-unit-file.c'],
|
|
||||||
[libcore,
|
|
||||||
libshared],
|
|
||||||
[libmount]],
|
|
||||||
]
|
|
||||||
|
@ -7,9 +7,8 @@ systemd_coredump_sources = files('''
|
|||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
if conf.get('HAVE_ELFUTILS') == 1
|
if conf.get('HAVE_ELFUTILS') == 1
|
||||||
systemd_coredump_sources += files(
|
systemd_coredump_sources += files(['stacktrace.c',
|
||||||
'stacktrace.c',
|
'stacktrace.h'])
|
||||||
'stacktrace.h')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
coredumpctl_sources = files('coredumpctl.c')
|
coredumpctl_sources = files('coredumpctl.c')
|
||||||
@ -23,5 +22,7 @@ tests += [
|
|||||||
[['src/coredump/test-coredump-vacuum.c',
|
[['src/coredump/test-coredump-vacuum.c',
|
||||||
'src/coredump/coredump-vacuum.c',
|
'src/coredump/coredump-vacuum.c',
|
||||||
'src/coredump/coredump-vacuum.h'],
|
'src/coredump/coredump-vacuum.h'],
|
||||||
[], [], [], '', 'manual'],
|
[],
|
||||||
|
[],
|
||||||
|
'ENABLE_COREDUMP', 'manual'],
|
||||||
]
|
]
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
|
|
||||||
systemd_cryptenroll_sources = files(
|
|
||||||
'cryptenroll-fido2.h',
|
|
||||||
'cryptenroll-list.c',
|
|
||||||
'cryptenroll-list.h',
|
|
||||||
'cryptenroll-password.c',
|
|
||||||
'cryptenroll-password.h',
|
|
||||||
'cryptenroll-pkcs11.h',
|
|
||||||
'cryptenroll-recovery.c',
|
|
||||||
'cryptenroll-recovery.h',
|
|
||||||
'cryptenroll-tpm2.h',
|
|
||||||
'cryptenroll-wipe.c',
|
|
||||||
'cryptenroll-wipe.h',
|
|
||||||
'cryptenroll.c',
|
|
||||||
'cryptenroll.h')
|
|
||||||
|
|
||||||
if conf.get('HAVE_P11KIT') == 1 and conf.get('HAVE_OPENSSL') == 1
|
|
||||||
systemd_cryptenroll_sources += files('cryptenroll-pkcs11.c')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if conf.get('HAVE_LIBFIDO2') == 1
|
|
||||||
systemd_cryptenroll_sources += files('cryptenroll-fido2.c')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if conf.get('HAVE_TPM2') == 1
|
|
||||||
systemd_cryptenroll_sources += files('cryptenroll-tpm2.c')
|
|
||||||
endif
|
|
@ -1,21 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
|
|
||||||
systemd_cryptsetup_sources = files(
|
|
||||||
'cryptsetup-fido2.h',
|
|
||||||
'cryptsetup-keyfile.c',
|
|
||||||
'cryptsetup-keyfile.h',
|
|
||||||
'cryptsetup-pkcs11.h',
|
|
||||||
'cryptsetup-tpm2.h',
|
|
||||||
'cryptsetup.c')
|
|
||||||
|
|
||||||
if conf.get('HAVE_P11KIT') == 1
|
|
||||||
systemd_cryptsetup_sources += files('cryptsetup-pkcs11.c')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if conf.get('HAVE_LIBFIDO2') == 1
|
|
||||||
systemd_cryptsetup_sources += files('cryptsetup-fido2.c')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if conf.get('HAVE_TPM2') == 1
|
|
||||||
systemd_cryptsetup_sources += files('cryptsetup-tpm2.c')
|
|
||||||
endif
|
|
@ -1,25 +1,157 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
fuzzers += [
|
fuzzers += [
|
||||||
[['src/fuzz/fuzz-bus-message.c']],
|
[['src/fuzz/fuzz-bus-message.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-catalog.c']],
|
[['src/fuzz/fuzz-catalog.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-json.c']],
|
[['src/fuzz/fuzz-dns-packet.c',
|
||||||
|
dns_type_headers],
|
||||||
|
[libsystemd_resolve_core,
|
||||||
|
libshared],
|
||||||
|
[libgcrypt,
|
||||||
|
libgpg_error,
|
||||||
|
libm]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-varlink.c']],
|
[['src/fuzz/fuzz-dhcp6-client.c',
|
||||||
|
'src/libsystemd-network/dhcp-identifier.h',
|
||||||
|
'src/libsystemd-network/dhcp-identifier.c',
|
||||||
|
'src/libsystemd-network/dhcp6-internal.h',
|
||||||
|
'src/systemd/sd-dhcp6-client.h'],
|
||||||
|
[libshared,
|
||||||
|
libsystemd_network],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-udev-database.c']],
|
[['src/fuzz/fuzz-dhcp-server.c'],
|
||||||
|
[libsystemd_network,
|
||||||
|
libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-compress.c']],
|
[['src/fuzz/fuzz-lldp.c'],
|
||||||
|
[libshared,
|
||||||
|
libsystemd_network],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-bus-label.c']],
|
[['src/fuzz/fuzz-ndisc-rs.c',
|
||||||
|
'src/libsystemd-network/dhcp-identifier.h',
|
||||||
|
'src/libsystemd-network/dhcp-identifier.c',
|
||||||
|
'src/libsystemd-network/icmp6-util.h',
|
||||||
|
'src/systemd/sd-dhcp6-client.h',
|
||||||
|
'src/systemd/sd-ndisc.h'],
|
||||||
|
[libshared,
|
||||||
|
libsystemd_network],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-env-file.c']],
|
[['src/fuzz/fuzz-json.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-hostname-setup.c']],
|
[['src/fuzz/fuzz-varlink.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-calendarspec.c']],
|
[['src/fuzz/fuzz-unit-file.c'],
|
||||||
|
[libcore,
|
||||||
|
libshared],
|
||||||
|
[libmount]],
|
||||||
|
|
||||||
[['src/fuzz/fuzz-time-util.c']],
|
[['src/fuzz/fuzz-journald-audit.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journald-kmsg.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journald-native.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journald-native-fd.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journald-stream.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journald-syslog.c',
|
||||||
|
'src/fuzz/fuzz-journald.c'],
|
||||||
|
[libjournal_core,
|
||||||
|
libshared],
|
||||||
|
[libselinux]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-journal-remote.c'],
|
||||||
|
[libsystemd_journal_remote,
|
||||||
|
libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-udev-database.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-udev-rules.c'],
|
||||||
|
[libudevd_core,
|
||||||
|
libshared],
|
||||||
|
[threads,
|
||||||
|
libacl]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-compress.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-bus-label.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-env-file.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-hostname-setup.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-nspawn-settings.c'],
|
||||||
|
[libshared,
|
||||||
|
libnspawn_core],
|
||||||
|
[libseccomp]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-nspawn-oci.c'],
|
||||||
|
[libshared,
|
||||||
|
libnspawn_core],
|
||||||
|
[libseccomp]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-calendarspec.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-time-util.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-xdg-desktop.c',
|
||||||
|
'src/xdg-autostart-generator/xdg-autostart-service.h',
|
||||||
|
'src/xdg-autostart-generator/xdg-autostart-service.c'],
|
||||||
|
[],
|
||||||
|
[]],
|
||||||
|
|
||||||
|
[['src/fuzz/fuzz-udev-rule-parse-value.c'],
|
||||||
|
[libshared],
|
||||||
|
[]],
|
||||||
]
|
]
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
home_includes = [includes, include_directories('.')]
|
|
||||||
|
|
||||||
systemd_homework_sources = files('''
|
systemd_homework_sources = files('''
|
||||||
home-util.c
|
home-util.c
|
||||||
home-util.h
|
home-util.h
|
||||||
|
@ -73,7 +73,7 @@ tests += [
|
|||||||
[['src/import/test-qcow2.c',
|
[['src/import/test-qcow2.c',
|
||||||
'src/import/qcow2-util.c',
|
'src/import/qcow2-util.c',
|
||||||
'src/import/qcow2-util.h'],
|
'src/import/qcow2-util.h'],
|
||||||
[],
|
[libshared],
|
||||||
[libz],
|
[libz],
|
||||||
[], 'HAVE_ZLIB', 'manual'],
|
'HAVE_ZLIB', 'manual'],
|
||||||
]
|
]
|
||||||
|
@ -16,15 +16,16 @@ libsystemd_journal_remote_sources = files('''
|
|||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
if conf.get('HAVE_MICROHTTPD') == 1
|
if conf.get('HAVE_MICROHTTPD') == 1
|
||||||
libsystemd_journal_remote_sources += files(
|
libsystemd_journal_remote_sources += files('''
|
||||||
'microhttpd-util.h',
|
microhttpd-util.h
|
||||||
'microhttpd-util.c')
|
microhttpd-util.c
|
||||||
|
'''.split())
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libsystemd_journal_remote = static_library(
|
libsystemd_journal_remote = static_library(
|
||||||
'systemd-journal-remote',
|
'systemd-journal-remote',
|
||||||
libsystemd_journal_remote_sources,
|
libsystemd_journal_remote_sources,
|
||||||
include_directories : journal_includes,
|
include_directories : includes,
|
||||||
dependencies : [threads,
|
dependencies : [threads,
|
||||||
libmicrohttpd,
|
libmicrohttpd,
|
||||||
libgnutls,
|
libgnutls,
|
||||||
@ -74,11 +75,3 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
|
|||||||
chmod 755 $DESTDIR/var/log/journal/remote || :''')
|
chmod 755 $DESTDIR/var/log/journal/remote || :''')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
fuzzers += [
|
|
||||||
[['src/journal-remote/fuzz-journal-remote.c'],
|
|
||||||
[libsystemd_journal_remote,
|
|
||||||
libshared]],
|
|
||||||
]
|
|
||||||
|
@ -1,6 +1,70 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
sources = files('''
|
journal_client_sources = files('''
|
||||||
|
audit-type.c
|
||||||
|
audit-type.h
|
||||||
|
catalog.c
|
||||||
|
catalog.h
|
||||||
|
compress.c
|
||||||
|
compress.h
|
||||||
|
journal-def.h
|
||||||
|
journal-file.c
|
||||||
|
journal-file.h
|
||||||
|
journal-send.c
|
||||||
|
journal-vacuum.c
|
||||||
|
journal-vacuum.h
|
||||||
|
journal-verify.c
|
||||||
|
journal-verify.h
|
||||||
|
lookup3.c
|
||||||
|
lookup3.h
|
||||||
|
mmap-cache.c
|
||||||
|
mmap-cache.h
|
||||||
|
sd-journal.c
|
||||||
|
'''.split())
|
||||||
|
|
||||||
|
if conf.get('HAVE_GCRYPT') == 1
|
||||||
|
journal_client_sources += files('''
|
||||||
|
journal-authenticate.c
|
||||||
|
journal-authenticate.h
|
||||||
|
fsprg.c
|
||||||
|
fsprg.h
|
||||||
|
'''.split())
|
||||||
|
endif
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
audit_type_includes = [config_h,
|
||||||
|
missing_audit_h,
|
||||||
|
'linux/audit.h']
|
||||||
|
if conf.get('HAVE_AUDIT') == 1
|
||||||
|
audit_type_includes += 'libaudit.h'
|
||||||
|
endif
|
||||||
|
|
||||||
|
generate_audit_type_list = find_program('generate-audit_type-list.sh')
|
||||||
|
audit_type_list_txt = custom_target(
|
||||||
|
'audit_type-list.txt',
|
||||||
|
output : 'audit_type-list.txt',
|
||||||
|
command : [generate_audit_type_list, cpp] + audit_type_includes,
|
||||||
|
capture : true)
|
||||||
|
|
||||||
|
audit_type_to_name = custom_target(
|
||||||
|
'audit_type-to-name.h',
|
||||||
|
input : ['audit_type-to-name.awk', audit_type_list_txt],
|
||||||
|
output : 'audit_type-to-name.h',
|
||||||
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||||
|
capture : true)
|
||||||
|
|
||||||
|
journal_client_sources += [audit_type_to_name]
|
||||||
|
|
||||||
|
libjournal_client = static_library(
|
||||||
|
'journal-client',
|
||||||
|
journal_client_sources,
|
||||||
|
include_directories : includes,
|
||||||
|
c_args : ['-fvisibility=default'])
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
libjournal_core_sources = files('''
|
||||||
journald-audit.c
|
journald-audit.c
|
||||||
journald-audit.h
|
journald-audit.h
|
||||||
journald-console.c
|
journald-console.c
|
||||||
@ -21,27 +85,20 @@ sources = files('''
|
|||||||
journald-syslog.h
|
journald-syslog.h
|
||||||
journald-wall.c
|
journald-wall.c
|
||||||
journald-wall.h
|
journald-wall.h
|
||||||
|
journal-internal.h
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
sources += custom_target(
|
|
||||||
'journald-gperf.c',
|
|
||||||
input : 'journald-gperf.gperf',
|
|
||||||
output : 'journald-gperf.c',
|
|
||||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
|
||||||
|
|
||||||
libjournal_core = static_library(
|
|
||||||
'journal-core',
|
|
||||||
sources,
|
|
||||||
include_directories : includes,
|
|
||||||
install : false)
|
|
||||||
|
|
||||||
journal_includes = [includes, include_directories('.')]
|
|
||||||
|
|
||||||
systemd_journald_sources = files('''
|
systemd_journald_sources = files('''
|
||||||
journald.c
|
journald.c
|
||||||
journald-server.h
|
journald-server.h
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
|
journald_gperf_c = custom_target(
|
||||||
|
'journald-gperf.c',
|
||||||
|
input : 'journald-gperf.gperf',
|
||||||
|
output : 'journald-gperf.c',
|
||||||
|
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||||
|
|
||||||
systemd_cat_sources = files('cat.c')
|
systemd_cat_sources = files('cat.c')
|
||||||
|
|
||||||
journalctl_sources = files('''
|
journalctl_sources = files('''
|
||||||
@ -74,60 +131,3 @@ if get_option('create-log-dirs')
|
|||||||
'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
|
'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
tests += [
|
|
||||||
[['src/journal/test-journal-syslog.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[threads,
|
|
||||||
libxz,
|
|
||||||
liblz4,
|
|
||||||
libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/test-journal-config.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libxz,
|
|
||||||
liblz4,
|
|
||||||
libselinux]],
|
|
||||||
]
|
|
||||||
|
|
||||||
fuzzers += [
|
|
||||||
[['src/journal/fuzz-journald-audit.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-kmsg.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-native.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-native-fd.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-stream.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
|
|
||||||
[['src/journal/fuzz-journald-syslog.c',
|
|
||||||
'src/journal/fuzz-journald.c'],
|
|
||||||
[libjournal_core,
|
|
||||||
libshared],
|
|
||||||
[libselinux]],
|
|
||||||
]
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user