diff options
author | Sam James <sam@gentoo.org> | 2021-11-20 12:06:37 +0000 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2021-11-20 17:33:14 -0600 |
commit | f3f0fde861b438c80f99afdd49fe175e9d0a68ca (patch) | |
tree | 0ec1e0fcd03442ba482c1f932cf9485772ca99f5 | |
parent | bd5cdaafadf997c0ab3c4ad362dbdfd7dc6fd987 (diff) |
meson: link against libcrypt for SELinux if no PAM
We use libcrypt's crypt() if we're _not_ using PAM
in the SELinux code (rc-selinux, specifically).
X-Gentoo-Bug: 824954
X-Gentoo-Bug-URL: https://bugs.gentoo.org/824954
Fixes: https://github.com/openrc/openrc/pull/477
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | src/rc/meson.build | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 8af45560..1ee10751 100644 --- a/meson.build +++ b/meson.build @@ -93,6 +93,8 @@ rc_bindir = rc_libexecdir / 'bin' rc_sbindir = rc_libexecdir / 'sbin' sbindir = rootprefix / get_option('sbindir') +crypt_dep = dependency('libcrypt', required : not get_option('pam')) + selinux_dep = dependency('libselinux', required : get_option('selinux')) pam_misc_dep = [] if selinux_dep.found() diff --git a/src/rc/meson.build b/src/rc/meson.build index d7b170e6..e0603fd0 100644 --- a/src/rc/meson.build +++ b/src/rc/meson.build @@ -50,7 +50,7 @@ executable('openrc-run', rc_selinux_c, version_h], c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags], link_with: [libeinfo, librc], - dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, selinux_dep, util_dep], + dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, selinux_dep, util_dep, crypt_dep], include_directories: [incdir, einfo_incdir, rc_incdir], install: true, install_dir: sbindir) @@ -85,7 +85,7 @@ executable('runscript', rc_selinux_c, version_h], c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags], link_with: [libeinfo, librc], - dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep], + dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep, crypt_dep], include_directories: [incdir, einfo_incdir, rc_incdir], install: true, install_dir: sbindir) @@ -95,7 +95,7 @@ executable('start-stop-daemon', rc_selinux_c, usage_c, version_h], c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags], link_with: [libeinfo, librc], - dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep], + dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep, crypt_dep], include_directories: [incdir, einfo_incdir, rc_incdir], install: true, install_dir: sbindir) @@ -169,7 +169,7 @@ executable('checkpath', c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags], include_directories: [incdir, einfo_incdir, rc_incdir], link_with: [libeinfo, librc], - dependencies: [audit_dep, pam_dep, pam_misc_dep, selinux_dep], + dependencies: [audit_dep, pam_dep, pam_misc_dep, selinux_dep, crypt_dep], install: true, install_dir: rc_bindir) |