--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -10,0 +70,1 @@ + int set_env_on_authz; /* If true, will set environment vars on authorization */ @@ -292,0 +293,1 @@ + sec->set_env_on_authz = 0; @@ -606,0 +608,17 @@ + /* add environment variables if AuthLDAPAuthzSetEnvironment is set to on */ + if (sec->attributes && vals && sec->set_env_on_authz) { + apr_table_t *e = r->subprocess_env; + int i = 0; + while (sec->attributes[i]) { + char *str = apr_pstrcat(r->pool, AUTHN_PREFIX, sec->attributes[i], NULL); + int j = sizeof(AUTHN_PREFIX)-1; /* string length of "AUTHENTICATE_", excluding the trailing NIL */ + while (str[j]) { + str[j] = apr_toupper(str[j]); + j++; + } + apr_table_setn(e, str, vals[i]); + i++; + } + } @@ -1104,0 +1123,6 @@ + AP_INIT_TAKE1("AuthLDAPAuthzSetEnvironment", ap_set_flag_slot, + (void *)APR_OFFSETOF(authn_ldap_config_t, set_env_on_authz), OR_AUTHCFG, + "If set to 'on', auth_ldap will set the AUTHENTICATE_ variables even if" + "only doing authorization." + "Defaults to off."),