Bug 258917 - net/openldap24-server: OTP unavailable because can't read/write key database /etc/opiekeys: Permission denied
Summary: net/openldap24-server: OTP unavailable because can't read/write key database ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Xin LI
Depends on:
Reported: 2021-10-04 11:34 UTC by martin
Modified: 2021-10-04 11:34 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (delphij)


Note You need to log in before you can comment on or make changes to this bug.
Description martin 2021-10-04 11:34:07 UTC
Since version 2.4.59, I'm seeing many of these warnings in /var/log/messages.  I'm now running openldap24-server-2.4.59_5 from FreeBSD 11.4 pkgs and rc.conf contains:

slapd_flags='-l DAEMON -h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://"'

The backtrace is

#0  syslog (pri=35, fmt=0x80122bd99 "%s")
    at /usr/src/lib/libc/gen/syslog.c:127
#1  0x000000080121f5f7 in sasl_errdetail () from /usr/local/lib/libsasl2.so.3
#2  0x000000080121febc in _sasl_log () from /usr/local/lib/libsasl2.so.3
#3  0x0000000803831eee in otp_client_plug_init ()
   from /usr/local/lib/sasl2/libotp.so.3
#4  0x000000080122629c in sasl_server_start ()
   from /usr/local/lib/libsasl2.so.3
#5  0x0000000801226b3f in _sasl_server_listmech ()
   from /usr/local/lib/libsasl2.so.3
#6  0x00000008012202bb in sasl_listmech () from /usr/local/lib/libsasl2.so.3
#7  0x000000000048012b in slap_sasl_mechs ()
#8  0x000000000047e963 in root_dse_info ()
#9  0x0000000000432760 in fe_op_search ()
#10 0x0000000000432533 in do_search ()
#11 0x0000000000430f83 in connection_assign_nextid ()
#12 0x0000000800946f7b in ldap_pvt_thread_pool_submit ()
   from /usr/local/lib/libldap_r-2.4.so.2
#13 0x0000000801e7e08c in thread_start (curthread=0x84520f000)
    at /usr/src/lib/libthr/thread/thr_create.c:290
#14 0x0000000000000000 in ?? ()

The problem is that the pkg runs slapd as user ldap by default but the file is only accessible by root so it can't work:

-rw-------  1 root  wheel  0 Oct 13  2020 /etc/opiekeys