How to get ipaddress

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

 



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.

-mike

> 
> 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@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"
        http://www.av1611.org/othpubls/roots.html

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





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux