dlopen not able to open shared object file, even though it is existing
Steve Langasek
vorlon at debian.org
Sat Dec 8 19:35:24 UTC 2012
On Sat, Dec 08, 2012 at 06:01:06AM +0000, mohanamurali.gurunathan at wipro.com wrote:
> Hello pam-list members,
> We had written a customized PAM authentication module (in C) named
> vauth.so to be used for sshd. We had changed the sshd file in /etc/pam.d
> to include the following line
> authenticate sufficient vauth.so
> We were able to have ssh session using PuTTY successfully. vauth.so gets
> called and authentication gets completed.
> After this, we wanted to use some java components for our authentication
> through vauth.so. So, we used some JNI calls from the c code, and created
> vauth.so.
> These were the commands used to create vauth.so (which is finally placed
> in /lib64/security)
> gcc -fPIC -fno-stack-protector -I/usr/java/jdk1.7.0_07/include -I/usr/java/jdk1.7.0_07/include/linux -c vauth.c -L/usr/java/jdk1.7.0_07/jre/lib/amd64/server
> ld -x --shared -o /lib64/security/vauth.so vauth.o /usr/java/jdk1.7.0_07/jre/lib/amd64/server/libjvm.so
> We had also copied "libjvm.so" to /lib64/security.
> Now, when we do an authentication using PuTTY, we see the following error.
> Dec 6 11:23:10 localhost sshd[8605]: PAM unable to dlopen(/lib64/security/vauth.so): libjvm.so: cannot open shared object file: No such file or directory
> Dec 6 11:23:10 localhost sshd[8605]: PAM adding faulty module: /lib64/security/vauth.so
> We are not sure, why this problem occurs as libjvm.so in present in
> /lib64/security.
Run 'ldd -d -r /lib64/security/vauth.so' to see what's wrong.
But as a general rule, /lib64/security is not going to be on the library
search path; so either you need libjvm.so to be installed to a system path,
or you need to use an rpath setting on your module to tell the runtime
linker where to find libjvm.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/pam-list/attachments/20121208/3ca8de2c/attachment.sig>
More information about the Pam-list
mailing list