summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/pkcs11/libpkcs11/common/pkcs11Conf.c13
-rw-r--r--usr/src/lib/pkcs11/libpkcs11/common/pkcs11Slottable.c10
2 files changed, 14 insertions, 9 deletions
diff --git a/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Conf.c b/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Conf.c
index d0b306c948..b2f06f7da1 100644
--- a/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Conf.c
+++ b/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Conf.c
@@ -528,13 +528,14 @@ pkcs11_slot_mapping(uentrylist_t *pplist, CK_VOID_PTR pInitArgs)
}
/*
- * Open the provider. Use RTLD_NOW to make sure we
- * will not encounter symbol referencing errors later.
- * Use RTLD_GROUP to limit the provider to it's own
- * symbols, which prevents it from mistakenly accessing
- * the framework's C_* functions.
+ * Open the provider. We assume all of our plugins have
+ * their symbols properly defined, so the use of RTLD_NOW
+ * to flush out errors immediately is not necessary.
+ *
+ * Note that for proper operation, all plugins must be
+ * built with direct bindings enabled.
*/
- dldesc = dlopen(fullpath, RTLD_NOW|RTLD_GROUP);
+ dldesc = dlopen(fullpath, RTLD_LAZY);
/*
* If we failed to load it, we will just skip this
diff --git a/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Slottable.c b/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Slottable.c
index 5b65fbbded..9dae720e22 100644
--- a/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Slottable.c
+++ b/usr/src/lib/pkcs11/libpkcs11/common/pkcs11Slottable.c
@@ -18,9 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#include <dlfcn.h>
@@ -204,7 +204,11 @@ pkcs11_slottable_delete() {
(void) cur_slot->
sl_func_list->C_Finalize(NULL);
}
- (void) dlclose(cur_slot->sl_dldesc);
+
+ /* metaslot won't have a sl_dldesc! */
+ if (cur_slot->sl_dldesc != NULL) {
+ (void) dlclose(cur_slot->sl_dldesc);
+ }
/*
* Each provider maintains one disabled