From: Ondřej Surý Date: Fri, 9 Sep 2005 07:49:36 +0000 (+0000) Subject: mod-vhost-ldap: 0.2.5 release X-Git-Tag: upstream/0.2.5 X-Git-Url: http://andersk.mit.edu/gitweb/mod-vhost-ldap.git/commitdiff_plain/6f705808b0bf41e82f31892cb70fba22dba13969 mod-vhost-ldap: 0.2.5 release git-svn-id: svn://svn.debian.org/svn/modvhostldap/mod-vhost-ldap@23 4dd36cbf-e3fd-0310-983d-db0e06859cf4 --- diff --git a/ChangeLog b/ChangeLog index 58a2302..712c2e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-09-09 Ondřej Surý + * mod_vhost.ldap.c: implement workaround for fault mod_ldap caching + http://issues.apache.org/bugzilla/show_bug.cgi?id=33901 + * mod_vhost_ldap.c: change r->parsed_uri.path to more simpler r->uri + * vhost_ldap.conf: add note about mod_ldap module requirement + * VERSION: 0.2.5 release + 2005-08-30 Ondřej Surý * mod_vhost_ldap.c: use VERSION file as authoritative source for VERSION number * mod_vhost_ldap.c: MIN_UID/MIN_GID lowered to 100/100 diff --git a/VERSION b/VERSION index abd4105..3a4036f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.4 +0.2.5 diff --git a/mod_vhost_ldap.c b/mod_vhost_ldap.c index a66e069..0695d82 100644 --- a/mod_vhost_ldap.c +++ b/mod_vhost_ldap.c @@ -84,7 +84,7 @@ typedef struct mod_vhost_ldap_request_t { } mod_vhost_ldap_request_t; char *attributes[] = - { "apacheServerName", "apacheServerAdmin", "apacheDocumentRoot", "apacheScriptAlias", "apacheSuexecUid", "apacheSuexecGid", 0 }; + { "apacheServerName", "apacheDocumentRoot", "apacheScriptAlias", "apacheSuexecUid", "apacheSuexecGid", "apacheServerAdmin", 0 }; static int mod_vhost_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { @@ -354,7 +354,7 @@ start_over: } ap_log_rerror (APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, - "[mod_vhost_ldap.c]: translating %s", r->parsed_uri.path); + "[mod_vhost_ldap.c]: translating %s", r->uri); apr_snprintf(filtbuf, FILTER_LENGTH, "(&(%s)(|(apacheServerName=%s)(apacheServerAlias=%s)))", cfg->filter, r->hostname, r->hostname); @@ -375,7 +375,7 @@ start_over: ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, r, "[mod_vhost_ldap.c] translate: " "translate failed; URI %s [%s][%s]", - r->parsed_uri.path, ldc->reason, ldap_err2string(result)); + r->uri, ldc->reason, ldap_err2string(result)); return DECLINED; } @@ -409,6 +409,16 @@ start_over: } } + ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, + "[mod_vhost_ldap.c]: loaded from ldap: " + "apacheServerName: %s, " + "apacheServerAdmin: %s, " + "apacheDocumentRoot: %s, " + "apacheScriptAlias: %s, " + "apacheSuexecUid: %s, " + "apacheSuexecGid: %s" + , req->name, req->admin, req->docroot, req->cgiroot, req->uid, req->gid); + if ((req->name == NULL)||(req->docroot == NULL)) { ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r, "[mod_vhost_ldap.c] translate: " @@ -419,20 +429,19 @@ start_over: cgi = NULL; if (req->cgiroot) { - cgi = strstr(r->parsed_uri.path, "cgi-bin/"); - if (cgi && (cgi != r->uri + strspn(r->parsed_uri.path, "/"))) { + cgi = strstr(r->uri, "cgi-bin/"); + if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) { cgi = NULL; } } - if (cgi) { - r->filename = - apr_pstrcat (r->pool, req->cgiroot, cgi + strlen("cgi-bin"), NULL); + r->filename = apr_pstrcat (r->pool, req->cgiroot, cgi + strlen("cgi-bin"), NULL); r->handler = "cgi-script"; apr_table_setn(r->notes, "alias-forced-type", r->handler); + } else if (r->uri[0] == '/') { + r->filename = apr_pstrcat (r->pool, req->docroot, r->uri, NULL); } else { - r->filename = - apr_pstrcat (r->pool, req->docroot, r->parsed_uri.path, NULL); + return DECLINED; } r->server->server_hostname = apr_pstrdup (r->pool, req->name); diff --git a/vhost_ldap.conf b/vhost_ldap.conf index 42889ab..36c73e9 100644 --- a/vhost_ldap.conf +++ b/vhost_ldap.conf @@ -1,15 +1,17 @@ # -# mod_cfg_ldap allows you to keep your virtual host configuration +# mod_vhost_ldap allows you to keep your virtual host configuration # in an LDAP directory and update it in nearly realtime. # -### you have to configure and enable it first ### +### NOTE ### +### mod_vhost_ldap depends on mod_ldap ### +### you have to enable mod_ldap as well ### -LoadModule cfg_ldap_module modules/mod_cfg_ldap.so +LoadModule vhost_ldap_module modules/mod_vhost_ldap.so - + VhostLDAPEnabled on VhostLDAPUrl "ldap://127.0.0.1/ou=vhosts,ou=web,dc=localhost" VhostLdapBindDN "cn=admin,dc=localhost" - VhostLDAPBindPassword "" + VhostLDAPBindPassword "changeme"