HomeFreeBSD

ldconfig(8): check for no-args command line after options are parsed

Description

ldconfig(8): check for no-args command line after options are parsed

Default action for ldconfig is specified as -R AKA 'append', and for
no-args (without options changing default actions), ldconfig should
append empty list of directories to current list. But because the check
was done before options were parsed out, presence of any option turned
off default rescan.

As result, innocently-looked commands like `ldconfig -v' were interpreted
as setting directory hints list to one specified on the command line,
i.e. empty.

Reported by: https://github.com/mesonbuild/meson/issues/9592
Reviewed by: emaste
Tested by: jbeich
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33058

Details

Provenance
kibAuthored on Nov 19 2021, 4:07 AM
Reviewer
emaste
Differential Revision
D33058: ldconfig(8): check for no-args command line after options are parsed
Parents
rGaf9115870670: ldconfig: use libexec/rtld-elf/rtld_paths.h
Branches
Unknown
Tags
Unknown