On Thu, 25 Oct 2001, Ondrej Svetlik wrote: > Thank you, RTLD_LAZY | RTLD_GLOBAL solves my problem. I'm still not sure, > whether this will work: > > struct pamSec { > ... > pam_start > pam_end > pam_authenticate > ... > }; > > ... > pamSec = loadPamLib(); /* this fills the pamSec structure */ as in dlsym() the wanted symbols ? > pamSec->pam_start("service1", ...); > pamSec->pam_authenticate(...); > pamSec->pam_end(...); > ... > pamSec->pam_start("service2", ...); > pamSec->pam_authenticate(...); > pamSec->pam_end(...); > ... > > when service1 and service2 use different modules, would pam_authenticate > be different? the PAM lib find outs itself what objects it needs. You only need to make sure that namespaces are unique, else the runtime linker will bark / do strange things. It should word, but I might be missing something :) Igmar