How to compile the PAM module

qin junying.qin at gmail.com
Thu Mar 8 05:36:25 UTC 2007


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 <kenneth at geisshirt.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-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pam-list
>




More information about the Pam-list mailing list