RE: dlopen not able to open shared object file, even though it is existing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello Steve Langasek,

Thank you. 

I created symbolic links to in /lib64 and /usr/lib64. 

Now dlopen error is not reported. But, the jvm does not get created. 

I saw some message for sshd - something like  "..... broken  pipe" in /var/log/secure

When I use pamtester and run as root, no issues. When I run pamtester as a non root user for my module I get segmentation fault msg in the command line.

With Thanks & Best Regards,
-Mohana Murali G

From: pam-list-bounces@xxxxxxxxxx [pam-list-bounces@xxxxxxxxxx] on behalf of Steve Langasek [vorlon@xxxxxxxxxx]
Sent: Sunday, December 09, 2012 1:05 AM
To: pam-list@xxxxxxxxxx
Subject: Re: dlopen not able to open shared object file, even though it is      existing

On Sat, Dec 08, 2012 at 06:01:06AM +0000, mohanamurali.gurunathan@xxxxxxxxx wrote:
> Hello pam-list members,

> We had written a customized PAM authentication module (in C) named
> to be used for sshd.  We had changed the sshd file in /etc/pam.d
> to include the following line

> authenticate sufficient

> We were able to have ssh session using PuTTY successfully. gets
> called and authentication gets completed.

> After this, we wanted to use some java components for our authentication
> through  So, we used some JNI calls from the c code, and created

> These were the commands used to create (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.o /usr/java/jdk1.7.0_07/jre/lib/amd64/server/

> We had also copied "" 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/ cannot open shared object file: No such file or directory
> Dec  6 11:23:10 localhost sshd[8605]: PAM adding faulty module: /lib64/security/

> We are not sure, why this problem occurs as in present in
> /lib64/security.

Run 'ldd -d -r /lib64/security/' 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 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                          
slangasek@xxxxxxxxxx                                     vorlon@xxxxxxxxxx

Pam-list mailing list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux