~ubuntu-branches/ubuntu/saucy/haproxy/saucy

« back to all changes in this revision

Viewing changes to .pc/CVE-2012-2942.patch/include/types/global.h

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat, Apollon Oikonomopoulos, Vincent Bernat, Prach Pongpanich
  • Date: 2013-05-06 20:02:14 UTC
  • mfrom: (1.1.13) (14.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130506200214-21m58va04oazl7ot
Tags: 1.4.23-1
[ Apollon Oikonomopoulos ]
* New upstream version (Closes: #643650, #678953)
   + This fixes CVE-2012-2942 (Closes: #674447)
   + This fixes CVE-2013-1912 (Closes: #704611)
* Ship vim addon as vim-haproxy (Closes: #702893)
* Check for the configuration file after sourcing /etc/default/haproxy
  (Closes: #641762)
* Use /dev/log for logging by default (Closes: #649085)

[ Vincent Bernat ]
* debian/control:
   + add Vcs-* fields
   + switch maintenance to Debian HAProxy team. (Closes: #706890)
   + drop dependency to quilt: 3.0 (quilt) format is in use.
* debian/rules:
   + don't explicitly call dh_installchangelog.
   + use dh_installdirs to install directories.
   + use dh_install to install error and configuration files.
   + switch to `linux2628` Makefile target for Linux.
* debian/postrm:
   + remove haproxy user and group on purge.
* Ship a more minimal haproxy.cfg file: no `listen` blocks but `global`
  and `defaults` block with appropriate configuration to use chroot and
  logging in the expected way.

[ Prach Pongpanich ]
* debian/copyright:
   + add missing copyright holders
   + update years of copyright
* debian/rules:
   + build with -Wl,--as-needed to get rid of unnecessary depends
* Remove useless files in debian/haproxy.{docs,examples}
* Update debian/watch file, thanks to Bart Martens

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * include/types/global.h
3
 
 * Global variables.
4
 
 *
5
 
 * Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu
6
 
 *
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Lesser General Public
9
 
 * License as published by the Free Software Foundation, version 2.1
10
 
 * exclusively.
11
 
 *
12
 
 * This library is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * Lesser General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU Lesser General Public
18
 
 * License along with this library; if not, write to the Free Software
19
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20
 
 */
21
 
 
22
 
#ifndef _TYPES_GLOBAL_H
23
 
#define _TYPES_GLOBAL_H
24
 
 
25
 
#include <netinet/in.h>
26
 
 
27
 
#include <common/config.h>
28
 
#include <types/log.h>
29
 
#include <types/protocols.h>
30
 
#include <types/proxy.h>
31
 
#include <types/task.h>
32
 
 
33
 
/* modes of operation (global.mode) */
34
 
#define MODE_DEBUG      0x01
35
 
#define MODE_DAEMON     0x02
36
 
#define MODE_QUIET      0x04
37
 
#define MODE_CHECK      0x08
38
 
#define MODE_VERBOSE    0x10
39
 
#define MODE_STARTING   0x20
40
 
#define MODE_FOREGROUND 0x40
41
 
 
42
 
/* list of last checks to perform, depending on config options */
43
 
#define LSTCHK_CAP_BIND 0x00000001      /* check that we can bind to any port */
44
 
#define LSTCHK_CTTPROXY 0x00000002      /* check that tproxy is enabled */
45
 
#define LSTCHK_NETADM   0x00000004      /* check that we have CAP_NET_ADMIN */
46
 
 
47
 
/* Global tuning options */
48
 
/* available polling mechanisms */
49
 
#define GTUNE_USE_SELECT         (1<<0)
50
 
#define GTUNE_USE_POLL           (1<<1)
51
 
#define GTUNE_USE_EPOLL          (1<<2)
52
 
#define GTUNE_USE_KQUEUE         (1<<3)
53
 
#define GTUNE_USE_SEPOLL         (1<<4)
54
 
/* platform-specific options */
55
 
#define GTUNE_USE_SPLICE         (1<<5)
56
 
 
57
 
/* Access level for a stats socket */
58
 
#define ACCESS_LVL_NONE     0
59
 
#define ACCESS_LVL_USER     1
60
 
#define ACCESS_LVL_OPER     2
61
 
#define ACCESS_LVL_ADMIN    3
62
 
 
63
 
/* FIXME : this will have to be redefined correctly */
64
 
struct global {
65
 
        int uid;
66
 
        int gid;
67
 
        int nbproc;
68
 
        int maxconn;
69
 
        int maxpipes;           /* max # of pipes */
70
 
        int maxsock;            /* max # of sockets */
71
 
        int rlimit_nofile;      /* default ulimit-n value : 0=unset */
72
 
        int rlimit_memmax;      /* default ulimit-d in megs value : 0=unset */
73
 
        int mode;
74
 
        int last_checks;
75
 
        int spread_checks;
76
 
        char *chroot;
77
 
        char *pidfile;
78
 
        char *node, *desc;              /* node name & description */
79
 
        char *log_tag;                  /* name for syslog */
80
 
        int logfac1, logfac2;
81
 
        int loglev1, loglev2;
82
 
        int minlvl1, minlvl2;
83
 
        struct logsrv logsrv1, logsrv2;
84
 
        char *log_send_hostname;   /* set hostname in syslog header */
85
 
        struct {
86
 
                int maxpollevents; /* max number of poll events at once */
87
 
                int maxaccept;     /* max number of consecutive accept() */
88
 
                int options;       /* various tuning options */
89
 
                int recv_enough;   /* how many input bytes at once are "enough" */
90
 
                int bufsize;       /* buffer size in bytes, defaults to BUFSIZE */
91
 
                int maxrewrite;    /* buffer max rewrite size in bytes, defaults to MAXREWRITE */
92
 
                int client_sndbuf; /* set client sndbuf to this value if not null */
93
 
                int client_rcvbuf; /* set client rcvbuf to this value if not null */
94
 
                int server_sndbuf; /* set server sndbuf to this value if not null */
95
 
                int server_rcvbuf; /* set server rcvbuf to this value if not null */
96
 
                int chksize;       /* check buffer size in bytes, defaults to BUFSIZE */
97
 
        } tune;
98
 
        struct listener stats_sock; /* unix socket listener for statistics */
99
 
        struct proxy *stats_fe;     /* the frontend holding the stats settings */
100
 
};
101
 
 
102
 
extern struct global global;
103
 
extern int  pid;                /* current process id */
104
 
extern int  relative_pid;       /* process id starting at 1 */
105
 
extern int  actconn;            /* # of active sessions */
106
 
extern int listeners;
107
 
extern char trash[BUFSIZE];
108
 
extern char *swap_buffer;
109
 
extern int nb_oldpids;          /* contains the number of old pids found */
110
 
extern const int zero;
111
 
extern const int one;
112
 
extern const struct linger nolinger;
113
 
extern int stopping;    /* non zero means stopping in progress */
114
 
extern char hostname[MAX_HOSTNAME_LEN];
115
 
 
116
 
#endif /* _TYPES_GLOBAL_H */
117
 
 
118
 
/*
119
 
 * Local variables:
120
 
 *  c-indent-level: 8
121
 
 *  c-basic-offset: 8
122
 
 * End:
123
 
 */