~ubuntu-branches/debian/sid/ircd-hybrid/sid

« back to all changes in this revision

Viewing changes to include/conf.h

  • Committer: Package Import Robot
  • Author(s): Dominic Hargreaves
  • Date: 2015-04-19 15:53:09 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20150419155309-06y59x2at2ax5ou3
Tags: 1:8.2.7+dfsg.1-1
* Remove Suggests: hybserv since it doesn't really work with
  ircd-hybrid 8 and above
* New upstream release
  - update debian/copyright with minor changes
  - update config files from new reference.conf
  - fixes DoS from localhost clients (Closes: #782859)
  - supports SSL certficate chaining (Closes: #769741)
* Debconf configuration script no longer ignores the result of
  upgrade questions (Closes: #779082)
* Don't display upgrade warnings on new installs (Closes: #782883)
* Add NEWS item about updated configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3
3
 *
4
 
 *  Copyright (c) 1997-2014 ircd-hybrid development team
 
4
 *  Copyright (c) 1997-2015 ircd-hybrid development team
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
 
22
22
/*! \file conf.h
23
23
 * \brief A header for the configuration functions.
24
 
 * \version $Id: conf.h 4564 2014-08-24 10:24:47Z michael $
 
24
 * \version $Id: conf.h 5775 2015-04-04 17:31:06Z michael $
25
25
 */
26
26
 
27
27
#ifndef INCLUDED_s_conf_h
34
34
 
35
35
#define CONF_NOREASON "<No reason supplied>"
36
36
 
37
 
#define IsConfOperator(x)       ((x)->type == CONF_OPER)
38
37
#define IsConfKill(x)           ((x)->type == CONF_KLINE)
39
38
#define IsConfClient(x)         ((x)->type == CONF_CLIENT)
40
39
#define IsConfGline(x)          ((x)->type == CONF_GLINE)
41
40
 
42
41
/* MaskItem->flags */
43
 
#define CONF_FLAGS_DO_IDENTD            0x00000001U
44
 
#define CONF_FLAGS_NO_TILDE             0x00000004U
45
 
#define CONF_FLAGS_NEED_IDENTD          0x00000008U
46
 
#define CONF_FLAGS_EXEMPTKLINE          0x00000010U
47
 
#define CONF_FLAGS_NOLIMIT              0x00000020U
48
 
#define CONF_FLAGS_SPOOF_IP             0x00000040U
49
 
#define CONF_FLAGS_SPOOF_NOTICE         0x00000080U
50
 
#define CONF_FLAGS_REDIR                0x00000100U
51
 
#define CONF_FLAGS_EXEMPTGLINE          0x00000200U
52
 
#define CONF_FLAGS_CAN_FLOOD            0x00000400U
53
 
#define CONF_FLAGS_NEED_PASSWORD        0x00000800U
54
 
#define CONF_FLAGS_ALLOW_AUTO_CONN      0x00001000U
55
 
#define CONF_FLAGS_ENCRYPTED            0x00002000U
56
 
#define CONF_FLAGS_IN_DATABASE          0x00004000U
57
 
#define CONF_FLAGS_EXEMPTRESV           0x00008000U
58
 
#define CONF_FLAGS_SSL                  0x00010000U
59
 
#define CONF_FLAGS_WEBIRC               0x00020000U
 
42
#define CONF_FLAGS_NO_TILDE             0x00000001U
 
43
#define CONF_FLAGS_NEED_IDENTD          0x00000002U
 
44
#define CONF_FLAGS_EXEMPTKLINE          0x00000004U
 
45
#define CONF_FLAGS_NOLIMIT              0x00000008U
 
46
#define CONF_FLAGS_SPOOF_IP             0x00000010U
 
47
#define CONF_FLAGS_SPOOF_NOTICE         0x00000020U
 
48
#define CONF_FLAGS_REDIR                0x00000040U
 
49
#define CONF_FLAGS_EXEMPTGLINE          0x00000080U
 
50
#define CONF_FLAGS_CAN_FLOOD            0x00000100U
 
51
#define CONF_FLAGS_NEED_PASSWORD        0x00000200U
 
52
#define CONF_FLAGS_ALLOW_AUTO_CONN      0x00000400U
 
53
#define CONF_FLAGS_ENCRYPTED            0x00000800U
 
54
#define CONF_FLAGS_IN_DATABASE          0x00001000U
 
55
#define CONF_FLAGS_EXEMPTRESV           0x00002000U
 
56
#define CONF_FLAGS_SSL                  0x00004000U
 
57
#define CONF_FLAGS_WEBIRC               0x00008000U
60
58
 
61
59
/* Macros for struct MaskItem */
62
60
#define IsConfWebIRC(x)           ((x)->flags & CONF_FLAGS_WEBIRC)
68
66
#define IsConfExemptLimits(x)     ((x)->flags & CONF_FLAGS_NOLIMIT)
69
67
#define IsConfExemptGline(x)      ((x)->flags & CONF_FLAGS_EXEMPTGLINE)
70
68
#define IsConfExemptResv(x)       ((x)->flags & CONF_FLAGS_EXEMPTRESV)
71
 
#define IsConfDoIdentd(x)         ((x)->flags & CONF_FLAGS_DO_IDENTD)
72
69
#define IsConfDoSpoofIp(x)        ((x)->flags & CONF_FLAGS_SPOOF_IP)
73
70
#define IsConfSpoofNotice(x)      ((x)->flags & CONF_FLAGS_SPOOF_NOTICE)
74
71
#define IsConfAllowAutoConn(x)    ((x)->flags & CONF_FLAGS_ALLOW_AUTO_CONN)
168
165
  char              *spasswd;  /* Password to send. */
169
166
  char              *reason;
170
167
  char              *certfp;
 
168
  char              *whois;
171
169
  char              *cipher_list;
172
170
  void              *rsa_public_key;
173
171
};
183
181
  struct irc_ssaddr addr;
184
182
  int bits;
185
183
  int type;
186
 
  int coid;
 
184
  int country_id;
187
185
};
188
186
 
189
187
struct CidrItem
193
191
  unsigned int number_on_this_cidr;
194
192
};
195
193
 
196
 
struct
 
194
struct conf_parser_context
197
195
{
198
196
  unsigned int boot;
199
197
  unsigned int pass;
200
198
  FILE *conf_file;
201
 
} conf_parser_ctx;
 
199
};
202
200
 
203
 
struct
 
201
struct config_general_entry
204
202
{
205
203
  const char *dpath;
206
204
  const char *mpath;
229
227
  unsigned int warn_no_connect_block;
230
228
  unsigned int invisible_on_connect;
231
229
  unsigned int stats_e_disabled;
 
230
  unsigned int stats_i_oper_only;
 
231
  unsigned int stats_k_oper_only;
 
232
  unsigned int stats_m_oper_only;
232
233
  unsigned int stats_o_oper_only;
233
 
  unsigned int stats_k_oper_only;
234
 
  unsigned int stats_i_oper_only;
235
234
  unsigned int stats_P_oper_only;
236
235
  unsigned int stats_u_oper_only;
237
236
  unsigned int short_motd;
238
237
  unsigned int no_oper_flood;
239
 
  unsigned int true_no_oper_flood;
240
238
  unsigned int oper_pass_resv;
241
239
  unsigned int glines;
242
 
  unsigned int hide_spoof_ips;
243
240
  unsigned int tkline_expire_notices;
244
241
  unsigned int opers_bypass_callerid;
245
242
  unsigned int ignore_bogus_ts;
260
257
  unsigned int ping_cookie;
261
258
  unsigned int disable_auth;
262
259
  unsigned int cycle_on_host_change;
263
 
} ConfigGeneral;
 
260
};
264
261
 
265
 
struct
 
262
struct config_channel_entry
266
263
{
267
264
  unsigned int disable_fake_channels;
268
265
  unsigned int invite_client_count;
272
269
  unsigned int knock_delay_channel;
273
270
  unsigned int max_bans;
274
271
  unsigned int max_channels;
 
272
  unsigned int default_join_flood_count;
 
273
  unsigned int default_join_flood_time;
275
274
  unsigned int no_create_on_split;
276
275
  unsigned int no_join_on_split;
277
276
  unsigned int default_split_server_count;
278
277
  unsigned int default_split_user_count;
279
 
} ConfigChannel;
 
278
};
280
279
 
281
 
struct
 
280
struct config_serverhide_entry
282
281
{
283
282
  char *hidden_name;
284
283
  unsigned int flatten_links;
289
288
  unsigned int links_disabled;
290
289
  unsigned int hidden;
291
290
  unsigned int hide_server_ips;
292
 
} ConfigServerHide;
 
291
};
293
292
 
294
 
struct
 
293
struct config_serverinfo_entry
295
294
{
296
295
#ifdef HAVE_LIBCRYPTO
297
296
  const EVP_MD *message_digest_algorithm;
306
305
  void *server_ctx;
307
306
  void *client_ctx;
308
307
  unsigned int hub;
309
 
  unsigned int max_clients;
 
308
  unsigned int default_max_clients;
310
309
  unsigned int max_nick_length;
311
310
  unsigned int max_topic_length;
312
311
  unsigned int specific_ipv4_vhost;
313
312
  unsigned int specific_ipv6_vhost;
314
313
  struct irc_ssaddr ip;
315
314
  struct irc_ssaddr ip6;
316
 
} ConfigServerInfo;
 
315
};
317
316
 
318
 
struct
 
317
struct config_admin_entry
319
318
{
320
319
  char *name;
321
320
  char *description;
322
321
  char *email;
323
 
} ConfigAdminInfo;
 
322
};
324
323
 
325
 
struct
 
324
struct config_log_entry
326
325
{
327
326
  unsigned int use_logging;
328
 
} ConfigLog;
 
327
};
329
328
 
330
329
extern dlink_list flatten_links;
331
330
extern dlink_list server_items;
336
335
extern dlink_list service_items;
337
336
extern dlink_list nresv_items;
338
337
extern dlink_list cresv_items;
 
338
extern struct conf_parser_context conf_parser_ctx;
 
339
extern struct config_log_entry ConfigLog;
 
340
extern struct config_general_entry ConfigGeneral;
 
341
extern struct config_channel_entry ConfigChannel;
 
342
extern struct config_serverhide_entry ConfigServerHide;
 
343
extern struct config_serverinfo_entry ConfigServerInfo;
 
344
extern struct config_admin_entry ConfigAdminInfo;
339
345
 
340
346
extern int valid_wild_card_simple(const char *);
341
347
extern int valid_wild_card(struct Client *, int, int, ...);
351
357
extern void detach_conf(struct Client *, enum maskitem_type);
352
358
extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type);
353
359
extern int conf_connect_allowed(struct irc_ssaddr *, int);
354
 
extern char *oper_privs_as_string(const unsigned int);
 
360
extern const char *oper_privs_as_string(const unsigned int);
355
361
extern void split_nuh(struct split_nuh_item *);
356
362
extern struct MaskItem *find_matching_name_conf(enum maskitem_type, const char *,
357
363
                                                const char *, const char *, unsigned int);
361
367
extern void yyerror(const char *);
362
368
extern void conf_error_report(const char *);
363
369
extern void cleanup_tklines(void *);
364
 
extern int rehash(int);
 
370
extern void conf_rehash(int);
365
371
extern void lookup_confhost(struct MaskItem *);
366
372
extern void conf_add_class_to_conf(struct MaskItem *, const char *);
367
373
 
381
387
 
382
388
#define CLEANUP_TKLINES_TIME 60
383
389
 
384
 
extern void cluster_a_line(struct Client *, const char *, int, int, const char *,...);
 
390
extern void cluster_a_line(struct Client *, const char *, unsigned int, unsigned int, const char *,...);
385
391
#endif /* INCLUDED_s_conf_h */