Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: porting PAM

From: Will Backman <whb(at)ceimaine.org>
Date: Wed May 28 2003 - 10:24:22 EDT

A ghost from the past rises again...

http://mail-index.netbsd.org/tech-userlevel/2001/06/26/0000.html

Noriyuki Soda wrote:
> In summary
> PAM:
> - all PAM modules are to effect setuid when they are
> called from root privilege processes.
> BSD module:
> - all BSD auth modules are to effect setuid when they
> are called from root privilege processes.
> - all setuid BSD auth modules are of course setuid,
> even it it is called from normal user.

My understanding of this is that:
* PAM is not necessarily implemented using shared library/objects   e.g. RedHat is using some external programs for PAM IIRC * PAM is not really standardized; it's different on every   system which is using it (Solaris, Linux, FreeBSD at least)

If we compare standard implementation of PAM and BSD auth (i.e. shared objects for PAM, external programs for BSD auth), we get:

  • BSD auth module is small, easy to audit external program; rogue BSD auth module cannot do evil things to caller, since they live in separate address space and communicate via well-defined API
  • BSD auth module does not need to be suid if it's authentication method doesn't require root access
  • it's easy to provide e.g. Linux PAM-compatible authentication API, if need be
  • PAM requires the caller to have necessary permissions to authenticate the user; for most systems, that means the caller has to still be (suid) root
  • PAM needs dynamic loading support, so doesn't work for statically linked programs.

As I see it, BSD auth requires less from the caller, can be used by statically compiled programs without problems and (suid) caller cannot be attacked by a bogus PAM module. The only advantage of PAM is that more people know the TLA PAM, other standardization mostly doesn't exist.

IMHO BSD auth is more suitable from security and usability POW.

Do you need help?X

Bob Beck wrote:

>>Now of course Theo was talking about something other than PAM. But
Received on Wed May 28 10:29:43 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:40 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library