Don't call dlopen(3) for the built-in NSS types - "cache", "compat",
"dns", "files", "db", and "nis". It saves some path lookups during
binary startup.
Details
- Reviewers
des markj - Group Reviewers
manpages - Commits
- rS339363: Don't call dlopen(3) for built-in NSS types - "cache", "compat",
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 20200 Build 19680: arc lint + arc unit
Event Timeline
If someone actually created dynamic NSS modules with these names today, would they work? Or is there some reason that would fail? If it works, then this change would break such a configuration, though I'd be surprised if anyone actually does that. At the very least, we should document these names as being reserved by the implementation.
As it is now, I believe they could work in FreeBSD. In Linux, glibc already provides the built-in modules as shared libraries, so it would clash there. I've grepped the ports tree for '\<nss_.*so', and I don't see an example of anyone doing that.
Which is to say: I believe it would be rather silly thing to try install a third-party module with a name of a built-in source.
I completely agree, but stranger things have happened. I would just suggest adding a sentence to this effect to nsdispatch(3) or nsswitch.conf(5).
lib/libc/net/nsdispatch.c | ||
---|---|---|
491 | Sorry, meant to leave this comment with the review: we should use the NSSRC_CACHE, etc. constants defined in nsswitch.conf. |