~ubuntu-branches/ubuntu/lucid/lighttpd/lucid-security

« back to all changes in this revision

Viewing changes to src/mod_trigger_b4_dl.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-06-06 15:53:28 UTC
  • mfrom: (6.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090606155328-6pr6j08kk4rdf8rz
Tags: 1.4.22-1ubuntu1
* Merge from debian unstable (LP: #384367), remaining changes:
  - debian/control: Depend on lsb (>= 3.2-14), which has the status_of_proc() 
    function; libgamin-dev rather than libfam-dev to fix startup warning.
  - debian/init.d: Add the 'status' action, clean environment; Check syntax 
    during start/reload/restart/force-reload.
  - debian/rules: set DEB_UPDATE_RCD_PARAMS to "defaults 91 09" to not start 
    lighty before apache2 but in the same runlevel with the same priority;
    Make sure that upgrades succeed, even if we can't restart lighttpd.
  - debian/index.html: s/Debian/Ubuntu/g branding on the default page.
  - Added a UFW profile set: 
    + debian/lighttpd.dirs: added etc/ufw/applications.d
    + debian/rules: install the ufw profile.
    + debian/control: Suggests on ufw.
* debian/patches/fix-conf-doc.patch: Update headers to match package version
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <ctype.h>
2
2
#include <stdlib.h>
 
3
#include <fcntl.h>
3
4
#include <string.h>
4
5
 
5
6
#include "base.h"
180
181
                                                "gdbm-open failed");
181
182
                                return HANDLER_ERROR;
182
183
                        }
 
184
#ifdef FD_CLOEXEC
 
185
                        fcntl(gdbm_fdesc(s->db), F_SETFD, FD_CLOEXEC);
 
186
#endif
183
187
                }
184
188
#endif
185
189
#if defined(HAVE_PCRE_H)
316
320
# define N 10
317
321
        int ovec[N * 3];
318
322
 
 
323
        if (con->mode != DIRECT) return HANDLER_GO_ON;
 
324
 
319
325
        if (con->uri.path->used == 0) return HANDLER_GO_ON;
320
326
 
321
327
        mod_trigger_b4_dl_patch_connection(srv, con, p);
425
431
                                /* not found, redirect */
426
432
 
427
433
                                response_header_insert(srv, con, CONST_STR_LEN("Location"), CONST_BUF_LEN(p->conf.deny_url));
428
 
 
429
434
                                con->http_status = 307;
 
435
                                con->file_finished = 1;
430
436
 
431
437
                                return HANDLER_FINISHED;
432
438
                        }
440
446
 
441
447
                                response_header_insert(srv, con, CONST_STR_LEN("Location"), CONST_BUF_LEN(p->conf.deny_url));
442
448
                                con->http_status = 307;
 
449
                                con->file_finished = 1;
443
450
 
444
451
                                if (p->conf.db) {
445
452
                                        if (0 != gdbm_delete(p->conf.db, key)) {
490
497
                                response_header_insert(srv, con, CONST_STR_LEN("Location"), CONST_BUF_LEN(p->conf.deny_url));
491
498
 
492
499
                                con->http_status = 307;
 
500
                                con->file_finished = 1;
493
501
 
494
502
                                return HANDLER_FINISHED;
495
503
                        }