You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting Chef Client, version 18.0.161 / 17.10.3 and ohai-cli yields a stacktrace.
This happens only when Passwd ohai module is in use with libnss-mysql.
Steps to Reproduce
Clean AlmaLinux 8.6 with uptodate packages.
Additionally libnss-mysql installed from EPEL (libnss-mysql 1.5-35.el8), configured with default settings:
- **ruby**:
/usr/bin/ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
OpenSSL 1.1.1k FIPS 25 Mar 2021
- openssl version:
OpenSSL 1.1.1k FIPS 25 Mar 2021
libnss_mysql.so is linked with /lib64/libmariadb.so.3 which is linked with system SSL - cause in default AlmaLinux is building mariadb-connector-c with SSL enabled thus it causes conflict with libraries, cause chef loads different libssl (/opt/chef/embedded/lib/libssl.so.1.0.0) and libnss_mysql.so load different one (/lib64/libssl.so.1.1) so result is segfault.
In my opinion provided ruby should be linked with system OpenSSL thus the problem wont exist.
To fix this issue I compiled mariadb-connector-c without SSL and linked it to libnss_mysql, so had to make two packages. Cause I dont use libnss_mysql everywhere I picked this solution as easiest one.
Description
Starting Chef Client, version
18.0.161
/17.10.3
and ohai-cli yields a stacktrace.This happens only when Passwd ohai module is in use with libnss-mysql.
Steps to Reproduce
Clean AlmaLinux 8.6 with uptodate packages.
Additionally libnss-mysql installed from EPEL (libnss-mysql 1.5-35.el8), configured with default settings:
/etc/nsswitch.conf:
Additional informations
Creating test script based of: /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.0.20/lib/ohai/plugins/passwd.rb:
test.rb:
Executing it directly using: /opt/chef/embedded/bin/ruby test.rb works as expected, all users are returned.
Ohai Version
ohai-18.0.20 / ohai-17.9.0
Platform Version
Ohai Output
The text was updated successfully, but these errors were encountered: