nit: the argument is a module name, which may or may not be a path.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@661 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
fe2e691204
commit
2b8f7a6154
|
@ -52,24 +52,24 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pam_module_t *
|
pam_module_t *
|
||||||
openpam_load_module(const char *path)
|
openpam_load_module(const char *modulename)
|
||||||
{
|
{
|
||||||
pam_module_t *module;
|
pam_module_t *module;
|
||||||
|
|
||||||
module = openpam_dynamic(path);
|
module = openpam_dynamic(modulename);
|
||||||
openpam_log(PAM_LOG_DEBUG, "%s dynamic %s",
|
openpam_log(PAM_LOG_DEBUG, "%s dynamic %s",
|
||||||
(module == NULL) ? "no" : "using", path);
|
(module == NULL) ? "no" : "using", modulename);
|
||||||
|
|
||||||
#ifdef OPENPAM_STATIC_MODULES
|
#ifdef OPENPAM_STATIC_MODULES
|
||||||
/* look for a static module */
|
/* look for a static module */
|
||||||
if (module == NULL && strchr(path, '/') == NULL) {
|
if (module == NULL && strchr(path, '/') == NULL) {
|
||||||
module = openpam_static(path);
|
module = openpam_static(path);
|
||||||
openpam_log(PAM_LOG_DEBUG, "%s static %s",
|
openpam_log(PAM_LOG_DEBUG, "%s static %s",
|
||||||
(module == NULL) ? "no" : "using", path);
|
(module == NULL) ? "no" : "using", modulename);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (module == NULL) {
|
if (module == NULL) {
|
||||||
openpam_log(PAM_LOG_ERROR, "no %s found", path);
|
openpam_log(PAM_LOG_ERROR, "no %s found", modulename);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
return (module);
|
return (module);
|
||||||
|
|
Loading…
Reference in New Issue