mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-06-06 08:58:38 +02:00
meson: use pkg-config to find audit
The previous checks were wrong, because when building statically, cap-ng would have to be linked for the audit_log_user_avc_message check to succeed. Rather than duplicating this knowledge in dbus, though, let's take advantage of audit.pc. Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
parent
4f5796a37d
commit
76218a30ef
1 changed files with 3 additions and 8 deletions
11
meson.build
11
meson.build
|
|
@ -601,14 +601,9 @@ config.set_quoted('DBUS_CONSOLE_OWNER_FILE', console_owner_file)
|
|||
if get_option('libaudit').disabled()
|
||||
have_libaudit = false
|
||||
else
|
||||
libaudit = cc.find_library('audit', required: false)
|
||||
libaudit_ok = cc.has_function('audit_log_user_avc_message', dependencies: libaudit)
|
||||
cap_ng = cc.find_library('cap-ng', required: false)
|
||||
cap_ng_ok = cc.has_function('capng_clear', dependencies: cap_ng)
|
||||
have_libaudit = libaudit_ok and cap_ng_ok
|
||||
if get_option('libaudit').enabled() and not have_libaudit
|
||||
error('libaudit support requested but not found')
|
||||
endif
|
||||
libaudit = dependency('audit', required: get_option('libaudit'))
|
||||
cap_ng = dependency('libcap-ng', required: get_option('libaudit'))
|
||||
have_libaudit = libaudit.found() and cap_ng.found()
|
||||
# For the systemd system unit
|
||||
data_config.set('AMBIENT_CAPS', 'AmbientCapabilities=CAP_AUDIT_WRITE')
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue