Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162169179
D17557.id49159.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17557.id49159.diff
View Options
Index: lib/libc/net/nsdispatch.3
===================================================================
--- lib/libc/net/nsdispatch.3
+++ lib/libc/net/nsdispatch.3
@@ -32,7 +32,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 4, 2010
+.Dd October 16, 2018
.Dt NSDISPATCH 3
.Os
.Sh NAME
@@ -112,10 +112,7 @@
and
.Fa method_name
arguments along with the configured source.
-(The methods supplied via
-.Fa dtab
-take priority over those implemented in NSS modules in the event
-of a conflict.)
+Modules must use source names different from the built-in ones.
.Pp
.Va defaults
contains a list of default sources to try if
Index: lib/libc/net/nsdispatch.c
===================================================================
--- lib/libc/net/nsdispatch.c
+++ lib/libc/net/nsdispatch.c
@@ -486,9 +486,19 @@
*/
mod.handle = nss_builtin_handle;
fn = reg_fn;
- } else if (!is_dynamic())
+ } else if (!is_dynamic()) {
goto fin;
- else {
+ } else if (strcmp(source, NSSRC_CACHE) == 0 ||
+ strcmp(source, NSSRC_COMPAT) == 0 ||
+ strcmp(source, NSSRC_DB) == 0 ||
+ strcmp(source, NSSRC_DNS) == 0 ||
+ strcmp(source, NSSRC_FILES) == 0 ||
+ strcmp(source, NSSRC_NIS) == 0) {
+ /*
+ * Avoid calling dlopen(3) for built-in modules.
+ */
+ goto fin;
+ } else {
if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name,
NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf))
goto fin;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 12:52 PM (22 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34960454
Default Alt Text
D17557.id49159.diff (1 KB)
Attached To
Mode
D17557: Don't try to dlopen() built-in NSS types
Attached
Detach File
Event Timeline
Log In to Comment