Bug 262170 - Change in /usr/sbin/service causes /etc/rc.d/devmatch to hang on boot on LDAP clients
Summary: Change in /usr/sbin/service causes /etc/rc.d/devmatch to hang on boot on LDAP...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.3-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-rc (Nobody)
URL:
Keywords: regression
Depends on: 235122
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-24 10:55 UTC by kheuer
Modified: 2022-07-26 14:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kheuer 2022-02-24 10:55:35 UTC
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.