Menu

#50 mod_auth_pam enhancements

open
nobody
None
5
2006-04-28
2006-04-28
bfleisch
No

This patch adds two new features to mod_auth_pam:

* The name of the service used by the PAM library may be
set by the Apache directive AuthPAM_ServiceName.
The default service name is "httpd".

* The module now caches both positive (i.e.:
successful)
and negative authentication results. This improves
performances on slow authentication providers(NIS/YP
or LDAP), and limit deny-of-service attacks with bad
credentials.

NB: The cache routines may be disabled by "undefining"
the ENABLE_CACHE macro in source file.

Discussion

  • bfleisch

    bfleisch - 2006-04-28

    patch

     
  • Nobody/Anonymous

    Logged In: NO

    I am patching a mod_auth_pam-2.0-1.1.1 install on RH ES 3
    system. When I run patch in dir I am getting:

    -bash-2.05b# patch < patch_mod_auth_pam_orig
    patching file mod_auth_pam.c
    patch: **** malformed patch at line 94: @@ -179,18 +200,42 @@
    -bash-2.05b#

    Line 92 /*
    93 * Solaris 2.6.x has a broken conversation function
    and needs this
    94 @@ -179,18 +200,42 @@
    95 #endif
    96
    97 /*
    94:

    Thanks for any help...
    Rob

     
  • Nobody/Anonymous

    Logged In: NO

    I am patching a mod_auth_pam-2.0-1.1.1 install on RH ES 3
    system. When I run patch in dir I am getting:

    -bash-2.05b# patch < patch_mod_auth_pam_orig
    patching file mod_auth_pam.c
    patch: **** malformed patch at line 94: @@ -179,18 +200,42 @@
    -bash-2.05b#

    Line 92 /*
    93 * Solaris 2.6.x has a broken conversation function
    and needs this
    94 @@ -179,18 +200,42 @@
    95 #endif
    96
    97 /*
    94:

    Thanks for any help...
    Rob

     
  • bfleisch

    bfleisch - 2006-05-12

    mod_auth_pam2.c

     
  • bfleisch

    bfleisch - 2006-05-12

    Logged In: YES
    user_id=723686

    Hi Rob,

    Please try with the complete source file attached in this
    bug report.

    Regards,

    Bruno

     
  • Nobody/Anonymous

    Logged In: NO

    Hello... Thanks for the response...

    Basically I copied that file into my mod_auth_pam-2.0-1.1.1
    dir. I then Vi the Makefile changed
    SOURCES=mod_auth_pam.c mod_auth_sys_group.c
    SOURCES=mod_auth_pam2.c mod_auth_sys_group.c

    Then did a make, make install.. it creates a
    /usr/lib/httpd/modules/mod_auth_pam2.so
    along with the other file
    /usr/lib/httpd/modules/mod_auth_pam.so

    I then changed the httpd.conf to read:
    #LoadModule auth_pam_module modules/mod_auth_pam.so
    LoadModule auth_pam_module modules/mod_auth_pam2.so

    When restarting httpd Im getting the following:
    -bash-2.05b# /etc/init.d/httpd restart
    Stopping httpd: [
    OK ]
    Starting httpd: Syntax error on line 209 of
    /etc/httpd/conf/httpd.conf:
    Can't locate API module structure `auth_pam_module' in file
    /etc/httpd/modules/mod_auth_pam2.so: /usr/lib/libapr-0.so.0:
    undefined symbol: auth_pam_module

    [FAILED]
    -bash-2.05b#

    Am I missing something....

    Rob

     
  • Nobody/Anonymous

    Logged In: NO

    Hello....

    The problem is you named it a different name then the
    original module:

    Original Mod:
    #LoadModule auth_pam_module modules/mod_auth_pam.so

    Your name:
    LoadModule pam_auth_module modules/mod_auth_pam.so

    Once I changed the line in httpd.conf to read
    "pam_auth_module" restarted apache it started fine...

    Maybe update your .c file to match the default name of this
    module "mod_auth_pam" might be a good idea....

    Ron

     

Log in to post a comment.