[Bug 262170] Change in /usr/sbin/service causes /etc/rc.d/devmatch to hang on boot on LDAP clients

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 24 Feb 2022 10:55:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262170

            Bug ID: 262170
           Summary: Change in /usr/sbin/service causes /etc/rc.d/devmatch
                    to hang on boot on LDAP clients
           Product: Base System
           Version: 12.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: kheuer@gwdg.de

Compared to 12.2-STABLE, line 168 of /usr/sbin/service has changed to:

exec env -i -L 0/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin
"$dir/$script" "$@"

In 12.2-STABLE, line 168 reads:

exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script "$@"

That means that /etc/login.conf.db shall additionally be scanned for
environment variables in 12.3-STABLE.

As a consequence, when a FreeBSD host is configured as an LDAP client,
/etc/rc.d/devmatch will hang on boot since the system tries to connect to an
LDAP server before network connections are available. Status codes and actions
in /etc/nsswitch.conf don't help. /etc/nsswitch.conf looks like:

group: files ldap
passwd: files ldap
...

To be clear, any command executed by "exec env -i -L 0/daemon ..." will hang on
boot.

-- 
You are receiving this mail because:
You are the assignee for the bug.