Local address from PAM module?

Jason Clifford jason at ukpost.com
Tue Sep 28 19:50:23 UTC 2004


On Tue, 28 Sep 2004, Jason DiCioccio wrote:

> > In fact, all you should need to do is to define an extra pam item (say,
> > PAM_LHOST to complement PAM_RHOST) and then add the necessary logic in
> > your module which should only be a few lines of code - the specifics being
> > reserved to the configuration object.
> 
> Hmm..  Perhaps I'm dense, but I can't think of a way to figure out the
> address to put into PAM_LHOST without actually doing it from within
> each application.  Are you saying I can do all of this completely
> within the module?  If so, how?

No, you'd have to make a, very small, change to your application to call 
pam_set_item with the data for lhost in the PAM handling routine.

Then you'd put the code to use that data however you need to into the 
module.

You'd also need to add the definition for lhost to the _pam_types.h file.

Do note that I *really* do not recommend this approach.

Simply using a different pam configuration for each service as set in the 
application configuration for each vhost should not be hard at all and 
should not require any work beyond simple configuraion options.

Jason Clifford
-- 
UKFSN.ORG		Finance Free Software while you surf the 'net
http://www.ukfsn.org/	   ADSL Broadband from just £21.50 / month 




More information about the Pam-list mailing list