diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-06-08 17:21:44 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-06-08 17:21:44 +0200 |
commit | 7c1edab7e6c1c6939ecdeaefc5f006772298f9eb (patch) | |
tree | 0301df80fb942dd4bca884d13108c8e0a902f66e | |
parent | d6b8300fe9bae0595aaf894c5d98aa7c72209e38 (diff) |
Ignore files without a 'module' value.
* Just skip loading these.
-rw-r--r-- | p11-kit/modules.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c index 2df801f..268a3d5 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -380,8 +380,7 @@ load_module_from_file_unlocked (const char *path, Module **result) } static CK_RV -load_module_from_config_unlocked (const char *configfile, const char *name, - Module **result) +load_module_from_config_unlocked (const char *configfile, const char *name) { Module *mod, *prev; const char *path; @@ -410,8 +409,8 @@ load_module_from_config_unlocked (const char *configfile, const char *name, path = hash_get (mod->config, "module"); if (path == NULL) { free_module_unlocked (mod); - warning ("no module path specified in config: %s", configfile); - return CKR_GENERAL_ERROR; + debug ("no module path specified in config, skipping: %s", configfile); + return CKR_OK; } rv = dlopen_and_get_function_list (mod, path); @@ -450,8 +449,6 @@ load_module_from_config_unlocked (const char *configfile, const char *name, return CKR_HOST_MEMORY; } - if (result) - *result = mod; return CKR_OK; } @@ -503,7 +500,7 @@ load_modules_from_config_unlocked (const char *directory) if (is_dir) rv = CKR_OK; else - rv = load_module_from_config_unlocked (path, dp->d_name, NULL); + rv = load_module_from_config_unlocked (path, dp->d_name); free (path); |