Changeset 421ef1c in mod_gnutls for src


Ignore:
Timestamp:
Jan 29, 2013, 8:05:42 PM (7 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
cb5188f
Parents:
929d313
git-author:
Daniel Kahn Gillmor <dkg@…> (01/28/13 23:10:41)
git-committer:
Daniel Kahn Gillmor <dkg@…> (01/29/13 20:05:42)
Message:

deal responsibly with grave failures in pre_config hook

If a pre_config hook returns anything other than OK or DECLINED,
pre-configuration will fail and the server will clean itself up
properly.

I'm using DONE here as a third option so that fatal errors in module
initialization will be caught appropriately. It is a bad idea to just
exit(-1) from within a shared module -- better to let apache decide
how to clean up properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r929d313 r421ef1c  
    7878                ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, plog, "gnutls_check_version() failed. Required: "
    7979                                        "gnutls-%s Found: gnutls-%s\n", LIBGNUTLS_VERSION, gnutls_check_version(NULL));
    80                 exit(-1);
     80        return DONE;
    8181    }
    8282
     
    8585    if (ret < 0) {
    8686                ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, plog, "gnutls_global_init: %s\n", gnutls_strerror(ret));
    87                 exit(-1);
     87                return DONE;
    8888    }
    8989
     
    9292    if (ret < 0) {
    9393                ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, plog, "gnutls_session_ticket_key_generate: %s\n", gnutls_strerror(ret));
    94                 exit(-1);
     94                return DONE;
    9595    }
    9696
    9797        /* Register a pool clean-up function */
    98     apr_pool_cleanup_register(pconf, NULL, mgs_cleanup_pre_config, apr_pool_cleanup_null);\
     98    apr_pool_cleanup_register(pconf, NULL, mgs_cleanup_pre_config, apr_pool_cleanup_null);
    9999
    100100    return OK;
Note: See TracChangeset for help on using the changeset viewer.