~clint-fewbar/ubuntu/maverick/apache2/maverick-passphrase-plymouth-change

« back to all changes in this revision

Viewing changes to server/listen.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch, Stefan Fritsch, Peter Samuelson
  • Date: 2007-07-01 19:57:51 UTC
  • mfrom: (0.8.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070701195751-kcags6dpm5up3li5
Tags: 2.2.4-1
[ Stefan Fritsch ]
* Urgency medium for security fix
* Fix CVE-2007-1863: DoS in mod_cache
* New upstream version (Closes: #427050)
  - Fixes "proxy: error reading status line from remote server"
    (Closes: #410331)
* Fix CVE-2007-1862: mod_mem_cache DoS (introduced in 2.2.4)
* Change logrotate script to use reload instead of restart.
  (Closes: #298689)
* chmod o-rx /var/log/apache2 (Closes: #291841)
* chmod o-x suexec (Closes: #431048)
* Update patch for truncated mod_cgi 500 responses from upstream SVN
  (Closes: #412580)
* Don't use AddDefaultCharset for our docs (Closes: #414429)
* fix options syntax in sites-available/default (Closes: #419539)
* Move conf.d include to the end of apache2.conf (Closes: #305933)
* Remove log, cache, and lock files on purge (Closes: #428887)
* Ship /usr/lib/cgi-bin (Closes: #415698)
* Add note to README.Debian how to read docs (Closes: #350822)
* Document pid file name (Closes: #350286)
* Update Standards-Version (no changes needed)
* Fix some lintian warnings, add some overrides
* Start apache when doing a "restart" even if it was not running
  (Closes: #384682)
* reload config in apache2-doc postinst (Closes: #289289)
* don't fail in prerm if apache is not running (Closes: #418536)
* Suggest apache2-doc and www-browser (Closes: #399056)
* Make init script always display a warning if NO_START=1 since
  VERBOSE=yes is not the default anymore (Closes: #430116)
* Replace apache2(8) man page with a more current version
* Add httxt2dbm(8) man page
* Show -X option in help message (Closes: #391817)
* remove sick-hack-to-update-modules
* don't depend on procps on hurd (Closes: #431125)

[ Peter Samuelson ]
* Add shlibs:Depends to apache2.2-common.

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
    int num_open;
362
362
    const char *userdata_key = "ap_open_listeners";
363
363
    void *data;
 
364
#if AP_NONBLOCK_WHEN_MULTI_LISTEN
 
365
    int use_nonblock;
 
366
#endif
364
367
 
365
368
    /* Don't allocate a default listener.  If we need to listen to a
366
369
     * port, then the user needs to have a Listen directive in their
415
418
 
416
419
                /* Remove the current listener from the list */
417
420
                previous->next = lr->next;
 
421
                lr = previous; /* maintain current value of previous after
 
422
                                * post-loop expression is evaluated
 
423
                                */
418
424
                continue;
419
425
            }
420
426
#endif
473
479
     * is already forgotten about by the time we call accept, we won't
474
480
     * be hung until another connection arrives on that port
475
481
     */
476
 
    if (ap_listeners && ap_listeners->next) {
477
 
        for (lr = ap_listeners; lr; lr = lr->next) {
478
 
            apr_status_t status;
 
482
    use_nonblock = (ap_listeners && ap_listeners->next);
 
483
    for (lr = ap_listeners; lr; lr = lr->next) {
 
484
        apr_status_t status;
479
485
 
480
 
            status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, 1);
481
 
            if (status != APR_SUCCESS) {
482
 
                ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
483
 
                              "unable to make listening socket non-blocking");
484
 
                return -1;
485
 
            }
 
486
        status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, use_nonblock);
 
487
        if (status != APR_SUCCESS) {
 
488
            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
 
489
                          "unable to control socket non-blocking status");
 
490
            return -1;
486
491
        }
487
492
    }
488
493
#endif /* AP_NONBLOCK_WHEN_MULTI_LISTEN */