[Fedora-directory-commits] mod_nss nss_engine_kernel.c, 1.5, 1.6 mod_nss.c, 1.13, 1.14 mod_nss.h, 1.13, 1.14

Robert Crittenden (rcritten) fedora-directory-commits at redhat.com
Wed Aug 9 19:17:59 UTC 2006


Author: rcritten

Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29483

Modified Files:
	nss_engine_kernel.c mod_nss.c mod_nss.h 
Log Message:
Merge in changes from http://svn.apache.org/viewvc?view=rev&revision=161958

The issue was that mod_ssl wasn't always picking up ssl-unclean-shutdown
settings. This isn't an issue for mod_nss since it doesn't support
separate shutdown modes, but this does simplify the code a bit.

* mod_nss.h: Remove nss_hook_Translate.

* nss_engine_kernel.c
     (nss_hook_ReadReq): Merge in nss_hook_Translate.
     (nss_hook_Translate): Remove.

* mod_nss.c (nss_register_hooks): Ensure that _ReadReq
  hook runs after mod_setenvif.c; don't register translate_name hook.



Index: nss_engine_kernel.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_kernel.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nss_engine_kernel.c	7 Apr 2006 20:17:12 -0000	1.5
+++ nss_engine_kernel.c	9 Aug 2006 19:17:56 -0000	1.6
@@ -23,6 +23,7 @@
 int nss_hook_ReadReq(request_rec *r)
 {
     SSLConnRec *sslconn = myConnConfig(r->connection);
+    PRFileDesc *ssl = sslconn ? sslconn->ssl : NULL;
 
     if (!sslconn) {
         return DECLINED;
@@ -62,19 +63,13 @@
         return HTTP_BAD_REQUEST;
     }
 
-    return DECLINED;
-}
-
-/* 
- *  URL Translation Handler
- */
-int nss_hook_Translate(request_rec *r)
-{
-    SSLConnRec *sslconn = myConnConfig(r->connection);
- 
-    if (!(sslconn && sslconn->ssl)) {
+    /* Get the SSL connection structure and perform the
+     * delayed interlinking from SSL back to request_rec
+     */
+    if (!ssl) {
         return DECLINED; 
     }
+
     /*
      * Log information about incoming HTTPS requests
      */
@@ -92,7 +87,6 @@
     return DECLINED;
 }
 
-
 /*
  *  Access Handler
  */


Index: mod_nss.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_nss.c	3 Aug 2006 13:29:05 -0000	1.13
+++ mod_nss.c	9 Aug 2006 19:17:56 -0000	1.14
@@ -395,6 +395,10 @@
 
 static void nss_register_hooks(apr_pool_t *p)
 {
+    /* nss_hook_ReadReq needs to use the BrowserMatch settings so must
+     * run after mod_setenvif's post_read_request hook. */ 
+    static const char *pre_prr[] = { "mod_setenvif.c", NULL };
+
     nss_io_filter_register(p);
 
     ap_hook_pre_connection(nss_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
@@ -407,12 +411,11 @@
     ap_hook_default_port  (nss_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_pre_config    (nss_hook_pre_config,    NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init    (nss_init_Child,         NULL,NULL, APR_HOOK_MIDDLE);
-    ap_hook_translate_name(nss_hook_Translate,     NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_check_user_id (nss_hook_UserCheck,     NULL,NULL, APR_HOOK_FIRST);
     ap_hook_fixups        (nss_hook_Fixup,         NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_access_checker(nss_hook_Access,        NULL,NULL, APR_HOOK_MIDDLE);
     ap_hook_auth_checker  (nss_hook_Auth,          NULL,NULL, APR_HOOK_MIDDLE);
-    ap_hook_post_read_request(nss_hook_ReadReq,    NULL,NULL, APR_HOOK_MIDDLE);
+    ap_hook_post_read_request(nss_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
 
     nss_var_register();
 


Index: mod_nss.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_nss.h	3 Aug 2006 13:29:05 -0000	1.13
+++ mod_nss.h	9 Aug 2006 19:17:56 -0000	1.14
@@ -403,7 +403,6 @@
 int nss_parse_ciphers(server_rec *s, char *ciphers, PRBool cipher_list[ciphernum]);
 
 /* Apache API hooks */
-int nss_hook_Translate(request_rec *r);
 int nss_hook_UserCheck(request_rec *r);
 int nss_hook_Fixup(request_rec *r);
 int nss_hook_Access(request_rec *r);




More information about the Fedora-directory-commits mailing list