From: TJ S. <tj...@di...> - 2001-02-02 01:10:46
|
dave>I am curious to know whether ProFTPd uses the OS's C library to dave>perform user/pass lookups or whether it reads /etc/passwd or dave>shadow directly with fgetpwXXX ? Ummm...yes and no. =) It depends on the module being used. If you're using AuthUserFile, or /etc/passwd, then mod_unixpw is responsible for doing the lookups -- I believe it uses fgetpwent() and friends. mod_sqlpw in conjunction with mod_pgsql or mod_mysql, and mod_ldap, do not rely on that. The modules provide a custom getpwnam() function. dave>While browsing the source I cannot follow the auth sequence dave>completely to determine whether or not the standard getpwnam and dave>friends are being called or not. The key will be the auth_getpwnam() et al functions. These functions are actually dispatcher functions, and will call the function listed in a module's authtab. mod_unixpw and mod_ldap provide examples of using the authtab to override the system/library authentication functions. dave>I make use of a custom NSS library which is called from glibc dave>but if an application reads directly from the /etc/passwd then dave>it obviously would not be used. If you're using an NSS module, then mod_unixpw and the fgetpwent() calls should work you. If they don't...be sure to let us know. =) Hope that helps... ---------------------------------------------------------------- TJ Saunders <tj...@di...> ---------------------------------------------------------------- -- To unsubscribe, send mail to pro...@pr... with "unsubscribe" in the subject field of the message. http://www.proftpd.net -- The Official ProFTPD web site. http://bugs.proftpd.net -- Bug reporting and feature requests. |