-*- coding: utf-8 -*-
Changes with Apache 2.2.6
+ *) mod_authnz_ldap: Don't return HTTP_UNAUTHORIZED during authorization when
+ LDAP authentication is configured but we haven't seen any
+ 'Require ldap-*' directives, allowing authorization to be passed to lower
+ level modules (e.g. Require valid-user)
+ PR 43281 [Eric Covener]
+
*) mod_proxy: don't URLencode tilde in path component
PR 38448 [Stijn Hoop <stijn sandcat.nl>]
Trunk version of patch works
+1: rpluem, jim, niq
- * mod_authnz_ldap: When no Require ldap-* are present, return DECLINED in the
- auth_checker hook instead of HTTP_UNAUTHORIZED.
- This makes authnz_ldap behave in the same fashion as authz_user, authz_dbm,
- authz_owner, and authz_groupfile.
- Trunk version of patch
- This change is not required for trunk because of the authz-provider model
- 2.2.x version of patch:
- http://people.apache.org/~covener/2.2.x-authnz_ldap-decline.diff
- +1: covener, niq, bnicholes
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
const char *t;
char *w, *value;
int method_restricted = 0;
+ int required_ldap = 0;
char filtbuf[FILTER_LENGTH];
const char *dn = NULL;
w = ap_getword_white(r->pool, &t);
if (strcmp(w, "ldap-user") == 0) {
+ required_ldap = 1;
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
}
}
else if (strcmp(w, "ldap-dn") == 0) {
+ required_ldap = 1;
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
else if (strcmp(w, "ldap-group") == 0) {
struct mod_auth_ldap_groupattr_entry_t *ent = (struct mod_auth_ldap_groupattr_entry_t *) sec->groupattr->elts;
int i;
+ required_ldap = 1;
if (sec->group_attrib_is_dn) {
if (req->dn == NULL || strlen(req->dn) == 0) {
}
}
else if (strcmp(w, "ldap-attribute") == 0) {
+ required_ldap = 1;
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
}
}
else if (strcmp(w, "ldap-filter") == 0) {
+ required_ldap = 1;
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
return OK;
}
- if (!sec->auth_authoritative) {
+ if (!required_ldap || !sec->auth_authoritative) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: declining to authorise", getpid());
return DECLINED;