Local address from PAM module?

John Newbigin jn at it.swin.edu.au
Wed Sep 29 02:01:58 UTC 2004


Jason DiCioccio wrote:


> 
> Thanks Jason (wow, there's a lot of Jasons)..  This was unfortunately
> the answer I was expecting.  The reason behind the PAM module is so
> that we wouldn't have to modify the code for our various services each
> time we wanted to upgrade them.  However, I suppose adding a couple of
> lines to the code is still a lot better than having to add ~200 lines.
This is probably not the cleanest way do to it, but from your pam module 
you should be able to find the fd which is the socket being used (if you 
are lucky it will always be the same number) and then query the address 
yourself.

I don't know off hand how you would do that but it is possible.  Check 
lsof and see how it does it (might be an ioctl or might involve /proc)

John.

> 
> Thanks!
> Jason DiCioccio
> 
> _______________________________________________
> Pam-list mailing list
> Pam-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pam-list
> 
> 
> 


-- 
John Newbigin
Computer Systems Officer
Faculty of Information and Communication Technologies
Swinburne University of Technology
Melbourne, Australia
http://www.it.swin.edu.au/staff/jnewbigin




More information about the Pam-list mailing list