HomeFreeBSD

Don't call stat(2) on nsswitch.conf(5) every time nsdispatch(3)

Description

Don't call stat(2) on nsswitch.conf(5) every time nsdispatch(3)
and dependent functions (eg getpwname(3)) get called. This can
improve performance of binaries that perform a lot of name
lookups, such as gssd(8). It also matches documented behaviour
of Linux and Solaris.

The old code is left in place, should anyone need it, guarded
by #ifdef NS_REREAD_CONF.

Reviewed by: imp, bcr
MFC after: 2 weeks
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17934

Details

Provenance
traszAuthored on
Reviewer
imp
Differential Revision
D17934: Don't stat nsswitch.conf all the time.
Parents
rS340338: wmt(4): Add PNP record so it could be picked by devd/devmatch.
Branches
Unknown
Tags
Unknown