remove quick and dirty hack to rebind to the search user. it has been implemented correctly already.

main
Patrik Weiskircher 10 years ago
parent 20f279f0f9
commit a471062903
  1. 10
      ngx_http_auth_ldap_module.c

@ -1967,16 +1967,6 @@ ngx_http_auth_ldap_check_bind(ngx_http_request_t *r, ngx_http_auth_ldap_ctx_t *c
ctx->c->state = STATE_BINDING; ctx->c->state = STATE_BINDING;
ctx->iteration++; ctx->iteration++;
// added by prune - 20140227
// we have to rebind THIS SAME connection as admin user or the next search could be
// made as non privileged user
// see https://github.com/kvspb/nginx-auth-ldap/issues/36
// this is quick and dirty patch
int rebind_msgid;
cred.bv_val = (char *) ctx->server->bind_dn_passwd.data;
cred.bv_len = ctx->server->bind_dn_passwd.len;
rc = ldap_sasl_bind(ctx->c->ld,(const char *) ctx->server->bind_dn.data, LDAP_SASL_SIMPLE, &cred, NULL, NULL, &rebind_msgid);
return NGX_AGAIN; return NGX_AGAIN;
} }

Loading…
Cancel
Save