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

Re: How to get ipaddress



Hello all.

Thank you for your responses.

> PAM has no way (that I know of) of providing you with the IP address of
> the user, though you can use pam_get_item to get the rhost or the tty.
>
> From the rhost or the tty, you can use whatever tools are available in
> your language to get the IP address.

Does pam-get-item with PAM-RHOST give me a hostname of a user?
If so,  I can call gethostbyname with the hostname.

Whenever I tried pam-get-item(pamh, PAM-RHOST, (void *)&buffer) ,
buffer was unreadable.
ntohl, htonl were not successfull.
My DNS problem?

Would you tell me how to use this function in detail?

Thank you in advance.





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