Whoa, don't forget to actually resolve symbols once we've located a
dynamic module. Sponsored by: DARPA, NAI Labs git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@34 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
e683738206
commit
b55243b5c1
|
@ -67,6 +67,7 @@ openpam_load_module(const char *path)
|
||||||
{
|
{
|
||||||
pam_module_t *module;
|
pam_module_t *module;
|
||||||
void *dlh;
|
void *dlh;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* check cache first */
|
/* check cache first */
|
||||||
for (module = modules; module != NULL; module = module->next)
|
for (module = modules; module != NULL; module = module->next)
|
||||||
|
@ -82,6 +83,8 @@ openpam_load_module(const char *path)
|
||||||
if ((module->path = strdup(path)) == NULL)
|
if ((module->path = strdup(path)) == NULL)
|
||||||
goto buf_err;
|
goto buf_err;
|
||||||
module->dlh = dlh;
|
module->dlh = dlh;
|
||||||
|
for (i = 0; i < PAM_NUM_PRIMITIVES; ++i)
|
||||||
|
module->func[i] = dlsym(dlh, _pam_sm_func_name[i]);
|
||||||
}
|
}
|
||||||
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", path);
|
||||||
|
|
Loading…
Reference in New Issue