kravietz / pam_tacplus

TACACS+ protocol client library and PAM module in C. This PAM module support authentication, authorization (account management) and accounting (session management)performed using TACACS+ protocol designed by Cisco.
GNU Lesser General Public License v3.0
132 stars 100 forks source link

Unable to access customized API added to pam_tacplus library #160

Closed srikanthrsr closed 2 years ago

srikanthrsr commented 4 years ago

I have added an Customized API in suport.c (definition) , support.h(declaration) , then i compiled library . Then tried to access it from my application (including support.h header file ) , and in makefile linked the library with option

LIBS = -ltac -lpam , then while compiling my application i got undefined reference error ,

even with the option LIBS = -ltac -lpam -L/usr/lib/pam_tacplus.so also i got the same undefined reference error

Can you please help me out, to solve this issue?

kravietz commented 4 years ago

@srikanthrsr Can you paste the error here?

srikanthrsr commented 4 years ago

@srikanthrsr Can you paste the error here?

undefined reference to `getServerStats(char*)'

getServerStats is my customized API in support.c

srikanthrsr commented 4 years ago

undefined reference to `getServerStats(char*)'

kravietz commented 4 years ago

@srikanthrsr Have you installed libtac after compiling it with the custom code? I guess by default compiler will pick up the system-wide libtac on -ltac option, to point it to your local modified copy you need -L dir

srikanthrsr commented 4 years ago

Yes after compiling with custom code , i installed the libtac and pam_tacplus.so in /usr/lib/ directory

Yes i even tried -L dir option as well but i got same error

srikanthrsr commented 4 years ago

I added custom API in tacacs/support.c , it will be compiled to pam_tacplus.so library , not to libtac.so

kravietz commented 2 years ago

@srikanthrsr This looks like incompatible libraries being installed at the same time in the system, not really bug in the pam_tacplus.