kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
731 stars 251 forks source link

Converting static modules to dynamic modules. #122

Closed CHERTS closed 7 years ago

falzm commented 8 years ago

Could you please merge this PR? It'd be nice to build your module as dynamic module and package it individually for Debian/Ubuntu.

kabili207 commented 8 years ago

It looks like this pull request removes the checks for *nix systems and also removes support for the older style config. The config below should address both cases.

ngx_addon_name=ngx_http_auth_ldap_module

LDAP_REQUIRED_LIBS="-lldap"

case "$NGX_PLATFORM" in
    Darwin:*|FreeBSD:*|Linux:*|SunOS:*)
        LDAP_REQUIRED_LIBS="$LDAP_REQUIRED_LIBS -llber"
    ;;
esac

if test -n "$ngx_module_link"; then
    ngx_module_type=HTTP
    ngx_module_name=ngx_http_auth_ldap_module
    ngx_module_incs=
    ngx_module_deps=
    ngx_module_srcs="$ngx_addon_dir/ngx_http_auth_ldap_module.c"
    ngx_module_libs="$LDAP_REQUIRED_LIBS"
    . auto/module
else
    HTTP_MODULES="$HTTP_MODULES ngx_http_auth_ldap_module"
    NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_auth_ldap_module.c"
    CORE_LIBS="$CORE_LIBS $LDAP_REQUIRED_LIBS"
fi

I've based this on the instructions Nginx lists on their website, and the auth_pam module's source.

phlegx commented 8 years ago

@CHERTS and the others, is there any progress here, if I may ask? It would be totally awesome to see this module converted into a dynamic one!