| 1 |
|
/* |
| 2 |
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
* |
| 4 |
< |
* Copyright (c) 2000-2014 ircd-hybrid development team |
| 4 |
> |
* Copyright (c) 2000-2016 ircd-hybrid development team |
| 5 |
|
* |
| 6 |
|
* This program is free software; you can redistribute it and/or modify |
| 7 |
|
* it under the terms of the GNU General Public License as published by |
| 15 |
|
* |
| 16 |
|
* You should have received a copy of the GNU General Public License |
| 17 |
|
* along with this program; if not, write to the Free Software |
| 18 |
< |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 18 |
> |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
| 19 |
|
* USA |
| 20 |
|
*/ |
| 21 |
|
|
| 27 |
|
|
| 28 |
|
%{ |
| 29 |
|
|
| 30 |
– |
#define YY_NO_UNPUT |
| 31 |
– |
#include <sys/types.h> |
| 32 |
– |
#include <string.h> |
| 33 |
– |
|
| 30 |
|
#include "config.h" |
| 31 |
|
#include "stdinc.h" |
| 32 |
|
#include "ircd.h" |
| 33 |
|
#include "list.h" |
| 34 |
|
#include "conf.h" |
| 35 |
|
#include "conf_class.h" |
| 36 |
+ |
#include "conf_cluster.h" |
| 37 |
+ |
#include "conf_gecos.h" |
| 38 |
+ |
#include "conf_pseudo.h" |
| 39 |
+ |
#include "conf_resv.h" |
| 40 |
+ |
#include "conf_service.h" |
| 41 |
+ |
#include "conf_shared.h" |
| 42 |
|
#include "event.h" |
| 43 |
+ |
#include "id.h" |
| 44 |
|
#include "log.h" |
| 42 |
– |
#include "client.h" /* for UMODE_ALL only */ |
| 45 |
|
#include "irc_string.h" |
| 46 |
|
#include "memory.h" |
| 47 |
|
#include "modules.h" |
| 48 |
|
#include "server.h" |
| 49 |
|
#include "hostmask.h" |
| 48 |
– |
#include "send.h" |
| 50 |
|
#include "listener.h" |
| 50 |
– |
#include "resv.h" |
| 51 |
– |
#include "numeric.h" |
| 51 |
|
#include "user.h" |
| 52 |
|
#include "motd.h" |
| 53 |
|
|
| 55 |
– |
#ifdef HAVE_LIBCRYPTO |
| 56 |
– |
#include <openssl/rsa.h> |
| 57 |
– |
#include <openssl/bio.h> |
| 58 |
– |
#include <openssl/pem.h> |
| 59 |
– |
#include <openssl/dh.h> |
| 60 |
– |
#endif |
| 61 |
– |
|
| 62 |
– |
#include "rsa.h" |
| 63 |
– |
|
| 54 |
|
int yylex(void); |
| 55 |
|
|
| 56 |
|
static struct |
| 66 |
|
{ |
| 67 |
|
char buf[IRCD_BUFSIZE]; |
| 68 |
|
} name, |
| 69 |
+ |
nick, |
| 70 |
|
user, |
| 71 |
|
host, |
| 72 |
|
addr, |
| 76 |
|
cert, |
| 77 |
|
rpass, |
| 78 |
|
spass, |
| 79 |
< |
class; |
| 79 |
> |
whois, |
| 80 |
> |
class, |
| 81 |
> |
target, |
| 82 |
> |
prepend, |
| 83 |
> |
command; |
| 84 |
|
|
| 85 |
|
struct |
| 86 |
|
{ |
| 99 |
|
max_total, |
| 100 |
|
max_global, |
| 101 |
|
max_local, |
| 107 |
– |
max_ident, |
| 102 |
|
max_sendq, |
| 103 |
|
max_recvq, |
| 104 |
|
max_channels, |
| 110 |
|
static void |
| 111 |
|
reset_block_state(void) |
| 112 |
|
{ |
| 113 |
< |
dlink_node *ptr = NULL, *ptr_next = NULL; |
| 113 |
> |
dlink_node *node = NULL, *node_next = NULL; |
| 114 |
|
|
| 115 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.mask.list.head) |
| 115 |
> |
DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head) |
| 116 |
|
{ |
| 117 |
< |
MyFree(ptr->data); |
| 118 |
< |
dlinkDelete(ptr, &block_state.mask.list); |
| 119 |
< |
free_dlink_node(ptr); |
| 117 |
> |
xfree(node->data); |
| 118 |
> |
dlinkDelete(node, &block_state.mask.list); |
| 119 |
> |
free_dlink_node(node); |
| 120 |
|
} |
| 121 |
|
|
| 122 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.leaf.list.head) |
| 122 |
> |
DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head) |
| 123 |
|
{ |
| 124 |
< |
MyFree(ptr->data); |
| 125 |
< |
dlinkDelete(ptr, &block_state.leaf.list); |
| 126 |
< |
free_dlink_node(ptr); |
| 124 |
> |
xfree(node->data); |
| 125 |
> |
dlinkDelete(node, &block_state.leaf.list); |
| 126 |
> |
free_dlink_node(node); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, block_state.hub.list.head) |
| 129 |
> |
DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head) |
| 130 |
|
{ |
| 131 |
< |
MyFree(ptr->data); |
| 132 |
< |
dlinkDelete(ptr, &block_state.hub.list); |
| 133 |
< |
free_dlink_node(ptr); |
| 131 |
> |
xfree(node->data); |
| 132 |
> |
dlinkDelete(node, &block_state.hub.list); |
| 133 |
> |
free_dlink_node(node); |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
memset(&block_state, 0, sizeof(block_state)); |
| 155 |
|
%token CALLER_ID_WAIT |
| 156 |
|
%token CAN_FLOOD |
| 157 |
|
%token CHANNEL |
| 158 |
+ |
%token CHECK_CACHE |
| 159 |
|
%token CIDR_BITLEN_IPV4 |
| 160 |
|
%token CIDR_BITLEN_IPV6 |
| 161 |
|
%token CLASS |
| 162 |
+ |
%token CLOSE |
| 163 |
|
%token CONNECT |
| 164 |
|
%token CONNECTFREQ |
| 165 |
|
%token CYCLE_ON_HOST_CHANGE |
| 166 |
|
%token DEFAULT_FLOODCOUNT |
| 167 |
< |
%token DEFAULT_SPLIT_SERVER_COUNT |
| 168 |
< |
%token DEFAULT_SPLIT_USER_COUNT |
| 167 |
> |
%token DEFAULT_JOIN_FLOOD_COUNT |
| 168 |
> |
%token DEFAULT_JOIN_FLOOD_TIME |
| 169 |
> |
%token DEFAULT_MAX_CLIENTS |
| 170 |
|
%token DENY |
| 171 |
|
%token DESCRIPTION |
| 172 |
|
%token DIE |
| 173 |
|
%token DISABLE_AUTH |
| 174 |
|
%token DISABLE_FAKE_CHANNELS |
| 175 |
|
%token DISABLE_REMOTE_COMMANDS |
| 176 |
+ |
%token DLINE_MIN_CIDR |
| 177 |
+ |
%token DLINE_MIN_CIDR6 |
| 178 |
|
%token DOTS_IN_IDENT |
| 180 |
– |
%token EGDPOOL_PATH |
| 179 |
|
%token EMAIL |
| 180 |
|
%token ENCRYPTED |
| 181 |
|
%token EXCEED_LIMIT |
| 182 |
|
%token EXEMPT |
| 183 |
|
%token FAILED_OPER_NOTICE |
| 184 |
|
%token FLATTEN_LINKS |
| 185 |
+ |
%token FLATTEN_LINKS_DELAY |
| 186 |
+ |
%token FLATTEN_LINKS_FILE |
| 187 |
|
%token GECOS |
| 188 |
|
%token GENERAL |
| 189 |
– |
%token GLINE |
| 190 |
– |
%token GLINE_DURATION |
| 191 |
– |
%token GLINE_ENABLE |
| 192 |
– |
%token GLINE_EXEMPT |
| 193 |
– |
%token GLINE_MIN_CIDR |
| 194 |
– |
%token GLINE_MIN_CIDR6 |
| 195 |
– |
%token GLINE_REQUEST_DURATION |
| 196 |
– |
%token GLOBAL_KILL |
| 197 |
– |
%token HAVENT_READ_CONF |
| 189 |
|
%token HIDDEN |
| 190 |
|
%token HIDDEN_NAME |
| 191 |
|
%token HIDE_CHANS |
| 194 |
|
%token HIDE_SERVER_IPS |
| 195 |
|
%token HIDE_SERVERS |
| 196 |
|
%token HIDE_SERVICES |
| 206 |
– |
%token HIDE_SPOOF_IPS |
| 197 |
|
%token HOST |
| 198 |
|
%token HUB |
| 199 |
|
%token HUB_MASK |
| 201 |
|
%token INVISIBLE_ON_CONNECT |
| 202 |
|
%token INVITE_CLIENT_COUNT |
| 203 |
|
%token INVITE_CLIENT_TIME |
| 204 |
+ |
%token INVITE_DELAY_CHANNEL |
| 205 |
+ |
%token INVITE_EXPIRE_TIME |
| 206 |
|
%token IP |
| 207 |
|
%token IRCD_AUTH |
| 208 |
|
%token IRCD_FLAGS |
| 209 |
|
%token IRCD_SID |
| 210 |
< |
%token JOIN_FLOOD_COUNT |
| 219 |
< |
%token JOIN_FLOOD_TIME |
| 210 |
> |
%token JOIN |
| 211 |
|
%token KILL |
| 212 |
|
%token KILL_CHASE_TIME_LIMIT |
| 213 |
|
%token KLINE |
| 214 |
|
%token KLINE_EXEMPT |
| 215 |
+ |
%token KLINE_MIN_CIDR |
| 216 |
+ |
%token KLINE_MIN_CIDR6 |
| 217 |
|
%token KNOCK_CLIENT_COUNT |
| 218 |
|
%token KNOCK_CLIENT_TIME |
| 219 |
|
%token KNOCK_DELAY_CHANNEL |
| 220 |
|
%token LEAF_MASK |
| 221 |
< |
%token LINKS_DELAY |
| 221 |
> |
%token LIBGEOIP_DATABASE_OPTIONS |
| 222 |
> |
%token LIBGEOIP_IPV4_DATABASE_FILE |
| 223 |
> |
%token LIBGEOIP_IPV6_DATABASE_FILE |
| 224 |
|
%token LISTEN |
| 225 |
|
%token MASK |
| 226 |
|
%token MAX_ACCEPT |
| 227 |
|
%token MAX_BANS |
| 228 |
|
%token MAX_CHANNELS |
| 229 |
|
%token MAX_GLOBAL |
| 235 |
– |
%token MAX_IDENT |
| 230 |
|
%token MAX_IDLE |
| 231 |
+ |
%token MAX_INVITES |
| 232 |
|
%token MAX_LOCAL |
| 233 |
|
%token MAX_NICK_CHANGES |
| 234 |
|
%token MAX_NICK_LENGTH |
| 237 |
|
%token MAX_TARGETS |
| 238 |
|
%token MAX_TOPIC_LENGTH |
| 239 |
|
%token MAX_WATCH |
| 240 |
+ |
%token MEMORY_CACHE |
| 241 |
|
%token MIN_IDLE |
| 242 |
|
%token MIN_NONWILDCARD |
| 243 |
|
%token MIN_NONWILDCARD_SIMPLE |
| 244 |
+ |
%token MMAP_CACHE |
| 245 |
|
%token MODULE |
| 246 |
|
%token MODULES |
| 247 |
|
%token MOTD |
| 251 |
|
%token NETWORK_DESC |
| 252 |
|
%token NETWORK_NAME |
| 253 |
|
%token NICK |
| 257 |
– |
%token NO_CREATE_ON_SPLIT |
| 258 |
– |
%token NO_JOIN_ON_SPLIT |
| 254 |
|
%token NO_OPER_FLOOD |
| 255 |
|
%token NO_TILDE |
| 256 |
|
%token NUMBER |
| 257 |
|
%token NUMBER_PER_CIDR |
| 258 |
|
%token NUMBER_PER_IP |
| 259 |
|
%token OPER_ONLY_UMODES |
| 265 |
– |
%token OPER_PASS_RESV |
| 260 |
|
%token OPER_UMODES |
| 261 |
|
%token OPERATOR |
| 262 |
|
%token OPERS_BYPASS_CALLERID |
| 278 |
|
%token RESV |
| 279 |
|
%token RESV_EXEMPT |
| 280 |
|
%token RSA_PRIVATE_KEY_FILE |
| 287 |
– |
%token RSA_PUBLIC_KEY_FILE |
| 281 |
|
%token SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS |
| 282 |
|
%token SEND_PASSWORD |
| 283 |
|
%token SENDQ |
| 293 |
|
%token SSL_DH_ELLIPTIC_CURVE |
| 294 |
|
%token SSL_DH_PARAM_FILE |
| 295 |
|
%token SSL_MESSAGE_DIGEST_ALGORITHM |
| 296 |
+ |
%token STANDARD |
| 297 |
|
%token STATS_E_DISABLED |
| 298 |
|
%token STATS_I_OPER_ONLY |
| 299 |
|
%token STATS_K_OPER_ONLY |
| 300 |
+ |
%token STATS_M_OPER_ONLY |
| 301 |
|
%token STATS_O_OPER_ONLY |
| 302 |
|
%token STATS_P_OPER_ONLY |
| 303 |
|
%token STATS_U_OPER_ONLY |
| 305 |
|
%token T_BOTS |
| 306 |
|
%token T_CALLERID |
| 307 |
|
%token T_CCONN |
| 308 |
+ |
%token T_COMMAND |
| 309 |
|
%token T_CLUSTER |
| 310 |
|
%token T_DEAF |
| 311 |
|
%token T_DEBUG |
| 320 |
|
%token T_IPV6 |
| 321 |
|
%token T_LOCOPS |
| 322 |
|
%token T_LOG |
| 327 |
– |
%token T_MAX_CLIENTS |
| 323 |
|
%token T_NCHANGE |
| 324 |
|
%token T_NONONREG |
| 325 |
+ |
%token T_OPME |
| 326 |
+ |
%token T_PREPEND |
| 327 |
+ |
%token T_PSEUDO |
| 328 |
|
%token T_RECVQ |
| 329 |
|
%token T_REJ |
| 330 |
|
%token T_RESTART |
| 331 |
|
%token T_SERVER |
| 332 |
|
%token T_SERVICE |
| 335 |
– |
%token T_SERVICES_NAME |
| 333 |
|
%token T_SERVNOTICE |
| 334 |
|
%token T_SET |
| 335 |
|
%token T_SHARED |
| 339 |
|
%token T_SPY |
| 340 |
|
%token T_SSL |
| 341 |
|
%token T_SSL_CIPHER_LIST |
| 342 |
+ |
%token T_TARGET |
| 343 |
|
%token T_UMODES |
| 344 |
|
%token T_UNAUTH |
| 345 |
|
%token T_UNDLINE |
| 354 |
|
%token THROTTLE_TIME |
| 355 |
|
%token TKLINE_EXPIRE_NOTICES |
| 356 |
|
%token TMASKED |
| 359 |
– |
%token TRUE_NO_OPER_FLOOD |
| 357 |
|
%token TS_MAX_DELTA |
| 358 |
|
%token TS_WARN_DELTA |
| 359 |
|
%token TWODOTS |
| 360 |
|
%token TYPE |
| 361 |
|
%token UNKLINE |
| 365 |
– |
%token USE_EGD |
| 362 |
|
%token USE_LOGGING |
| 363 |
|
%token USER |
| 364 |
|
%token VHOST |
| 365 |
|
%token VHOST6 |
| 366 |
|
%token WARN_NO_CONNECT_BLOCK |
| 367 |
+ |
%token WHOIS |
| 368 |
+ |
%token WHOWAS_HISTORY_LENGTH |
| 369 |
|
%token XLINE |
| 370 |
+ |
%token XLINE_EXEMPT |
| 371 |
|
|
| 372 |
|
%type <string> QSTRING |
| 373 |
|
%type <number> NUMBER |
| 402 |
|
| gecos_entry |
| 403 |
|
| modules_entry |
| 404 |
|
| motd_entry |
| 405 |
+ |
| pseudo_entry |
| 406 |
|
| error ';' |
| 407 |
|
| error '}' |
| 408 |
|
; |
| 428 |
|
|
| 429 |
|
|
| 430 |
|
/*************************************************************************** |
| 431 |
< |
* section modules |
| 431 |
> |
* modules {} section |
| 432 |
|
***************************************************************************/ |
| 433 |
< |
modules_entry: MODULES |
| 434 |
< |
'{' modules_items '}' ';'; |
| 433 |
> |
modules_entry: MODULES '{' modules_items '}' ';'; |
| 434 |
|
|
| 435 |
|
modules_items: modules_items modules_item | modules_item; |
| 436 |
|
modules_item: modules_module | modules_path | error ';' ; |
| 448 |
|
}; |
| 449 |
|
|
| 450 |
|
|
| 451 |
+ |
/*************************************************************************** |
| 452 |
+ |
* serverinfo {} section |
| 453 |
+ |
***************************************************************************/ |
| 454 |
|
serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';'; |
| 455 |
|
|
| 456 |
|
serverinfo_items: serverinfo_items serverinfo_item | serverinfo_item ; |
| 460 |
|
serverinfo_description | |
| 461 |
|
serverinfo_network_name | |
| 462 |
|
serverinfo_network_desc | |
| 463 |
< |
serverinfo_max_clients | |
| 463 |
> |
serverinfo_default_max_clients | |
| 464 |
|
serverinfo_max_nick_length | |
| 465 |
|
serverinfo_max_topic_length | |
| 466 |
|
serverinfo_ssl_dh_param_file | |
| 471 |
|
serverinfo_ssl_certificate_file | |
| 472 |
|
serverinfo_ssl_cipher_list | |
| 473 |
|
serverinfo_ssl_message_digest_algorithm | |
| 474 |
+ |
serverinfo_libgeoip_database_options | |
| 475 |
+ |
serverinfo_libgeoip_ipv4_database_file | |
| 476 |
+ |
serverinfo_libgeoip_ipv6_database_file | |
| 477 |
|
error ';' ; |
| 478 |
|
|
| 479 |
|
|
| 480 |
|
serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';' |
| 481 |
|
{ |
| 477 |
– |
#ifdef HAVE_LIBCRYPTO |
| 482 |
|
if (conf_parser_ctx.pass == 2) |
| 483 |
|
{ |
| 484 |
< |
if (!ConfigServerInfo.rsa_private_key_file) |
| 485 |
< |
{ |
| 482 |
< |
conf_error_report("No rsa_private_key_file specified, SSL disabled"); |
| 483 |
< |
break; |
| 484 |
< |
} |
| 485 |
< |
|
| 486 |
< |
if (SSL_CTX_use_certificate_file(ConfigServerInfo.server_ctx, yylval.string, |
| 487 |
< |
SSL_FILETYPE_PEM) <= 0 || |
| 488 |
< |
SSL_CTX_use_certificate_file(ConfigServerInfo.client_ctx, yylval.string, |
| 489 |
< |
SSL_FILETYPE_PEM) <= 0) |
| 490 |
< |
{ |
| 491 |
< |
report_crypto_errors(); |
| 492 |
< |
conf_error_report("Could not open/read certificate file"); |
| 493 |
< |
break; |
| 494 |
< |
} |
| 495 |
< |
|
| 496 |
< |
if (SSL_CTX_use_PrivateKey_file(ConfigServerInfo.server_ctx, ConfigServerInfo.rsa_private_key_file, |
| 497 |
< |
SSL_FILETYPE_PEM) <= 0 || |
| 498 |
< |
SSL_CTX_use_PrivateKey_file(ConfigServerInfo.client_ctx, ConfigServerInfo.rsa_private_key_file, |
| 499 |
< |
SSL_FILETYPE_PEM) <= 0) |
| 500 |
< |
{ |
| 501 |
< |
report_crypto_errors(); |
| 502 |
< |
conf_error_report("Could not read RSA private key"); |
| 503 |
< |
break; |
| 504 |
< |
} |
| 505 |
< |
|
| 506 |
< |
if (!SSL_CTX_check_private_key(ConfigServerInfo.server_ctx) || |
| 507 |
< |
!SSL_CTX_check_private_key(ConfigServerInfo.client_ctx)) |
| 508 |
< |
{ |
| 509 |
< |
report_crypto_errors(); |
| 510 |
< |
conf_error_report("Could not read RSA private key"); |
| 511 |
< |
break; |
| 512 |
< |
} |
| 484 |
> |
xfree(ConfigServerInfo.ssl_certificate_file); |
| 485 |
> |
ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string); |
| 486 |
|
} |
| 514 |
– |
#endif |
| 487 |
|
}; |
| 488 |
|
|
| 489 |
|
serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';' |
| 490 |
|
{ |
| 491 |
< |
#ifdef HAVE_LIBCRYPTO |
| 520 |
< |
BIO *file = NULL; |
| 521 |
< |
|
| 522 |
< |
if (conf_parser_ctx.pass != 1) |
| 523 |
< |
break; |
| 524 |
< |
|
| 525 |
< |
if (ConfigServerInfo.rsa_private_key) |
| 526 |
< |
{ |
| 527 |
< |
RSA_free(ConfigServerInfo.rsa_private_key); |
| 528 |
< |
ConfigServerInfo.rsa_private_key = NULL; |
| 529 |
< |
} |
| 530 |
< |
|
| 531 |
< |
if (ConfigServerInfo.rsa_private_key_file) |
| 491 |
> |
if (conf_parser_ctx.pass == 2) |
| 492 |
|
{ |
| 493 |
< |
MyFree(ConfigServerInfo.rsa_private_key_file); |
| 494 |
< |
ConfigServerInfo.rsa_private_key_file = NULL; |
| 493 |
> |
xfree(ConfigServerInfo.rsa_private_key_file); |
| 494 |
> |
ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 495 |
|
} |
| 496 |
+ |
}; |
| 497 |
|
|
| 498 |
< |
ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 499 |
< |
|
| 500 |
< |
if ((file = BIO_new_file(yylval.string, "r")) == NULL) |
| 498 |
> |
serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';' |
| 499 |
> |
{ |
| 500 |
> |
if (conf_parser_ctx.pass == 2) |
| 501 |
|
{ |
| 502 |
< |
conf_error_report("File open failed, ignoring"); |
| 503 |
< |
break; |
| 502 |
> |
xfree(ConfigServerInfo.ssl_dh_param_file); |
| 503 |
> |
ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string); |
| 504 |
|
} |
| 505 |
+ |
}; |
| 506 |
|
|
| 507 |
< |
ConfigServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL); |
| 508 |
< |
|
| 509 |
< |
BIO_set_close(file, BIO_CLOSE); |
| 548 |
< |
BIO_free(file); |
| 549 |
< |
|
| 550 |
< |
if (ConfigServerInfo.rsa_private_key == NULL) |
| 507 |
> |
serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';' |
| 508 |
> |
{ |
| 509 |
> |
if (conf_parser_ctx.pass == 2) |
| 510 |
|
{ |
| 511 |
< |
conf_error_report("Couldn't extract key, ignoring"); |
| 512 |
< |
break; |
| 511 |
> |
xfree(ConfigServerInfo.ssl_cipher_list); |
| 512 |
> |
ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string); |
| 513 |
|
} |
| 514 |
+ |
}; |
| 515 |
|
|
| 516 |
< |
if (!RSA_check_key(ConfigServerInfo.rsa_private_key)) |
| 516 |
> |
serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';' |
| 517 |
> |
{ |
| 518 |
> |
if (conf_parser_ctx.pass == 2) |
| 519 |
|
{ |
| 520 |
< |
RSA_free(ConfigServerInfo.rsa_private_key); |
| 521 |
< |
ConfigServerInfo.rsa_private_key = NULL; |
| 560 |
< |
|
| 561 |
< |
conf_error_report("Invalid key, ignoring"); |
| 562 |
< |
break; |
| 520 |
> |
xfree(ConfigServerInfo.ssl_message_digest_algorithm); |
| 521 |
> |
ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string); |
| 522 |
|
} |
| 523 |
+ |
} |
| 524 |
|
|
| 525 |
< |
if (RSA_size(ConfigServerInfo.rsa_private_key) < 128) |
| 525 |
> |
serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';' |
| 526 |
> |
{ |
| 527 |
> |
if (conf_parser_ctx.pass == 2) |
| 528 |
|
{ |
| 529 |
< |
RSA_free(ConfigServerInfo.rsa_private_key); |
| 530 |
< |
ConfigServerInfo.rsa_private_key = NULL; |
| 569 |
< |
|
| 570 |
< |
conf_error_report("Ignoring serverinfo::rsa_private_key_file -- need at least a 1024 bit key size"); |
| 529 |
> |
xfree(ConfigServerInfo.ssl_dh_elliptic_curve); |
| 530 |
> |
ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string); |
| 531 |
|
} |
| 572 |
– |
#endif |
| 532 |
|
}; |
| 533 |
|
|
| 534 |
< |
serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';' |
| 534 |
> |
serverinfo_libgeoip_database_options: LIBGEOIP_DATABASE_OPTIONS |
| 535 |
|
{ |
| 536 |
< |
#ifdef HAVE_LIBCRYPTO |
| 537 |
< |
if (conf_parser_ctx.pass == 2) |
| 538 |
< |
{ |
| 580 |
< |
BIO *file = BIO_new_file(yylval.string, "r"); |
| 581 |
< |
|
| 582 |
< |
if (file) |
| 583 |
< |
{ |
| 584 |
< |
DH *dh = PEM_read_bio_DHparams(file, NULL, NULL, NULL); |
| 585 |
< |
|
| 586 |
< |
BIO_free(file); |
| 587 |
< |
|
| 588 |
< |
if (dh) |
| 589 |
< |
{ |
| 590 |
< |
if (DH_size(dh) < 128) |
| 591 |
< |
conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size"); |
| 592 |
< |
else |
| 593 |
< |
SSL_CTX_set_tmp_dh(ConfigServerInfo.server_ctx, dh); |
| 536 |
> |
if (conf_parser_ctx.pass == 1) |
| 537 |
> |
ConfigServerInfo.libgeoip_database_options = 0; |
| 538 |
> |
} '=' options_items ';'; |
| 539 |
|
|
| 540 |
< |
DH_free(dh); |
| 541 |
< |
} |
| 542 |
< |
} |
| 543 |
< |
else |
| 544 |
< |
conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- could not open/read Diffie-Hellman parameter file"); |
| 545 |
< |
} |
| 540 |
> |
options_items: options_items ',' options_item | options_item; |
| 541 |
> |
options_item: STANDARD |
| 542 |
> |
{ |
| 543 |
> |
#ifdef HAVE_LIBGEOIP |
| 544 |
> |
if (conf_parser_ctx.pass == 1) |
| 545 |
> |
ConfigServerInfo.libgeoip_database_options |= GEOIP_STANDARD; |
| 546 |
|
#endif |
| 547 |
< |
}; |
| 603 |
< |
|
| 604 |
< |
serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';' |
| 547 |
> |
} | MEMORY_CACHE |
| 548 |
|
{ |
| 549 |
< |
#ifdef HAVE_LIBCRYPTO |
| 550 |
< |
if (conf_parser_ctx.pass == 2) |
| 551 |
< |
SSL_CTX_set_cipher_list(ConfigServerInfo.server_ctx, yylval.string); |
| 549 |
> |
#ifdef HAVE_LIBGEOIP |
| 550 |
> |
if (conf_parser_ctx.pass == 1) |
| 551 |
> |
ConfigServerInfo.libgeoip_database_options |= GEOIP_MEMORY_CACHE; |
| 552 |
> |
#endif |
| 553 |
> |
} | MMAP_CACHE |
| 554 |
> |
{ |
| 555 |
> |
#ifdef HAVE_LIBGEOIP |
| 556 |
> |
if (conf_parser_ctx.pass == 1) |
| 557 |
> |
ConfigServerInfo.libgeoip_database_options |= GEOIP_MMAP_CACHE; |
| 558 |
> |
#endif |
| 559 |
> |
} | CHECK_CACHE |
| 560 |
> |
{ |
| 561 |
> |
#ifdef HAVE_LIBGEOIP |
| 562 |
> |
if (conf_parser_ctx.pass == 1) |
| 563 |
> |
ConfigServerInfo.libgeoip_database_options |= GEOIP_CHECK_CACHE; |
| 564 |
|
#endif |
| 565 |
|
}; |
| 566 |
|
|
| 567 |
< |
serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';' |
| 567 |
> |
serverinfo_libgeoip_ipv4_database_file: LIBGEOIP_IPV4_DATABASE_FILE '=' QSTRING ';' |
| 568 |
|
{ |
| 614 |
– |
#ifdef HAVE_LIBCRYPTO |
| 569 |
|
if (conf_parser_ctx.pass == 2) |
| 570 |
|
{ |
| 571 |
< |
if ((ConfigServerInfo.message_digest_algorithm = EVP_get_digestbyname(yylval.string)) == NULL) |
| 572 |
< |
{ |
| 573 |
< |
ConfigServerInfo.message_digest_algorithm = EVP_sha256(); |
| 574 |
< |
conf_error_report("Ignoring serverinfo::ssl_message_digest_algorithm -- unknown message digest algorithm"); |
| 575 |
< |
} |
| 576 |
< |
} |
| 571 |
> |
xfree(ConfigServerInfo.libgeoip_ipv4_database_file); |
| 572 |
> |
ConfigServerInfo.libgeoip_ipv4_database_file = xstrdup(yylval.string); |
| 573 |
> |
|
| 574 |
> |
#ifdef HAVE_LIBGEOIP |
| 575 |
> |
if (GeoIPv4_ctx) |
| 576 |
> |
GeoIP_delete(GeoIPv4_ctx); |
| 577 |
> |
GeoIPv4_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options); |
| 578 |
|
#endif |
| 579 |
< |
} |
| 579 |
> |
} |
| 580 |
> |
}; |
| 581 |
|
|
| 582 |
< |
serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';' |
| 582 |
> |
serverinfo_libgeoip_ipv6_database_file: LIBGEOIP_IPV6_DATABASE_FILE '=' QSTRING ';' |
| 583 |
|
{ |
| 628 |
– |
#ifdef HAVE_LIBCRYPTO |
| 629 |
– |
#if OPENSSL_VERSION_NUMBER >= 0x1000005FL && !defined(OPENSSL_NO_ECDH) |
| 630 |
– |
int nid = 0; |
| 631 |
– |
EC_KEY *key = NULL; |
| 632 |
– |
|
| 584 |
|
if (conf_parser_ctx.pass == 2) |
| 585 |
|
{ |
| 586 |
< |
if ((nid = OBJ_sn2nid(yylval.string)) == 0) |
| 587 |
< |
{ |
| 637 |
< |
conf_error_report("Ignoring serverinfo::serverinfo_ssl_dh_elliptic_curve -- unknown curve name"); |
| 638 |
< |
break; |
| 639 |
< |
} |
| 640 |
< |
|
| 641 |
< |
if ((key = EC_KEY_new_by_curve_name(nid)) == NULL) |
| 642 |
< |
{ |
| 643 |
< |
conf_error_report("Ignoring serverinfo::serverinfo_ssl_dh_elliptic_curve -- could not create curve"); |
| 644 |
< |
break; |
| 645 |
< |
} |
| 586 |
> |
xfree(ConfigServerInfo.libgeoip_ipv6_database_file); |
| 587 |
> |
ConfigServerInfo.libgeoip_ipv6_database_file = xstrdup(yylval.string); |
| 588 |
|
|
| 589 |
< |
SSL_CTX_set_tmp_ecdh(ConfigServerInfo.server_ctx, key); |
| 590 |
< |
EC_KEY_free(key); |
| 591 |
< |
} |
| 592 |
< |
#endif |
| 589 |
> |
#ifdef HAVE_LIBGEOIP |
| 590 |
> |
if (GeoIPv6_ctx) |
| 591 |
> |
GeoIP_delete(GeoIPv6_ctx); |
| 592 |
> |
GeoIPv6_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options); |
| 593 |
|
#endif |
| 594 |
+ |
} |
| 595 |
|
}; |
| 596 |
|
|
| 597 |
|
serverinfo_name: NAME '=' QSTRING ';' |
| 598 |
|
{ |
| 599 |
< |
/* this isn't rehashable */ |
| 599 |
> |
/* This isn't rehashable */ |
| 600 |
|
if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name) |
| 601 |
|
{ |
| 602 |
|
if (valid_servname(yylval.string)) |
| 604 |
|
else |
| 605 |
|
{ |
| 606 |
|
conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting."); |
| 607 |
< |
exit(0); |
| 607 |
> |
exit(EXIT_FAILURE); |
| 608 |
|
} |
| 609 |
|
} |
| 610 |
|
}; |
| 611 |
|
|
| 612 |
|
serverinfo_sid: IRCD_SID '=' QSTRING ';' |
| 613 |
|
{ |
| 614 |
< |
/* this isn't rehashable */ |
| 614 |
> |
/* This isn't rehashable */ |
| 615 |
|
if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid) |
| 616 |
|
{ |
| 617 |
|
if (valid_sid(yylval.string)) |
| 619 |
|
else |
| 620 |
|
{ |
| 621 |
|
conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting."); |
| 622 |
< |
exit(0); |
| 622 |
> |
exit(EXIT_FAILURE); |
| 623 |
|
} |
| 624 |
|
} |
| 625 |
|
}; |
| 628 |
|
{ |
| 629 |
|
if (conf_parser_ctx.pass == 2) |
| 630 |
|
{ |
| 631 |
< |
MyFree(ConfigServerInfo.description); |
| 631 |
> |
xfree(ConfigServerInfo.description); |
| 632 |
|
ConfigServerInfo.description = xstrdup(yylval.string); |
| 633 |
+ |
strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info)); |
| 634 |
|
} |
| 635 |
|
}; |
| 636 |
|
|
| 643 |
|
if ((p = strchr(yylval.string, ' '))) |
| 644 |
|
*p = '\0'; |
| 645 |
|
|
| 646 |
< |
MyFree(ConfigServerInfo.network_name); |
| 646 |
> |
xfree(ConfigServerInfo.network_name); |
| 647 |
|
ConfigServerInfo.network_name = xstrdup(yylval.string); |
| 648 |
|
} |
| 649 |
|
}; |
| 653 |
|
if (conf_parser_ctx.pass != 2) |
| 654 |
|
break; |
| 655 |
|
|
| 656 |
< |
MyFree(ConfigServerInfo.network_desc); |
| 656 |
> |
xfree(ConfigServerInfo.network_desc); |
| 657 |
|
ConfigServerInfo.network_desc = xstrdup(yylval.string); |
| 658 |
|
}; |
| 659 |
|
|
| 713 |
|
} |
| 714 |
|
}; |
| 715 |
|
|
| 716 |
< |
serverinfo_max_clients: T_MAX_CLIENTS '=' NUMBER ';' |
| 716 |
> |
serverinfo_default_max_clients: DEFAULT_MAX_CLIENTS '=' NUMBER ';' |
| 717 |
|
{ |
| 718 |
|
if (conf_parser_ctx.pass != 2) |
| 719 |
|
break; |
| 724 |
|
|
| 725 |
|
snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN); |
| 726 |
|
conf_error_report(buf); |
| 727 |
< |
ConfigServerInfo.max_clients = MAXCLIENTS_MIN; |
| 727 |
> |
ConfigServerInfo.default_max_clients = MAXCLIENTS_MIN; |
| 728 |
|
} |
| 729 |
|
else if ($3 > MAXCLIENTS_MAX) |
| 730 |
|
{ |
| 732 |
|
|
| 733 |
|
snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX); |
| 734 |
|
conf_error_report(buf); |
| 735 |
< |
ConfigServerInfo.max_clients = MAXCLIENTS_MAX; |
| 735 |
> |
ConfigServerInfo.default_max_clients = MAXCLIENTS_MAX; |
| 736 |
|
} |
| 737 |
|
else |
| 738 |
< |
ConfigServerInfo.max_clients = $3; |
| 738 |
> |
ConfigServerInfo.default_max_clients = $3; |
| 739 |
|
}; |
| 740 |
|
|
| 741 |
|
serverinfo_max_nick_length: MAX_NICK_LENGTH '=' NUMBER ';' |
| 788 |
|
ConfigServerInfo.hub = yylval.number; |
| 789 |
|
}; |
| 790 |
|
|
| 791 |
+ |
|
| 792 |
|
/*************************************************************************** |
| 793 |
< |
* admin section |
| 793 |
> |
* admin {} section |
| 794 |
|
***************************************************************************/ |
| 795 |
|
admin_entry: ADMIN '{' admin_items '}' ';' ; |
| 796 |
|
|
| 805 |
|
if (conf_parser_ctx.pass != 2) |
| 806 |
|
break; |
| 807 |
|
|
| 808 |
< |
MyFree(ConfigAdminInfo.name); |
| 808 |
> |
xfree(ConfigAdminInfo.name); |
| 809 |
|
ConfigAdminInfo.name = xstrdup(yylval.string); |
| 810 |
|
}; |
| 811 |
|
|
| 814 |
|
if (conf_parser_ctx.pass != 2) |
| 815 |
|
break; |
| 816 |
|
|
| 817 |
< |
MyFree(ConfigAdminInfo.email); |
| 817 |
> |
xfree(ConfigAdminInfo.email); |
| 818 |
|
ConfigAdminInfo.email = xstrdup(yylval.string); |
| 819 |
|
}; |
| 820 |
|
|
| 823 |
|
if (conf_parser_ctx.pass != 2) |
| 824 |
|
break; |
| 825 |
|
|
| 826 |
< |
MyFree(ConfigAdminInfo.description); |
| 826 |
> |
xfree(ConfigAdminInfo.description); |
| 827 |
|
ConfigAdminInfo.description = xstrdup(yylval.string); |
| 828 |
|
}; |
| 829 |
|
|
| 830 |
+ |
|
| 831 |
|
/*************************************************************************** |
| 832 |
< |
* motd section |
| 832 |
> |
* motd {} section |
| 833 |
|
***************************************************************************/ |
| 834 |
|
motd_entry: MOTD |
| 835 |
|
{ |
| 837 |
|
reset_block_state(); |
| 838 |
|
} '{' motd_items '}' ';' |
| 839 |
|
{ |
| 840 |
< |
dlink_node *ptr = NULL; |
| 840 |
> |
dlink_node *node = NULL; |
| 841 |
|
|
| 842 |
|
if (conf_parser_ctx.pass != 2) |
| 843 |
|
break; |
| 845 |
|
if (!block_state.file.buf[0]) |
| 846 |
|
break; |
| 847 |
|
|
| 848 |
< |
DLINK_FOREACH(ptr, block_state.mask.list.head) |
| 849 |
< |
motd_add(ptr->data, block_state.file.buf); |
| 848 |
> |
DLINK_FOREACH(node, block_state.mask.list.head) |
| 849 |
> |
motd_add(node->data, block_state.file.buf); |
| 850 |
|
}; |
| 851 |
|
|
| 852 |
|
motd_items: motd_items motd_item | motd_item; |
| 864 |
|
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 865 |
|
}; |
| 866 |
|
|
| 867 |
+ |
|
| 868 |
|
/*************************************************************************** |
| 869 |
< |
* section logging |
| 869 |
> |
* pseudo {} section |
| 870 |
> |
***************************************************************************/ |
| 871 |
> |
pseudo_entry: T_PSEUDO |
| 872 |
> |
{ |
| 873 |
> |
if (conf_parser_ctx.pass == 2) |
| 874 |
> |
reset_block_state(); |
| 875 |
> |
} '{' pseudo_items '}' ';' |
| 876 |
> |
{ |
| 877 |
> |
if (conf_parser_ctx.pass != 2) |
| 878 |
> |
break; |
| 879 |
> |
|
| 880 |
> |
if (!block_state.command.buf[0] || |
| 881 |
> |
!block_state.name.buf[0] || |
| 882 |
> |
!block_state.nick.buf[0] || |
| 883 |
> |
!block_state.host.buf[0]) |
| 884 |
> |
break; |
| 885 |
> |
|
| 886 |
> |
pseudo_register(block_state.name.buf, block_state.nick.buf, block_state.host.buf, |
| 887 |
> |
block_state.prepend.buf, block_state.command.buf); |
| 888 |
> |
}; |
| 889 |
> |
|
| 890 |
> |
pseudo_items: pseudo_items pseudo_item | pseudo_item; |
| 891 |
> |
pseudo_item: pseudo_command | pseudo_prepend | pseudo_name | pseudo_target | error ';' ; |
| 892 |
> |
|
| 893 |
> |
pseudo_command: T_COMMAND '=' QSTRING ';' |
| 894 |
> |
{ |
| 895 |
> |
if (conf_parser_ctx.pass == 2) |
| 896 |
> |
strlcpy(block_state.command.buf, yylval.string, sizeof(block_state.command.buf)); |
| 897 |
> |
}; |
| 898 |
> |
|
| 899 |
> |
pseudo_name: NAME '=' QSTRING ';' |
| 900 |
> |
{ |
| 901 |
> |
if (conf_parser_ctx.pass == 2) |
| 902 |
> |
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 903 |
> |
}; |
| 904 |
> |
|
| 905 |
> |
pseudo_prepend: T_PREPEND '=' QSTRING ';' |
| 906 |
> |
{ |
| 907 |
> |
if (conf_parser_ctx.pass == 2) |
| 908 |
> |
strlcpy(block_state.prepend.buf, yylval.string, sizeof(block_state.prepend.buf)); |
| 909 |
> |
}; |
| 910 |
> |
|
| 911 |
> |
pseudo_target: T_TARGET '=' QSTRING ';' |
| 912 |
> |
{ |
| 913 |
> |
if (conf_parser_ctx.pass == 2) |
| 914 |
> |
{ |
| 915 |
> |
struct split_nuh_item nuh; |
| 916 |
> |
|
| 917 |
> |
nuh.nuhmask = yylval.string; |
| 918 |
> |
nuh.nickptr = NULL; |
| 919 |
> |
nuh.userptr = block_state.nick.buf; |
| 920 |
> |
nuh.hostptr = block_state.host.buf; |
| 921 |
> |
nuh.nicksize = 0; |
| 922 |
> |
nuh.usersize = sizeof(block_state.nick.buf); |
| 923 |
> |
nuh.hostsize = sizeof(block_state.host.buf); |
| 924 |
> |
|
| 925 |
> |
split_nuh(&nuh); |
| 926 |
> |
} |
| 927 |
> |
}; |
| 928 |
> |
|
| 929 |
> |
|
| 930 |
> |
/*************************************************************************** |
| 931 |
> |
* log {} section |
| 932 |
|
***************************************************************************/ |
| 933 |
|
logging_entry: T_LOG '{' logging_items '}' ';' ; |
| 934 |
|
logging_items: logging_items logging_item | logging_item ; |
| 993 |
|
{ |
| 994 |
|
if (conf_parser_ctx.pass == 2) |
| 995 |
|
block_state.type.value = LOG_TYPE_OPER; |
| 987 |
– |
} | GLINE |
| 988 |
– |
{ |
| 989 |
– |
if (conf_parser_ctx.pass == 2) |
| 990 |
– |
block_state.type.value = LOG_TYPE_GLINE; |
| 996 |
|
} | XLINE |
| 997 |
|
{ |
| 998 |
|
if (conf_parser_ctx.pass == 2) |
| 1021 |
|
|
| 1022 |
|
|
| 1023 |
|
/*************************************************************************** |
| 1024 |
< |
* section oper |
| 1024 |
> |
* operator {} section |
| 1025 |
|
***************************************************************************/ |
| 1026 |
|
oper_entry: OPERATOR |
| 1027 |
|
{ |
| 1032 |
|
block_state.flags.value |= CONF_FLAGS_ENCRYPTED; |
| 1033 |
|
} '{' oper_items '}' ';' |
| 1034 |
|
{ |
| 1035 |
< |
dlink_node *ptr = NULL; |
| 1035 |
> |
dlink_node *node = NULL; |
| 1036 |
|
|
| 1037 |
|
if (conf_parser_ctx.pass != 2) |
| 1038 |
|
break; |
| 1039 |
|
|
| 1040 |
|
if (!block_state.name.buf[0]) |
| 1041 |
|
break; |
| 1042 |
< |
#ifdef HAVE_LIBCRYPTO |
| 1038 |
< |
if (!block_state.file.buf[0] && |
| 1039 |
< |
!block_state.rpass.buf[0]) |
| 1040 |
< |
break; |
| 1041 |
< |
#else |
| 1042 |
> |
|
| 1043 |
|
if (!block_state.rpass.buf[0]) |
| 1044 |
|
break; |
| 1044 |
– |
#endif |
| 1045 |
|
|
| 1046 |
< |
DLINK_FOREACH(ptr, block_state.mask.list.head) |
| 1046 |
> |
DLINK_FOREACH(node, block_state.mask.list.head) |
| 1047 |
|
{ |
| 1048 |
|
struct MaskItem *conf = NULL; |
| 1049 |
|
struct split_nuh_item nuh; |
| 1050 |
+ |
char *s = node->data; |
| 1051 |
|
|
| 1052 |
< |
nuh.nuhmask = ptr->data; |
| 1052 |
> |
if (EmptyString(s)) |
| 1053 |
> |
continue; |
| 1054 |
> |
|
| 1055 |
> |
nuh.nuhmask = s; |
| 1056 |
|
nuh.nickptr = NULL; |
| 1057 |
|
nuh.userptr = block_state.user.buf; |
| 1058 |
|
nuh.hostptr = block_state.host.buf; |
| 1072 |
|
if (block_state.rpass.buf[0]) |
| 1073 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 1074 |
|
|
| 1075 |
+ |
if (block_state.whois.buf[0]) |
| 1076 |
+ |
conf->whois = xstrdup(block_state.whois.buf); |
| 1077 |
+ |
|
| 1078 |
|
conf->flags = block_state.flags.value; |
| 1079 |
|
conf->modes = block_state.modes.value; |
| 1080 |
|
conf->port = block_state.port.value; |
| 1081 |
|
conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits); |
| 1082 |
|
|
| 1083 |
|
conf_add_class_to_conf(conf, block_state.class.buf); |
| 1077 |
– |
|
| 1078 |
– |
#ifdef HAVE_LIBCRYPTO |
| 1079 |
– |
if (block_state.file.buf[0]) |
| 1080 |
– |
{ |
| 1081 |
– |
BIO *file = NULL; |
| 1082 |
– |
RSA *pkey = NULL; |
| 1083 |
– |
|
| 1084 |
– |
if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL) |
| 1085 |
– |
{ |
| 1086 |
– |
ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- file doesn't exist"); |
| 1087 |
– |
break; |
| 1088 |
– |
} |
| 1089 |
– |
|
| 1090 |
– |
if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL) |
| 1091 |
– |
ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key invalid; check key syntax"); |
| 1092 |
– |
else |
| 1093 |
– |
{ |
| 1094 |
– |
if (RSA_size(pkey) > 128) |
| 1095 |
– |
ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key size must be 1024 or below"); |
| 1096 |
– |
else |
| 1097 |
– |
conf->rsa_public_key = pkey; |
| 1098 |
– |
} |
| 1099 |
– |
|
| 1100 |
– |
BIO_set_close(file, BIO_CLOSE); |
| 1101 |
– |
BIO_free(file); |
| 1102 |
– |
} |
| 1103 |
– |
#endif /* HAVE_LIBCRYPTO */ |
| 1084 |
|
} |
| 1085 |
|
}; |
| 1086 |
|
|
| 1088 |
|
oper_item: oper_name | |
| 1089 |
|
oper_user | |
| 1090 |
|
oper_password | |
| 1091 |
+ |
oper_whois | |
| 1092 |
|
oper_umodes | |
| 1093 |
|
oper_class | |
| 1094 |
|
oper_encrypted | |
| 1114 |
– |
oper_rsa_public_key_file | |
| 1095 |
|
oper_ssl_certificate_fingerprint | |
| 1096 |
|
oper_ssl_connection_required | |
| 1097 |
|
oper_flags | |
| 1115 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 1116 |
|
}; |
| 1117 |
|
|
| 1118 |
+ |
oper_whois: WHOIS '=' QSTRING ';' |
| 1119 |
+ |
{ |
| 1120 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1121 |
+ |
strlcpy(block_state.whois.buf, yylval.string, sizeof(block_state.whois.buf)); |
| 1122 |
+ |
}; |
| 1123 |
+ |
|
| 1124 |
|
oper_encrypted: ENCRYPTED '=' TBOOL ';' |
| 1125 |
|
{ |
| 1126 |
|
if (conf_parser_ctx.pass != 2) |
| 1132 |
|
block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED; |
| 1133 |
|
}; |
| 1134 |
|
|
| 1149 |
– |
oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';' |
| 1150 |
– |
{ |
| 1151 |
– |
if (conf_parser_ctx.pass == 2) |
| 1152 |
– |
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 1153 |
– |
}; |
| 1154 |
– |
|
| 1135 |
|
oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';' |
| 1136 |
|
{ |
| 1137 |
|
if (conf_parser_ctx.pass == 2) |
| 1307 |
|
{ |
| 1308 |
|
if (conf_parser_ctx.pass == 2) |
| 1309 |
|
block_state.port.value |= OPER_FLAG_UNXLINE; |
| 1330 |
– |
} | GLINE |
| 1331 |
– |
{ |
| 1332 |
– |
if (conf_parser_ctx.pass == 2) |
| 1333 |
– |
block_state.port.value |= OPER_FLAG_GLINE; |
| 1310 |
|
} | DIE |
| 1311 |
|
{ |
| 1312 |
|
if (conf_parser_ctx.pass == 2) |
| 1315 |
|
{ |
| 1316 |
|
if (conf_parser_ctx.pass == 2) |
| 1317 |
|
block_state.port.value |= OPER_FLAG_RESTART; |
| 1318 |
+ |
} | REHASH ':' REMOTE |
| 1319 |
+ |
{ |
| 1320 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1321 |
+ |
block_state.port.value |= OPER_FLAG_REHASH_REMOTE; |
| 1322 |
|
} | REHASH |
| 1323 |
|
{ |
| 1324 |
|
if (conf_parser_ctx.pass == 2) |
| 1351 |
|
{ |
| 1352 |
|
if (conf_parser_ctx.pass == 2) |
| 1353 |
|
block_state.port.value |= OPER_FLAG_MODULE; |
| 1354 |
+ |
} | T_OPME |
| 1355 |
+ |
{ |
| 1356 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1357 |
+ |
block_state.port.value |= OPER_FLAG_OPME; |
| 1358 |
+ |
} | NICK ':' RESV |
| 1359 |
+ |
{ |
| 1360 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1361 |
+ |
block_state.port.value |= OPER_FLAG_NICK_RESV; |
| 1362 |
+ |
} | JOIN ':' RESV |
| 1363 |
+ |
{ |
| 1364 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1365 |
+ |
block_state.port.value |= OPER_FLAG_JOIN_RESV; |
| 1366 |
+ |
} | RESV |
| 1367 |
+ |
{ |
| 1368 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1369 |
+ |
block_state.port.value |= OPER_FLAG_RESV; |
| 1370 |
+ |
} | T_UNRESV |
| 1371 |
+ |
{ |
| 1372 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1373 |
+ |
block_state.port.value |= OPER_FLAG_UNRESV; |
| 1374 |
+ |
} | CLOSE |
| 1375 |
+ |
{ |
| 1376 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1377 |
+ |
block_state.port.value |= OPER_FLAG_CLOSE; |
| 1378 |
|
}; |
| 1379 |
|
|
| 1380 |
|
|
| 1381 |
|
/*************************************************************************** |
| 1382 |
< |
* section class |
| 1382 |
> |
* class {} section |
| 1383 |
|
***************************************************************************/ |
| 1384 |
|
class_entry: CLASS |
| 1385 |
|
{ |
| 1407 |
|
class = class_make(); |
| 1408 |
|
|
| 1409 |
|
class->active = 1; |
| 1410 |
< |
MyFree(class->name); |
| 1410 |
> |
xfree(class->name); |
| 1411 |
|
class->name = xstrdup(block_state.class.buf); |
| 1412 |
|
class->ping_freq = block_state.ping_freq.value; |
| 1413 |
|
class->max_perip = block_state.max_perip.value; |
| 1415 |
|
class->max_total = block_state.max_total.value; |
| 1416 |
|
class->max_global = block_state.max_global.value; |
| 1417 |
|
class->max_local = block_state.max_local.value; |
| 1414 |
– |
class->max_ident = block_state.max_ident.value; |
| 1418 |
|
class->max_sendq = block_state.max_sendq.value; |
| 1419 |
|
class->max_recvq = block_state.max_recvq.value; |
| 1420 |
|
class->max_channels = block_state.max_channels.value; |
| 1430 |
|
class->min_idle = block_state.min_idle.value; |
| 1431 |
|
class->max_idle = block_state.max_idle.value; |
| 1432 |
|
|
| 1433 |
< |
if (class->number_per_cidr && block_state.number_per_cidr.value) |
| 1431 |
< |
if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) || |
| 1432 |
< |
(class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value)) |
| 1433 |
< |
if ((class->cidr_bitlen_ipv4 != block_state.cidr_bitlen_ipv4.value) || |
| 1434 |
< |
(class->cidr_bitlen_ipv6 != block_state.cidr_bitlen_ipv6.value)) |
| 1435 |
< |
rebuild_cidr_list(class); |
| 1433 |
> |
rebuild_cidr_list(class); |
| 1434 |
|
|
| 1435 |
|
class->cidr_bitlen_ipv4 = block_state.cidr_bitlen_ipv4.value; |
| 1436 |
|
class->cidr_bitlen_ipv6 = block_state.cidr_bitlen_ipv6.value; |
| 1449 |
|
class_max_number | |
| 1450 |
|
class_max_global | |
| 1451 |
|
class_max_local | |
| 1452 |
< |
class_max_ident | |
| 1453 |
< |
class_sendq | class_recvq | |
| 1452 |
> |
class_sendq | |
| 1453 |
> |
class_recvq | |
| 1454 |
|
class_min_idle | |
| 1455 |
|
class_max_idle | |
| 1456 |
|
class_flags | |
| 1504 |
|
block_state.max_local.value = $3; |
| 1505 |
|
}; |
| 1506 |
|
|
| 1509 |
– |
class_max_ident: MAX_IDENT '=' NUMBER ';' |
| 1510 |
– |
{ |
| 1511 |
– |
if (conf_parser_ctx.pass == 1) |
| 1512 |
– |
block_state.max_ident.value = $3; |
| 1513 |
– |
}; |
| 1514 |
– |
|
| 1507 |
|
class_sendq: SENDQ '=' sizespec ';' |
| 1508 |
|
{ |
| 1509 |
|
if (conf_parser_ctx.pass == 1) |
| 1572 |
|
|
| 1573 |
|
|
| 1574 |
|
/*************************************************************************** |
| 1575 |
< |
* section listen |
| 1575 |
> |
* listen {} section |
| 1576 |
|
***************************************************************************/ |
| 1577 |
|
listen_entry: LISTEN |
| 1578 |
|
{ |
| 1611 |
|
{ |
| 1612 |
|
if (conf_parser_ctx.pass == 2) |
| 1613 |
|
{ |
| 1614 |
< |
#ifndef HAVE_LIBCRYPTO |
| 1614 |
> |
#ifndef HAVE_TLS |
| 1615 |
|
if (block_state.flags.value & LISTENER_SSL) |
| 1616 |
|
{ |
| 1617 |
< |
conf_error_report("SSL not available - port closed"); |
| 1617 |
> |
conf_error_report("TLS not available - port closed"); |
| 1618 |
|
break; |
| 1619 |
|
} |
| 1620 |
|
#endif |
| 1621 |
< |
add_listener($1, block_state.addr.buf, block_state.flags.value); |
| 1621 |
> |
listener_add($1, block_state.addr.buf, block_state.flags.value); |
| 1622 |
|
} |
| 1623 |
|
} | NUMBER TWODOTS NUMBER |
| 1624 |
|
{ |
| 1625 |
|
if (conf_parser_ctx.pass == 2) |
| 1626 |
|
{ |
| 1627 |
< |
#ifndef HAVE_LIBCRYPTO |
| 1627 |
> |
#ifndef HAVE_TLS |
| 1628 |
|
if (block_state.flags.value & LISTENER_SSL) |
| 1629 |
|
{ |
| 1630 |
< |
conf_error_report("SSL not available - port closed"); |
| 1630 |
> |
conf_error_report("TLS not available - port closed"); |
| 1631 |
|
break; |
| 1632 |
|
} |
| 1633 |
|
#endif |
| 1634 |
|
|
| 1635 |
|
for (int i = $1; i <= $3; ++i) |
| 1636 |
< |
add_listener(i, block_state.addr.buf, block_state.flags.value); |
| 1636 |
> |
listener_add(i, block_state.addr.buf, block_state.flags.value); |
| 1637 |
|
} |
| 1638 |
|
}; |
| 1639 |
|
|
| 1649 |
|
strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf)); |
| 1650 |
|
}; |
| 1651 |
|
|
| 1652 |
+ |
|
| 1653 |
|
/*************************************************************************** |
| 1654 |
< |
* section auth |
| 1654 |
> |
* auth {} section |
| 1655 |
|
***************************************************************************/ |
| 1656 |
|
auth_entry: IRCD_AUTH |
| 1657 |
|
{ |
| 1659 |
|
reset_block_state(); |
| 1660 |
|
} '{' auth_items '}' ';' |
| 1661 |
|
{ |
| 1662 |
< |
dlink_node *ptr = NULL; |
| 1662 |
> |
dlink_node *node = NULL; |
| 1663 |
|
|
| 1664 |
|
if (conf_parser_ctx.pass != 2) |
| 1665 |
|
break; |
| 1666 |
|
|
| 1667 |
< |
DLINK_FOREACH(ptr, block_state.mask.list.head) |
| 1667 |
> |
DLINK_FOREACH(node, block_state.mask.list.head) |
| 1668 |
|
{ |
| 1669 |
|
struct MaskItem *conf = NULL; |
| 1670 |
|
struct split_nuh_item nuh; |
| 1671 |
+ |
char *s = node->data; |
| 1672 |
|
|
| 1673 |
< |
nuh.nuhmask = ptr->data; |
| 1673 |
> |
if (EmptyString(s)) |
| 1674 |
> |
continue; |
| 1675 |
> |
|
| 1676 |
> |
nuh.nuhmask = s; |
| 1677 |
|
nuh.nickptr = NULL; |
| 1678 |
|
nuh.userptr = block_state.user.buf; |
| 1679 |
|
nuh.hostptr = block_state.host.buf; |
| 1758 |
|
{ |
| 1759 |
|
if (conf_parser_ctx.pass == 2) |
| 1760 |
|
block_state.flags.value |= CONF_FLAGS_EXEMPTKLINE; |
| 1761 |
+ |
} | XLINE_EXEMPT |
| 1762 |
+ |
{ |
| 1763 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1764 |
+ |
block_state.flags.value |= CONF_FLAGS_EXEMPTXLINE; |
| 1765 |
|
} | NEED_IDENT |
| 1766 |
|
{ |
| 1767 |
|
if (conf_parser_ctx.pass == 2) |
| 1774 |
|
{ |
| 1775 |
|
if (conf_parser_ctx.pass == 2) |
| 1776 |
|
block_state.flags.value |= CONF_FLAGS_NO_TILDE; |
| 1776 |
– |
} | GLINE_EXEMPT |
| 1777 |
– |
{ |
| 1778 |
– |
if (conf_parser_ctx.pass == 2) |
| 1779 |
– |
block_state.flags.value |= CONF_FLAGS_EXEMPTGLINE; |
| 1777 |
|
} | RESV_EXEMPT |
| 1778 |
|
{ |
| 1779 |
|
if (conf_parser_ctx.pass == 2) |
| 1822 |
|
|
| 1823 |
|
|
| 1824 |
|
/*************************************************************************** |
| 1825 |
< |
* section resv |
| 1825 |
> |
* resv {} section |
| 1826 |
|
***************************************************************************/ |
| 1827 |
|
resv_entry: RESV |
| 1828 |
|
{ |
| 1836 |
|
if (conf_parser_ctx.pass != 2) |
| 1837 |
|
break; |
| 1838 |
|
|
| 1839 |
< |
create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list); |
| 1839 |
> |
resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list); |
| 1840 |
|
}; |
| 1841 |
|
|
| 1842 |
|
resv_items: resv_items resv_item | resv_item; |
| 1862 |
|
|
| 1863 |
|
|
| 1864 |
|
/*************************************************************************** |
| 1865 |
< |
* section service |
| 1865 |
> |
* service {} section |
| 1866 |
|
***************************************************************************/ |
| 1867 |
|
service_entry: T_SERVICE '{' service_items '}' ';'; |
| 1868 |
|
|
| 1876 |
|
|
| 1877 |
|
if (valid_servname(yylval.string)) |
| 1878 |
|
{ |
| 1879 |
< |
struct MaskItem *conf = conf_make(CONF_SERVICE); |
| 1880 |
< |
conf->name = xstrdup(yylval.string); |
| 1879 |
> |
struct ServiceItem *service = service_make(); |
| 1880 |
> |
service->name = xstrdup(yylval.string); |
| 1881 |
|
} |
| 1882 |
|
}; |
| 1883 |
|
|
| 1884 |
+ |
|
| 1885 |
|
/*************************************************************************** |
| 1886 |
< |
* section shared, for sharing remote klines etc. |
| 1886 |
> |
* shared {} section, for sharing remote klines etc. |
| 1887 |
|
***************************************************************************/ |
| 1888 |
|
shared_entry: T_SHARED |
| 1889 |
|
{ |
| 1898 |
|
block_state.flags.value = SHARED_ALL; |
| 1899 |
|
} '{' shared_items '}' ';' |
| 1900 |
|
{ |
| 1903 |
– |
struct MaskItem *conf = NULL; |
| 1904 |
– |
|
| 1901 |
|
if (conf_parser_ctx.pass != 2) |
| 1902 |
|
break; |
| 1903 |
|
|
| 1904 |
< |
conf = conf_make(CONF_ULINE); |
| 1905 |
< |
conf->flags = block_state.flags.value; |
| 1906 |
< |
conf->name = xstrdup(block_state.name.buf); |
| 1907 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 1908 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 1904 |
> |
struct SharedItem *shared = shared_make(); |
| 1905 |
> |
shared->type = block_state.flags.value; |
| 1906 |
> |
shared->server = xstrdup(block_state.name.buf); |
| 1907 |
> |
shared->user = xstrdup(block_state.user.buf); |
| 1908 |
> |
shared->host = xstrdup(block_state.host.buf); |
| 1909 |
|
}; |
| 1910 |
|
|
| 1911 |
|
shared_items: shared_items shared_item | shared_item; |
| 1985 |
|
block_state.flags.value = SHARED_ALL; |
| 1986 |
|
}; |
| 1987 |
|
|
| 1988 |
+ |
|
| 1989 |
|
/*************************************************************************** |
| 1990 |
< |
* section cluster |
| 1990 |
> |
* cluster {} section |
| 1991 |
|
***************************************************************************/ |
| 1992 |
|
cluster_entry: T_CLUSTER |
| 1993 |
|
{ |
| 1997 |
|
reset_block_state(); |
| 1998 |
|
|
| 1999 |
|
strlcpy(block_state.name.buf, "*", sizeof(block_state.name.buf)); |
| 2000 |
< |
block_state.flags.value = SHARED_ALL; |
| 2000 |
> |
block_state.flags.value = CLUSTER_ALL; |
| 2001 |
|
} '{' cluster_items '}' ';' |
| 2002 |
|
{ |
| 2006 |
– |
struct MaskItem *conf = NULL; |
| 2007 |
– |
|
| 2003 |
|
if (conf_parser_ctx.pass != 2) |
| 2004 |
|
break; |
| 2005 |
|
|
| 2006 |
< |
conf = conf_make(CONF_CLUSTER); |
| 2007 |
< |
conf->flags = block_state.flags.value; |
| 2008 |
< |
conf->name = xstrdup(block_state.name.buf); |
| 2006 |
> |
struct ClusterItem *cluster = cluster_make(); |
| 2007 |
> |
cluster->type = block_state.flags.value; |
| 2008 |
> |
cluster->server = xstrdup(block_state.name.buf); |
| 2009 |
|
}; |
| 2010 |
|
|
| 2011 |
|
cluster_items: cluster_items cluster_item | cluster_item; |
| 2027 |
|
cluster_type_item: KLINE |
| 2028 |
|
{ |
| 2029 |
|
if (conf_parser_ctx.pass == 2) |
| 2030 |
< |
block_state.flags.value |= SHARED_KLINE; |
| 2030 |
> |
block_state.flags.value |= CLUSTER_KLINE; |
| 2031 |
|
} | UNKLINE |
| 2032 |
|
{ |
| 2033 |
|
if (conf_parser_ctx.pass == 2) |
| 2034 |
< |
block_state.flags.value |= SHARED_UNKLINE; |
| 2034 |
> |
block_state.flags.value |= CLUSTER_UNKLINE; |
| 2035 |
|
} | T_DLINE |
| 2036 |
|
{ |
| 2037 |
|
if (conf_parser_ctx.pass == 2) |
| 2038 |
< |
block_state.flags.value |= SHARED_DLINE; |
| 2038 |
> |
block_state.flags.value |= CLUSTER_DLINE; |
| 2039 |
|
} | T_UNDLINE |
| 2040 |
|
{ |
| 2041 |
|
if (conf_parser_ctx.pass == 2) |
| 2042 |
< |
block_state.flags.value |= SHARED_UNDLINE; |
| 2042 |
> |
block_state.flags.value |= CLUSTER_UNDLINE; |
| 2043 |
|
} | XLINE |
| 2044 |
|
{ |
| 2045 |
|
if (conf_parser_ctx.pass == 2) |
| 2046 |
< |
block_state.flags.value |= SHARED_XLINE; |
| 2046 |
> |
block_state.flags.value |= CLUSTER_XLINE; |
| 2047 |
|
} | T_UNXLINE |
| 2048 |
|
{ |
| 2049 |
|
if (conf_parser_ctx.pass == 2) |
| 2050 |
< |
block_state.flags.value |= SHARED_UNXLINE; |
| 2050 |
> |
block_state.flags.value |= CLUSTER_UNXLINE; |
| 2051 |
|
} | RESV |
| 2052 |
|
{ |
| 2053 |
|
if (conf_parser_ctx.pass == 2) |
| 2054 |
< |
block_state.flags.value |= SHARED_RESV; |
| 2054 |
> |
block_state.flags.value |= CLUSTER_RESV; |
| 2055 |
|
} | T_UNRESV |
| 2056 |
|
{ |
| 2057 |
|
if (conf_parser_ctx.pass == 2) |
| 2058 |
< |
block_state.flags.value |= SHARED_UNRESV; |
| 2058 |
> |
block_state.flags.value |= CLUSTER_UNRESV; |
| 2059 |
|
} | T_LOCOPS |
| 2060 |
|
{ |
| 2061 |
|
if (conf_parser_ctx.pass == 2) |
| 2062 |
< |
block_state.flags.value |= SHARED_LOCOPS; |
| 2062 |
> |
block_state.flags.value |= CLUSTER_LOCOPS; |
| 2063 |
|
} | T_ALL |
| 2064 |
|
{ |
| 2065 |
|
if (conf_parser_ctx.pass == 2) |
| 2066 |
< |
block_state.flags.value = SHARED_ALL; |
| 2066 |
> |
block_state.flags.value = CLUSTER_ALL; |
| 2067 |
|
}; |
| 2068 |
|
|
| 2069 |
+ |
|
| 2070 |
|
/*************************************************************************** |
| 2071 |
< |
* section connect |
| 2071 |
> |
* connect {} section |
| 2072 |
|
***************************************************************************/ |
| 2073 |
|
connect_entry: CONNECT |
| 2074 |
|
{ |
| 2272 |
|
|
| 2273 |
|
connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';' |
| 2274 |
|
{ |
| 2275 |
< |
#ifdef HAVE_LIBCRYPTO |
| 2275 |
> |
#ifdef HAVE_TLS |
| 2276 |
|
if (conf_parser_ctx.pass == 2) |
| 2277 |
|
strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf)); |
| 2278 |
|
#else |
| 2279 |
|
if (conf_parser_ctx.pass == 2) |
| 2280 |
< |
conf_error_report("Ignoring connect::ciphers -- no OpenSSL support"); |
| 2280 |
> |
conf_error_report("Ignoring connect::ciphers -- no TLS support"); |
| 2281 |
|
#endif |
| 2282 |
|
}; |
| 2283 |
|
|
| 2284 |
|
|
| 2285 |
|
/*************************************************************************** |
| 2286 |
< |
* section kill |
| 2286 |
> |
* kill {} section |
| 2287 |
|
***************************************************************************/ |
| 2288 |
|
kill_entry: KILL |
| 2289 |
|
{ |
| 2340 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2341 |
|
}; |
| 2342 |
|
|
| 2343 |
+ |
|
| 2344 |
|
/*************************************************************************** |
| 2345 |
< |
* section deny |
| 2345 |
> |
* deny {} section |
| 2346 |
|
***************************************************************************/ |
| 2347 |
|
deny_entry: DENY |
| 2348 |
|
{ |
| 2386 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2387 |
|
}; |
| 2388 |
|
|
| 2389 |
+ |
|
| 2390 |
|
/*************************************************************************** |
| 2391 |
< |
* section exempt |
| 2391 |
> |
* exempt {} section |
| 2392 |
|
***************************************************************************/ |
| 2393 |
|
exempt_entry: EXEMPT '{' exempt_items '}' ';'; |
| 2394 |
|
|
| 2395 |
< |
exempt_items: exempt_items exempt_item | exempt_item; |
| 2396 |
< |
exempt_item: exempt_ip | error; |
| 2395 |
> |
exempt_items: exempt_items exempt_item | exempt_item; |
| 2396 |
> |
exempt_item: exempt_ip | error; |
| 2397 |
|
|
| 2398 |
|
exempt_ip: IP '=' QSTRING ';' |
| 2399 |
|
{ |
| 2400 |
|
if (conf_parser_ctx.pass == 2) |
| 2401 |
|
{ |
| 2402 |
< |
if (yylval.string[0] && parse_netmask(yylval.string, NULL, NULL) != HM_HOST) |
| 2402 |
> |
if (*yylval.string && parse_netmask(yylval.string, NULL, NULL) != HM_HOST) |
| 2403 |
|
{ |
| 2404 |
|
struct MaskItem *conf = conf_make(CONF_EXEMPT); |
| 2405 |
|
conf->host = xstrdup(yylval.string); |
| 2410 |
|
}; |
| 2411 |
|
|
| 2412 |
|
/*************************************************************************** |
| 2413 |
< |
* section gecos |
| 2413 |
> |
* gecos {} section |
| 2414 |
|
***************************************************************************/ |
| 2415 |
|
gecos_entry: GECOS |
| 2416 |
|
{ |
| 2418 |
|
reset_block_state(); |
| 2419 |
|
} '{' gecos_items '}' ';' |
| 2420 |
|
{ |
| 2423 |
– |
struct MaskItem *conf = NULL; |
| 2424 |
– |
|
| 2421 |
|
if (conf_parser_ctx.pass != 2) |
| 2422 |
|
break; |
| 2423 |
|
|
| 2424 |
|
if (!block_state.name.buf[0]) |
| 2425 |
|
break; |
| 2426 |
|
|
| 2427 |
< |
conf = conf_make(CONF_XLINE); |
| 2428 |
< |
conf->name = xstrdup(block_state.name.buf); |
| 2427 |
> |
struct GecosItem *gecos = gecos_make(); |
| 2428 |
> |
gecos->mask = xstrdup(block_state.name.buf); |
| 2429 |
|
|
| 2430 |
|
if (block_state.rpass.buf[0]) |
| 2431 |
< |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2431 |
> |
gecos->reason = xstrdup(block_state.rpass.buf); |
| 2432 |
|
else |
| 2433 |
< |
conf->reason = xstrdup(CONF_NOREASON); |
| 2433 |
> |
gecos->reason = xstrdup(CONF_NOREASON); |
| 2434 |
|
}; |
| 2435 |
|
|
| 2436 |
|
gecos_items: gecos_items gecos_item | gecos_item; |
| 2448 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2449 |
|
}; |
| 2450 |
|
|
| 2451 |
+ |
|
| 2452 |
|
/*************************************************************************** |
| 2453 |
< |
* section general |
| 2453 |
> |
* general {} section |
| 2454 |
|
***************************************************************************/ |
| 2455 |
< |
general_entry: GENERAL |
| 2459 |
< |
'{' general_items '}' ';'; |
| 2455 |
> |
general_entry: GENERAL '{' general_items '}' ';'; |
| 2456 |
|
|
| 2457 |
|
general_items: general_items general_item | general_item; |
| 2458 |
|
general_item: general_away_count | |
| 2459 |
|
general_away_time | |
| 2464 |
– |
general_hide_spoof_ips | |
| 2460 |
|
general_ignore_bogus_ts | |
| 2461 |
|
general_failed_oper_notice | |
| 2462 |
|
general_anti_nick_flood | |
| 2463 |
|
general_max_nick_time | |
| 2464 |
|
general_max_nick_changes | |
| 2465 |
|
general_max_accept | |
| 2466 |
+ |
general_whowas_history_length | |
| 2467 |
|
general_anti_spam_exit_message_time | |
| 2468 |
|
general_ts_warn_delta | |
| 2469 |
|
general_ts_max_delta | |
| 2471 |
|
general_invisible_on_connect | |
| 2472 |
|
general_warn_no_connect_block | |
| 2473 |
|
general_dots_in_ident | |
| 2478 |
– |
general_stats_o_oper_only | |
| 2479 |
– |
general_stats_k_oper_only | |
| 2480 |
– |
general_pace_wait | |
| 2474 |
|
general_stats_i_oper_only | |
| 2475 |
< |
general_pace_wait_simple | |
| 2475 |
> |
general_stats_k_oper_only | |
| 2476 |
> |
general_stats_m_oper_only | |
| 2477 |
> |
general_stats_o_oper_only | |
| 2478 |
|
general_stats_P_oper_only | |
| 2479 |
|
general_stats_u_oper_only | |
| 2480 |
+ |
general_pace_wait | |
| 2481 |
+ |
general_pace_wait_simple | |
| 2482 |
|
general_short_motd | |
| 2483 |
|
general_no_oper_flood | |
| 2487 |
– |
general_true_no_oper_flood | |
| 2488 |
– |
general_oper_pass_resv | |
| 2484 |
|
general_oper_only_umodes | |
| 2485 |
|
general_max_targets | |
| 2486 |
|
general_oper_umodes | |
| 2491 |
|
general_min_nonwildcard_simple | |
| 2492 |
|
general_throttle_count | |
| 2493 |
|
general_throttle_time | |
| 2499 |
– |
general_havent_read_conf | |
| 2494 |
|
general_ping_cookie | |
| 2495 |
|
general_disable_auth | |
| 2496 |
|
general_tkline_expire_notices | |
| 2497 |
< |
general_gline_enable | |
| 2498 |
< |
general_gline_duration | |
| 2499 |
< |
general_gline_request_duration | |
| 2500 |
< |
general_gline_min_cidr | |
| 2507 |
< |
general_gline_min_cidr6 | |
| 2497 |
> |
general_dline_min_cidr | |
| 2498 |
> |
general_dline_min_cidr6 | |
| 2499 |
> |
general_kline_min_cidr | |
| 2500 |
> |
general_kline_min_cidr6 | |
| 2501 |
|
general_stats_e_disabled | |
| 2502 |
|
general_max_watch | |
| 2510 |
– |
general_services_name | |
| 2503 |
|
general_cycle_on_host_change | |
| 2504 |
|
error; |
| 2505 |
|
|
| 2519 |
|
ConfigGeneral.max_watch = $3; |
| 2520 |
|
}; |
| 2521 |
|
|
| 2522 |
< |
general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';' |
| 2522 |
> |
general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';' |
| 2523 |
|
{ |
| 2524 |
< |
if (conf_parser_ctx.pass == 2) |
| 2533 |
< |
ConfigGeneral.cycle_on_host_change = yylval.number; |
| 2524 |
> |
ConfigGeneral.whowas_history_length = $3; |
| 2525 |
|
}; |
| 2526 |
|
|
| 2527 |
< |
general_gline_enable: GLINE_ENABLE '=' TBOOL ';' |
| 2527 |
> |
general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';' |
| 2528 |
|
{ |
| 2529 |
|
if (conf_parser_ctx.pass == 2) |
| 2530 |
< |
ConfigGeneral.glines = yylval.number; |
| 2530 |
> |
ConfigGeneral.cycle_on_host_change = yylval.number; |
| 2531 |
|
}; |
| 2532 |
|
|
| 2533 |
< |
general_gline_duration: GLINE_DURATION '=' timespec ';' |
| 2533 |
> |
general_dline_min_cidr: DLINE_MIN_CIDR '=' NUMBER ';' |
| 2534 |
|
{ |
| 2535 |
< |
if (conf_parser_ctx.pass == 2) |
| 2545 |
< |
ConfigGeneral.gline_time = $3; |
| 2535 |
> |
ConfigGeneral.dline_min_cidr = $3; |
| 2536 |
|
}; |
| 2537 |
|
|
| 2538 |
< |
general_gline_request_duration: GLINE_REQUEST_DURATION '=' timespec ';' |
| 2538 |
> |
general_dline_min_cidr6: DLINE_MIN_CIDR6 '=' NUMBER ';' |
| 2539 |
|
{ |
| 2540 |
< |
if (conf_parser_ctx.pass == 2) |
| 2551 |
< |
ConfigGeneral.gline_request_time = $3; |
| 2540 |
> |
ConfigGeneral.dline_min_cidr6 = $3; |
| 2541 |
|
}; |
| 2542 |
|
|
| 2543 |
< |
general_gline_min_cidr: GLINE_MIN_CIDR '=' NUMBER ';' |
| 2543 |
> |
general_kline_min_cidr: KLINE_MIN_CIDR '=' NUMBER ';' |
| 2544 |
|
{ |
| 2545 |
< |
ConfigGeneral.gline_min_cidr = $3; |
| 2545 |
> |
ConfigGeneral.kline_min_cidr = $3; |
| 2546 |
|
}; |
| 2547 |
|
|
| 2548 |
< |
general_gline_min_cidr6: GLINE_MIN_CIDR6 '=' NUMBER ';' |
| 2548 |
> |
general_kline_min_cidr6: KLINE_MIN_CIDR6 '=' NUMBER ';' |
| 2549 |
|
{ |
| 2550 |
< |
ConfigGeneral.gline_min_cidr6 = $3; |
| 2550 |
> |
ConfigGeneral.kline_min_cidr6 = $3; |
| 2551 |
|
}; |
| 2552 |
|
|
| 2553 |
|
general_tkline_expire_notices: TKLINE_EXPIRE_NOTICES '=' TBOOL ';' |
| 2560 |
|
ConfigGeneral.kill_chase_time_limit = $3; |
| 2561 |
|
}; |
| 2562 |
|
|
| 2574 |
– |
general_hide_spoof_ips: HIDE_SPOOF_IPS '=' TBOOL ';' |
| 2575 |
– |
{ |
| 2576 |
– |
ConfigGeneral.hide_spoof_ips = yylval.number; |
| 2577 |
– |
}; |
| 2578 |
– |
|
| 2563 |
|
general_ignore_bogus_ts: IGNORE_BOGUS_TS '=' TBOOL ';' |
| 2564 |
|
{ |
| 2565 |
|
ConfigGeneral.ignore_bogus_ts = yylval.number; |
| 2606 |
|
ConfigGeneral.ts_max_delta = $3; |
| 2607 |
|
}; |
| 2608 |
|
|
| 2625 |
– |
general_havent_read_conf: HAVENT_READ_CONF '=' NUMBER ';' |
| 2626 |
– |
{ |
| 2627 |
– |
if (($3 > 0) && conf_parser_ctx.pass == 1) |
| 2628 |
– |
{ |
| 2629 |
– |
ilog(LOG_TYPE_IRCD, "You haven't read your config file properly."); |
| 2630 |
– |
ilog(LOG_TYPE_IRCD, "There is a line in the example conf that will kill your server if not removed."); |
| 2631 |
– |
ilog(LOG_TYPE_IRCD, "Consider actually reading/editing the conf file, and removing this line."); |
| 2632 |
– |
exit(0); |
| 2633 |
– |
} |
| 2634 |
– |
}; |
| 2635 |
– |
|
| 2609 |
|
general_invisible_on_connect: INVISIBLE_ON_CONNECT '=' TBOOL ';' |
| 2610 |
|
{ |
| 2611 |
|
ConfigGeneral.invisible_on_connect = yylval.number; |
| 2621 |
|
ConfigGeneral.stats_e_disabled = yylval.number; |
| 2622 |
|
}; |
| 2623 |
|
|
| 2624 |
+ |
general_stats_m_oper_only: STATS_M_OPER_ONLY '=' TBOOL ';' |
| 2625 |
+ |
{ |
| 2626 |
+ |
ConfigGeneral.stats_m_oper_only = yylval.number; |
| 2627 |
+ |
}; |
| 2628 |
+ |
|
| 2629 |
|
general_stats_o_oper_only: STATS_O_OPER_ONLY '=' TBOOL ';' |
| 2630 |
|
{ |
| 2631 |
|
ConfigGeneral.stats_o_oper_only = yylval.number; |
| 2687 |
|
ConfigGeneral.no_oper_flood = yylval.number; |
| 2688 |
|
}; |
| 2689 |
|
|
| 2712 |
– |
general_true_no_oper_flood: TRUE_NO_OPER_FLOOD '=' TBOOL ';' |
| 2713 |
– |
{ |
| 2714 |
– |
ConfigGeneral.true_no_oper_flood = yylval.number; |
| 2715 |
– |
}; |
| 2716 |
– |
|
| 2717 |
– |
general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';' |
| 2718 |
– |
{ |
| 2719 |
– |
ConfigGeneral.oper_pass_resv = yylval.number; |
| 2720 |
– |
}; |
| 2721 |
– |
|
| 2690 |
|
general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';' |
| 2691 |
|
{ |
| 2692 |
|
ConfigGeneral.dots_in_ident = $3; |
| 2697 |
|
ConfigGeneral.max_targets = $3; |
| 2698 |
|
}; |
| 2699 |
|
|
| 2732 |
– |
general_services_name: T_SERVICES_NAME '=' QSTRING ';' |
| 2733 |
– |
{ |
| 2734 |
– |
if (conf_parser_ctx.pass == 2 && valid_servname(yylval.string)) |
| 2735 |
– |
{ |
| 2736 |
– |
MyFree(ConfigGeneral.service_name); |
| 2737 |
– |
ConfigGeneral.service_name = xstrdup(yylval.string); |
| 2738 |
– |
} |
| 2739 |
– |
}; |
| 2740 |
– |
|
| 2700 |
|
general_ping_cookie: PING_COOKIE '=' TBOOL ';' |
| 2701 |
|
{ |
| 2702 |
|
ConfigGeneral.ping_cookie = yylval.number; |
| 2876 |
|
|
| 2877 |
|
|
| 2878 |
|
/*************************************************************************** |
| 2879 |
< |
* section channel |
| 2879 |
> |
* channel {} section |
| 2880 |
|
***************************************************************************/ |
| 2881 |
< |
channel_entry: CHANNEL |
| 2923 |
< |
'{' channel_items '}' ';'; |
| 2881 |
> |
channel_entry: CHANNEL '{' channel_items '}' ';'; |
| 2882 |
|
|
| 2883 |
|
channel_items: channel_items channel_item | channel_item; |
| 2884 |
|
channel_item: channel_max_bans | |
| 2885 |
|
channel_invite_client_count | |
| 2886 |
|
channel_invite_client_time | |
| 2887 |
+ |
channel_invite_delay_channel | |
| 2888 |
+ |
channel_invite_expire_time | |
| 2889 |
|
channel_knock_client_count | |
| 2890 |
|
channel_knock_client_time | |
| 2891 |
|
channel_knock_delay_channel | |
| 2892 |
|
channel_max_channels | |
| 2893 |
< |
channel_default_split_user_count | |
| 2894 |
< |
channel_default_split_server_count | |
| 2895 |
< |
channel_no_create_on_split | |
| 2936 |
< |
channel_no_join_on_split | |
| 2937 |
< |
channel_jflood_count | |
| 2938 |
< |
channel_jflood_time | |
| 2893 |
> |
channel_max_invites | |
| 2894 |
> |
channel_default_join_flood_count | |
| 2895 |
> |
channel_default_join_flood_time | |
| 2896 |
|
channel_disable_fake_channels | |
| 2897 |
|
error; |
| 2898 |
|
|
| 2911 |
|
ConfigChannel.invite_client_time = $3; |
| 2912 |
|
}; |
| 2913 |
|
|
| 2914 |
+ |
channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';' |
| 2915 |
+ |
{ |
| 2916 |
+ |
ConfigChannel.invite_delay_channel = $3; |
| 2917 |
+ |
}; |
| 2918 |
+ |
|
| 2919 |
+ |
channel_invite_expire_time: INVITE_EXPIRE_TIME '=' timespec ';' |
| 2920 |
+ |
{ |
| 2921 |
+ |
ConfigChannel.invite_expire_time = $3; |
| 2922 |
+ |
}; |
| 2923 |
+ |
|
| 2924 |
|
channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';' |
| 2925 |
|
{ |
| 2926 |
|
ConfigChannel.knock_client_count = $3; |
| 2941 |
|
ConfigChannel.max_channels = $3; |
| 2942 |
|
}; |
| 2943 |
|
|
| 2944 |
< |
channel_max_bans: MAX_BANS '=' NUMBER ';' |
| 2944 |
> |
channel_max_invites: MAX_INVITES '=' NUMBER ';' |
| 2945 |
|
{ |
| 2946 |
< |
ConfigChannel.max_bans = $3; |
| 2946 |
> |
ConfigChannel.max_invites = $3; |
| 2947 |
|
}; |
| 2948 |
|
|
| 2949 |
< |
channel_default_split_user_count: DEFAULT_SPLIT_USER_COUNT '=' NUMBER ';' |
| 2983 |
< |
{ |
| 2984 |
< |
ConfigChannel.default_split_user_count = $3; |
| 2985 |
< |
}; |
| 2986 |
< |
|
| 2987 |
< |
channel_default_split_server_count: DEFAULT_SPLIT_SERVER_COUNT '=' NUMBER ';' |
| 2949 |
> |
channel_max_bans: MAX_BANS '=' NUMBER ';' |
| 2950 |
|
{ |
| 2951 |
< |
ConfigChannel.default_split_server_count = $3; |
| 2951 |
> |
ConfigChannel.max_bans = $3; |
| 2952 |
|
}; |
| 2953 |
|
|
| 2954 |
< |
channel_no_create_on_split: NO_CREATE_ON_SPLIT '=' TBOOL ';' |
| 2954 |
> |
channel_default_join_flood_count: DEFAULT_JOIN_FLOOD_COUNT '=' NUMBER ';' |
| 2955 |
|
{ |
| 2956 |
< |
ConfigChannel.no_create_on_split = yylval.number; |
| 2956 |
> |
ConfigChannel.default_join_flood_count = yylval.number; |
| 2957 |
|
}; |
| 2958 |
|
|
| 2959 |
< |
channel_no_join_on_split: NO_JOIN_ON_SPLIT '=' TBOOL ';' |
| 2959 |
> |
channel_default_join_flood_time: DEFAULT_JOIN_FLOOD_TIME '=' timespec ';' |
| 2960 |
|
{ |
| 2961 |
< |
ConfigChannel.no_join_on_split = yylval.number; |
| 2961 |
> |
ConfigChannel.default_join_flood_time = $3; |
| 2962 |
|
}; |
| 2963 |
|
|
| 3002 |
– |
channel_jflood_count: JOIN_FLOOD_COUNT '=' NUMBER ';' |
| 3003 |
– |
{ |
| 3004 |
– |
GlobalSetOptions.joinfloodcount = yylval.number; |
| 3005 |
– |
}; |
| 3006 |
– |
|
| 3007 |
– |
channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';' |
| 3008 |
– |
{ |
| 3009 |
– |
GlobalSetOptions.joinfloodtime = $3; |
| 3010 |
– |
}; |
| 2964 |
|
|
| 2965 |
|
/*************************************************************************** |
| 2966 |
< |
* section serverhide |
| 2966 |
> |
* serverhide {} section |
| 2967 |
|
***************************************************************************/ |
| 2968 |
< |
serverhide_entry: SERVERHIDE |
| 3016 |
< |
'{' serverhide_items '}' ';'; |
| 2968 |
> |
serverhide_entry: SERVERHIDE '{' serverhide_items '}' ';'; |
| 2969 |
|
|
| 2970 |
|
serverhide_items: serverhide_items serverhide_item | serverhide_item; |
| 2971 |
|
serverhide_item: serverhide_flatten_links | |
| 2972 |
+ |
serverhide_flatten_links_delay | |
| 2973 |
+ |
serverhide_flatten_links_file | |
| 2974 |
|
serverhide_disable_remote_commands | |
| 2975 |
|
serverhide_hide_servers | |
| 2976 |
|
serverhide_hide_services | |
| 3023 |
– |
serverhide_links_delay | |
| 2977 |
|
serverhide_hidden | |
| 2978 |
|
serverhide_hidden_name | |
| 2979 |
|
serverhide_hide_server_ips | |
| 2985 |
|
ConfigServerHide.flatten_links = yylval.number; |
| 2986 |
|
}; |
| 2987 |
|
|
| 2988 |
+ |
serverhide_flatten_links_delay: FLATTEN_LINKS_DELAY '=' timespec ';' |
| 2989 |
+ |
{ |
| 2990 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2991 |
+ |
{ |
| 2992 |
+ |
if ($3 > 0) |
| 2993 |
+ |
{ |
| 2994 |
+ |
event_write_links_file.when = $3; |
| 2995 |
+ |
event_add(&event_write_links_file, NULL); |
| 2996 |
+ |
} |
| 2997 |
+ |
else |
| 2998 |
+ |
event_delete(&event_write_links_file); |
| 2999 |
+ |
|
| 3000 |
+ |
ConfigServerHide.flatten_links_delay = $3; |
| 3001 |
+ |
} |
| 3002 |
+ |
}; |
| 3003 |
+ |
|
| 3004 |
+ |
serverhide_flatten_links_file: FLATTEN_LINKS_FILE '=' QSTRING ';' |
| 3005 |
+ |
{ |
| 3006 |
+ |
if (conf_parser_ctx.pass == 2) |
| 3007 |
+ |
{ |
| 3008 |
+ |
xfree(ConfigServerHide.flatten_links_file); |
| 3009 |
+ |
ConfigServerHide.flatten_links_file = xstrdup(yylval.string); |
| 3010 |
+ |
} |
| 3011 |
+ |
}; |
| 3012 |
+ |
|
| 3013 |
|
serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';' |
| 3014 |
|
{ |
| 3015 |
|
if (conf_parser_ctx.pass == 2) |
| 3032 |
|
{ |
| 3033 |
|
if (conf_parser_ctx.pass == 2) |
| 3034 |
|
{ |
| 3035 |
< |
MyFree(ConfigServerHide.hidden_name); |
| 3035 |
> |
xfree(ConfigServerHide.hidden_name); |
| 3036 |
|
ConfigServerHide.hidden_name = xstrdup(yylval.string); |
| 3037 |
|
} |
| 3038 |
|
}; |
| 3039 |
|
|
| 3062 |
– |
serverhide_links_delay: LINKS_DELAY '=' timespec ';' |
| 3063 |
– |
{ |
| 3064 |
– |
if (conf_parser_ctx.pass == 2) |
| 3065 |
– |
{ |
| 3066 |
– |
if (($3 > 0) && ConfigServerHide.links_disabled == 1) |
| 3067 |
– |
{ |
| 3068 |
– |
event_write_links_file.when = $3; |
| 3069 |
– |
event_addish(&event_write_links_file, NULL); |
| 3070 |
– |
ConfigServerHide.links_disabled = 0; |
| 3071 |
– |
} |
| 3072 |
– |
|
| 3073 |
– |
ConfigServerHide.links_delay = $3; |
| 3074 |
– |
} |
| 3075 |
– |
}; |
| 3076 |
– |
|
| 3040 |
|
serverhide_hidden: HIDDEN '=' TBOOL ';' |
| 3041 |
|
{ |
| 3042 |
|
if (conf_parser_ctx.pass == 2) |