Changeset 1463 for trunk/server/common/oursrc/httpdmods
- Timestamp:
- Feb 12, 2010, 2:47:59 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/httpdmods/mod_vhost_ldap.c
r688 r1463 96 96 { "apacheServerName", "apacheDocumentRoot", "apacheScriptAlias", "apacheSuexecUid", "apacheSuexecGid", "apacheServerAdmin", 0 }; 97 97 98 static int total_modules; 99 98 100 #if (APR_MAJOR_VERSION >= 1) 99 101 static APR_OPTIONAL_FN_TYPE(uldap_connection_close) *util_ldap_connection_close; … … 119 121 static int mod_vhost_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) 120 122 { 123 module **m; 124 125 /* Stolen from modules/generators/mod_cgid.c */ 126 total_modules = 0; 127 for (m = ap_preloaded_modules; *m != NULL; m++) 128 total_modules++; 129 121 130 /* make sure that mod_ldap (util_ldap) is loaded */ 122 131 if (ap_find_linked_module("util_ldap.c") == NULL) { … … 423 432 static int mod_vhost_ldap_translate_name(request_rec *r) 424 433 { 425 request_rec *top = (r->main)?r->main:r;426 434 mod_vhost_ldap_request_t *reqc; 427 435 apr_table_t *e; … … 621 629 } 622 630 623 top->server->server_hostname = apr_pstrdup (top->pool, reqc->name); 631 if ((r->server = apr_pmemdup(r->pool, r->server, 632 sizeof(*r->server))) == NULL) 633 return HTTP_INTERNAL_SERVER_ERROR; 634 635 r->server->server_hostname = reqc->name; 624 636 625 637 if (reqc->admin) { 626 top->server->server_admin = apr_pstrdup (top->pool, reqc->admin);638 r->server->server_admin = reqc->admin; 627 639 } 628 640 629 641 // set environment variables 630 e = top->subprocess_env;642 e = r->subprocess_env; 631 643 apr_table_addn (e, "SERVER_ROOT", reqc->docroot); 632 644 633 core->ap_document_root = apr_pstrdup(top->pool, reqc->docroot); 645 if ((r->server->module_config = 646 apr_pmemdup(r->pool, r->server->module_config, 647 sizeof(void *) * 648 (total_modules + DYNAMIC_MODULE_LIMIT))) == NULL) 649 return HTTP_INTERNAL_SERVER_ERROR; 650 651 if ((core = apr_pmemdup(r->pool, core, sizeof(*core))) == NULL) 652 return HTTP_INTERNAL_SERVER_ERROR; 653 ap_set_module_config(r->server->module_config, &core_module, core); 654 655 core->ap_document_root = reqc->docroot; 634 656 635 657 ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r,
Note: See TracChangeset
for help on using the changeset viewer.