Merge branch 'master' of github.com:kvspb/nginx-auth-ldap

main
Victor Hahn 9 years ago
commit ac3e805216
  1. 15
      config
  2. 7
      ngx_http_auth_ldap_module.c

@ -1,11 +1,20 @@
ngx_addon_name=ngx_http_auth_ldap_module ngx_addon_name=ngx_http_auth_ldap_module
HTTP_MODULES="$HTTP_MODULES ngx_http_auth_ldap_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_auth_ldap_module.c" if test -n "$ngx_module_link"; then
ngx_module_type=HTTP
ngx_module_name=ngx_http_auth_ldap_module
ngx_module_srcs="$ngx_addon_dir/ngx_http_auth_ldap_module.c"
. 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"
fi
CORE_LIBS="$CORE_LIBS -lldap" CORE_LIBS="$CORE_LIBS -lldap"
case "$NGX_PLATFORM" in case "$NGX_PLATFORM" in
FreeBSD:*|Linux:*|SunOS:*) Darwin:*|FreeBSD:*|Linux:*|SunOS:*)
CORE_LIBS="$CORE_LIBS -llber" CORE_LIBS="$CORE_LIBS -llber"
;; ;;
esac esac

@ -621,7 +621,7 @@ ngx_http_auth_ldap_parse_require(ngx_conf_t *cf, ngx_http_auth_ldap_server_t *se
ngx_http_compile_complex_value_t ccv; ngx_http_compile_complex_value_t ccv;
value = cf->args->elts; value = cf->args->elts;
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "http_auth_ldap: parse_require"); ngx_conf_log_error(NGX_LOG_NOTICE, cf, 0, "http_auth_ldap: parse_require");
if (ngx_strcmp(value[1].data, "valid_user") == 0) { if (ngx_strcmp(value[1].data, "valid_user") == 0) {
server->require_valid_user = 1; server->require_valid_user = 1;
@ -641,7 +641,7 @@ ngx_http_auth_ldap_parse_require(ngx_conf_t *cf, ngx_http_auth_ldap_server_t *se
} }
target = ngx_array_push(server->require_user); target = ngx_array_push(server->require_user);
} else if (ngx_strcmp(value[1].data, "group") == 0) { } else if (ngx_strcmp(value[1].data, "group") == 0) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "http_auth_ldap: Setting group"); ngx_conf_log_error(NGX_LOG_NOTICE, cf, 0, "http_auth_ldap: Setting group");
if (server->require_group == NULL) { if (server->require_group == NULL) {
server->require_group = ngx_array_create(cf->pool, 4, sizeof(ngx_http_complex_value_t)); server->require_group = ngx_array_create(cf->pool, 4, sizeof(ngx_http_complex_value_t));
if (server->require_group == NULL) { if (server->require_group == NULL) {
@ -676,7 +676,7 @@ ngx_http_auth_ldap_parse_satisfy(ngx_conf_t *cf, ngx_http_auth_ldap_server_t *se
value = cf->args->elts; value = cf->args->elts;
if (ngx_strcmp(value[1].data, "all") == 0) { if (ngx_strcmp(value[1].data, "all") == 0) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "http_auth_ldap: Setting satisfy all"); ngx_conf_log_error(NGX_LOG_NOTICE, cf, 0, "http_auth_ldap: Setting satisfy all");
server->satisfy_all = 1; server->satisfy_all = 1;
return NGX_CONF_OK; return NGX_CONF_OK;
} }
@ -836,6 +836,7 @@ ngx_http_auth_ldap_init_cache(ngx_cycle_t *cycle)
} }
want = (conf->cache_size + 7) / 8; want = (conf->cache_size + 7) / 8;
count = 0;
for (i = 0; i < sizeof(primes)/sizeof(primes[0]); i++) { for (i = 0; i < sizeof(primes)/sizeof(primes[0]); i++) {
count = primes[i]; count = primes[i];
if (count >= want) { if (count >= want) {

Loading…
Cancel
Save