OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: How to compile the PAM module

From: qin (junying.qingmail.com)
Date: Wed Mar 07 2007 - 23:36:25 CST


I compiled with -lc:

$ gcc -fPIC -lc pam_module.c -lpam -lpam_misc -lpamc
$ ld -x --shared -o pam_module.so pam_module.o

and found some functions are not found.

...
....:pam_module.c:undefined reference to '_set_ctrl'
...: pam_module.c:undefined reference to 'pam_syslog'

I have linked the libpam.so, libpamc.so and lpam_misc.so, why it can
not found the missing functions?

2007/3/7, Kenneth Geisshirt <kennethgeisshirt.dk>:
> qin wrote:
>
> > I have no idea. Could sombody give me some advice?
>
> Try:
>
> $ gcc -fPIC -c pam_module.c
> $ ld -x --shared -o pam_module.so pam_module.o
>
> /kneth
>
> _______________________________________________
> Pam-list mailing list
> Pam-listredhat.com
> https://www.redhat.com/mailman/listinfo/pam-list
>

_______________________________________________
Pam-list mailing list
Pam-listredhat.com
https://www.redhat.com/mailman/listinfo/pam-list