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

Re: How to get ipaddress

I'm missing the original post, but another possibility, if you're
running this daemon through inetd, is to use the tcp-env package.  It
will put the ip address into an environment variable for you.


> 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.
> _______________________________________________
> Pam-list mailing list
> Pam-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/pam-list


"Modern electronic-rock music, inaugurated in the early 1960s, is, and
 always has been, a joint enterprise of British military intelligence
 and Satanic cults."
    -- "The Satanic Roots of Rock"

GnuPG key available at http://devel.duluoz.net/pubkey.asc
Key ID = 1024D/9A256AE5 1999-11-13 Mike Glover <mpg4@duluoz.net>
Key fingerprint = EF6E 8BCB 4810 E98C F0FD  4596 367A 32B7 9A25 6AE5

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