| 1 |
|
/* |
| 2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
| 3 |
< |
* conf_parser.y: Parses the ircd configuration file. |
| 2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
|
* |
| 4 |
< |
* Copyright (C) 2005 by the past and present ircd coders, and others. |
| 4 |
> |
* Copyright (c) 2000-2014 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 |
| 17 |
|
* along with this program; if not, write to the Free Software |
| 18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 19 |
|
* USA |
| 21 |
– |
* |
| 22 |
– |
* $Id$ |
| 20 |
|
*/ |
| 21 |
|
|
| 22 |
+ |
/*! \file conf_parser.y |
| 23 |
+ |
* \brief Parses the ircd configuration file. |
| 24 |
+ |
* \version $Id$ |
| 25 |
+ |
*/ |
| 26 |
+ |
|
| 27 |
+ |
|
| 28 |
|
%{ |
| 29 |
|
|
| 30 |
|
#define YY_NO_UNPUT |
| 43 |
|
#include "irc_string.h" |
| 44 |
|
#include "memory.h" |
| 45 |
|
#include "modules.h" |
| 46 |
< |
#include "s_serv.h" |
| 46 |
> |
#include "server.h" |
| 47 |
|
#include "hostmask.h" |
| 48 |
|
#include "send.h" |
| 49 |
|
#include "listener.h" |
| 50 |
|
#include "resv.h" |
| 51 |
|
#include "numeric.h" |
| 52 |
< |
#include "s_user.h" |
| 52 |
> |
#include "user.h" |
| 53 |
> |
#include "motd.h" |
| 54 |
|
|
| 55 |
|
#ifdef HAVE_LIBCRYPTO |
| 56 |
|
#include <openssl/rsa.h> |
| 80 |
|
bind, |
| 81 |
|
file, |
| 82 |
|
ciph, |
| 83 |
+ |
cert, |
| 84 |
|
rpass, |
| 85 |
|
spass, |
| 86 |
|
class; |
| 155 |
|
%token CALLER_ID_WAIT |
| 156 |
|
%token CAN_FLOOD |
| 157 |
|
%token CHANNEL |
| 158 |
< |
%token CIDR_BITLEN_IPV4 |
| 159 |
< |
%token CIDR_BITLEN_IPV6 |
| 158 |
> |
%token CIDR_BITLEN_IPV4 |
| 159 |
> |
%token CIDR_BITLEN_IPV6 |
| 160 |
|
%token CLASS |
| 161 |
|
%token CONNECT |
| 162 |
|
%token CONNECTFREQ |
| 163 |
+ |
%token CYCLE_ON_HOST_CHANGE |
| 164 |
|
%token DEFAULT_FLOODCOUNT |
| 165 |
|
%token DEFAULT_SPLIT_SERVER_COUNT |
| 166 |
|
%token DEFAULT_SPLIT_USER_COUNT |
| 177 |
|
%token EXCEED_LIMIT |
| 178 |
|
%token EXEMPT |
| 179 |
|
%token FAILED_OPER_NOTICE |
| 174 |
– |
%token IRCD_FLAGS |
| 180 |
|
%token FLATTEN_LINKS |
| 181 |
|
%token GECOS |
| 182 |
|
%token GENERAL |
| 184 |
|
%token GLINE_DURATION |
| 185 |
|
%token GLINE_ENABLE |
| 186 |
|
%token GLINE_EXEMPT |
| 182 |
– |
%token GLINE_REQUEST_DURATION |
| 187 |
|
%token GLINE_MIN_CIDR |
| 188 |
|
%token GLINE_MIN_CIDR6 |
| 189 |
+ |
%token GLINE_REQUEST_DURATION |
| 190 |
|
%token GLOBAL_KILL |
| 186 |
– |
%token IRCD_AUTH |
| 187 |
– |
%token NEED_IDENT |
| 191 |
|
%token HAVENT_READ_CONF |
| 192 |
|
%token HIDDEN |
| 193 |
< |
%token HIDDEN_NAME |
| 193 |
> |
%token HIDDEN_NAME |
| 194 |
> |
%token HIDE_IDLE_FROM_OPERS |
| 195 |
|
%token HIDE_SERVER_IPS |
| 196 |
|
%token HIDE_SERVERS |
| 197 |
|
%token HIDE_SERVICES |
| 198 |
< |
%token HIDE_SPOOF_IPS |
| 198 |
> |
%token HIDE_SPOOF_IPS |
| 199 |
|
%token HOST |
| 200 |
|
%token HUB |
| 201 |
|
%token HUB_MASK |
| 202 |
|
%token IGNORE_BOGUS_TS |
| 203 |
|
%token INVISIBLE_ON_CONNECT |
| 204 |
|
%token IP |
| 205 |
+ |
%token IRCD_AUTH |
| 206 |
+ |
%token IRCD_FLAGS |
| 207 |
+ |
%token IRCD_SID |
| 208 |
+ |
%token JOIN_FLOOD_COUNT |
| 209 |
+ |
%token JOIN_FLOOD_TIME |
| 210 |
|
%token KILL |
| 211 |
< |
%token KILL_CHASE_TIME_LIMIT |
| 211 |
> |
%token KILL_CHASE_TIME_LIMIT |
| 212 |
|
%token KLINE |
| 213 |
|
%token KLINE_EXEMPT |
| 214 |
|
%token KNOCK_DELAY |
| 216 |
|
%token LEAF_MASK |
| 217 |
|
%token LINKS_DELAY |
| 218 |
|
%token LISTEN |
| 210 |
– |
%token T_LOG |
| 219 |
|
%token MASK |
| 220 |
|
%token MAX_ACCEPT |
| 221 |
|
%token MAX_BANS |
| 223 |
|
%token MAX_CHANS_PER_USER |
| 224 |
|
%token MAX_GLOBAL |
| 225 |
|
%token MAX_IDENT |
| 226 |
+ |
%token MAX_IDLE |
| 227 |
|
%token MAX_LOCAL |
| 228 |
|
%token MAX_NICK_CHANGES |
| 229 |
|
%token MAX_NICK_LENGTH |
| 232 |
|
%token MAX_TARGETS |
| 233 |
|
%token MAX_TOPIC_LENGTH |
| 234 |
|
%token MAX_WATCH |
| 235 |
+ |
%token MIN_IDLE |
| 236 |
|
%token MIN_NONWILDCARD |
| 237 |
|
%token MIN_NONWILDCARD_SIMPLE |
| 228 |
– |
%token MIN_IDLE |
| 229 |
– |
%token MAX_IDLE |
| 230 |
– |
%token RANDOM_IDLE |
| 231 |
– |
%token HIDE_IDLE_FROM_OPERS |
| 238 |
|
%token MODULE |
| 239 |
|
%token MODULES |
| 240 |
+ |
%token MOTD |
| 241 |
|
%token NAME |
| 242 |
+ |
%token NEED_IDENT |
| 243 |
|
%token NEED_PASSWORD |
| 244 |
|
%token NETWORK_DESC |
| 245 |
|
%token NETWORK_NAME |
| 251 |
|
%token NUMBER |
| 252 |
|
%token NUMBER_PER_CIDR |
| 253 |
|
%token NUMBER_PER_IP |
| 246 |
– |
%token OPERATOR |
| 247 |
– |
%token OPERS_BYPASS_CALLERID |
| 254 |
|
%token OPER_ONLY_UMODES |
| 255 |
|
%token OPER_PASS_RESV |
| 250 |
– |
%token OPER_SPY_T |
| 256 |
|
%token OPER_UMODES |
| 257 |
< |
%token JOIN_FLOOD_COUNT |
| 258 |
< |
%token JOIN_FLOOD_TIME |
| 257 |
> |
%token OPERATOR |
| 258 |
> |
%token OPERS_BYPASS_CALLERID |
| 259 |
|
%token PACE_WAIT |
| 260 |
|
%token PACE_WAIT_SIMPLE |
| 261 |
|
%token PASSWORD |
| 264 |
|
%token PING_TIME |
| 265 |
|
%token PORT |
| 266 |
|
%token QSTRING |
| 267 |
+ |
%token RANDOM_IDLE |
| 268 |
|
%token REASON |
| 269 |
|
%token REDIRPORT |
| 270 |
|
%token REDIRSERV |
| 271 |
|
%token REHASH |
| 272 |
|
%token REMOTE |
| 273 |
|
%token REMOTEBAN |
| 268 |
– |
%token RSA_PRIVATE_KEY_FILE |
| 269 |
– |
%token RSA_PUBLIC_KEY_FILE |
| 270 |
– |
%token SSL_CERTIFICATE_FILE |
| 271 |
– |
%token SSL_DH_PARAM_FILE |
| 272 |
– |
%token T_SSL_CLIENT_METHOD |
| 273 |
– |
%token T_SSL_SERVER_METHOD |
| 274 |
– |
%token T_SSLV3 |
| 275 |
– |
%token T_TLSV1 |
| 274 |
|
%token RESV |
| 275 |
|
%token RESV_EXEMPT |
| 276 |
+ |
%token RSA_PRIVATE_KEY_FILE |
| 277 |
+ |
%token RSA_PUBLIC_KEY_FILE |
| 278 |
|
%token SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS |
| 279 |
– |
%token SENDQ |
| 279 |
|
%token SEND_PASSWORD |
| 280 |
+ |
%token SENDQ |
| 281 |
|
%token SERVERHIDE |
| 282 |
|
%token SERVERINFO |
| 283 |
– |
%token IRCD_SID |
| 284 |
– |
%token TKLINE_EXPIRE_NOTICES |
| 285 |
– |
%token T_SHARED |
| 286 |
– |
%token T_CLUSTER |
| 287 |
– |
%token TYPE |
| 283 |
|
%token SHORT_MOTD |
| 284 |
|
%token SPOOF |
| 285 |
|
%token SPOOF_NOTICE |
| 286 |
+ |
%token SQUIT |
| 287 |
+ |
%token SSL_CERTIFICATE_FILE |
| 288 |
+ |
%token SSL_CERTIFICATE_FINGERPRINT |
| 289 |
+ |
%token SSL_CONNECTION_REQUIRED |
| 290 |
+ |
%token SSL_DH_PARAM_FILE |
| 291 |
|
%token STATS_E_DISABLED |
| 292 |
|
%token STATS_I_OPER_ONLY |
| 293 |
|
%token STATS_K_OPER_ONLY |
| 294 |
|
%token STATS_O_OPER_ONLY |
| 295 |
|
%token STATS_P_OPER_ONLY |
| 296 |
< |
%token TBOOL |
| 297 |
< |
%token TMASKED |
| 298 |
< |
%token TS_MAX_DELTA |
| 299 |
< |
%token TS_WARN_DELTA |
| 300 |
< |
%token TWODOTS |
| 296 |
> |
%token STATS_U_OPER_ONLY |
| 297 |
|
%token T_ALL |
| 298 |
|
%token T_BOTS |
| 303 |
– |
%token T_SOFTCALLERID |
| 299 |
|
%token T_CALLERID |
| 300 |
|
%token T_CCONN |
| 301 |
< |
%token T_CCONN_FULL |
| 307 |
< |
%token T_SSL_CIPHER_LIST |
| 301 |
> |
%token T_CLUSTER |
| 302 |
|
%token T_DEAF |
| 303 |
|
%token T_DEBUG |
| 304 |
|
%token T_DLINE |
| 305 |
|
%token T_EXTERNAL |
| 306 |
|
%token T_FARCONNECT |
| 307 |
+ |
%token T_FILE |
| 308 |
|
%token T_FULL |
| 309 |
+ |
%token T_GLOBOPS |
| 310 |
|
%token T_INVISIBLE |
| 311 |
|
%token T_IPV4 |
| 312 |
|
%token T_IPV6 |
| 313 |
|
%token T_LOCOPS |
| 314 |
+ |
%token T_LOG |
| 315 |
|
%token T_MAX_CLIENTS |
| 316 |
|
%token T_NCHANGE |
| 317 |
|
%token T_NONONREG |
| 318 |
|
%token T_OPERWALL |
| 319 |
|
%token T_RECVQ |
| 320 |
|
%token T_REJ |
| 321 |
+ |
%token T_RESTART |
| 322 |
|
%token T_SERVER |
| 323 |
+ |
%token T_SERVICE |
| 324 |
+ |
%token T_SERVICES_NAME |
| 325 |
|
%token T_SERVNOTICE |
| 326 |
|
%token T_SET |
| 327 |
+ |
%token T_SHARED |
| 328 |
+ |
%token T_SIZE |
| 329 |
|
%token T_SKILL |
| 330 |
+ |
%token T_SOFTCALLERID |
| 331 |
|
%token T_SPY |
| 332 |
|
%token T_SSL |
| 333 |
+ |
%token T_SSL_CIPHER_LIST |
| 334 |
+ |
%token T_SSL_CLIENT_METHOD |
| 335 |
+ |
%token T_SSL_SERVER_METHOD |
| 336 |
+ |
%token T_SSLV3 |
| 337 |
+ |
%token T_TLSV1 |
| 338 |
|
%token T_UMODES |
| 339 |
|
%token T_UNAUTH |
| 340 |
|
%token T_UNDLINE |
| 341 |
|
%token T_UNLIMITED |
| 342 |
|
%token T_UNRESV |
| 343 |
|
%token T_UNXLINE |
| 336 |
– |
%token T_GLOBOPS |
| 344 |
|
%token T_WALLOP |
| 345 |
+ |
%token T_WALLOPS |
| 346 |
|
%token T_WEBIRC |
| 347 |
< |
%token T_RESTART |
| 340 |
< |
%token T_SERVICE |
| 341 |
< |
%token T_SERVICES_NAME |
| 347 |
> |
%token TBOOL |
| 348 |
|
%token THROTTLE_TIME |
| 349 |
+ |
%token TKLINE_EXPIRE_NOTICES |
| 350 |
+ |
%token TMASKED |
| 351 |
|
%token TRUE_NO_OPER_FLOOD |
| 352 |
+ |
%token TS_MAX_DELTA |
| 353 |
+ |
%token TS_WARN_DELTA |
| 354 |
+ |
%token TWODOTS |
| 355 |
+ |
%token TYPE |
| 356 |
|
%token UNKLINE |
| 345 |
– |
%token USER |
| 357 |
|
%token USE_EGD |
| 358 |
|
%token USE_LOGGING |
| 359 |
+ |
%token USER |
| 360 |
|
%token VHOST |
| 361 |
|
%token VHOST6 |
| 350 |
– |
%token XLINE |
| 362 |
|
%token WARN_NO_NLINE |
| 363 |
< |
%token T_SIZE |
| 353 |
< |
%token T_FILE |
| 363 |
> |
%token XLINE |
| 364 |
|
|
| 365 |
< |
%type <string> QSTRING |
| 366 |
< |
%type <number> NUMBER |
| 367 |
< |
%type <number> timespec |
| 368 |
< |
%type <number> timespec_ |
| 369 |
< |
%type <number> sizespec |
| 370 |
< |
%type <number> sizespec_ |
| 365 |
> |
%type <string> QSTRING |
| 366 |
> |
%type <number> NUMBER |
| 367 |
> |
%type <number> timespec |
| 368 |
> |
%type <number> timespec_ |
| 369 |
> |
%type <number> sizespec |
| 370 |
> |
%type <number> sizespec_ |
| 371 |
|
|
| 372 |
|
%% |
| 373 |
< |
conf: |
| 373 |
> |
conf: |
| 374 |
|
| conf conf_item |
| 375 |
|
; |
| 376 |
|
|
| 378 |
|
| logging_entry |
| 379 |
|
| oper_entry |
| 380 |
|
| channel_entry |
| 381 |
< |
| class_entry |
| 381 |
> |
| class_entry |
| 382 |
|
| listen_entry |
| 383 |
|
| auth_entry |
| 384 |
|
| serverinfo_entry |
| 394 |
|
| general_entry |
| 395 |
|
| gecos_entry |
| 396 |
|
| modules_entry |
| 397 |
+ |
| motd_entry |
| 398 |
|
| error ';' |
| 399 |
|
| error '}' |
| 400 |
|
; |
| 516 |
|
serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';' |
| 517 |
|
{ |
| 518 |
|
#ifdef HAVE_LIBCRYPTO |
| 519 |
< |
if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx) |
| 519 |
> |
if (conf_parser_ctx.pass == 2 && ServerInfo.server_ctx) |
| 520 |
|
{ |
| 521 |
|
if (!ServerInfo.rsa_private_key_file) |
| 522 |
|
{ |
| 558 |
|
serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';' |
| 559 |
|
{ |
| 560 |
|
#ifdef HAVE_LIBCRYPTO |
| 561 |
< |
if (conf_parser_ctx.pass == 1) |
| 551 |
< |
{ |
| 552 |
< |
BIO *file; |
| 561 |
> |
BIO *file = NULL; |
| 562 |
|
|
| 563 |
< |
if (ServerInfo.rsa_private_key) |
| 564 |
< |
{ |
| 556 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 557 |
< |
ServerInfo.rsa_private_key = NULL; |
| 558 |
< |
} |
| 563 |
> |
if (conf_parser_ctx.pass != 1) |
| 564 |
> |
break; |
| 565 |
|
|
| 566 |
< |
if (ServerInfo.rsa_private_key_file) |
| 567 |
< |
{ |
| 568 |
< |
MyFree(ServerInfo.rsa_private_key_file); |
| 569 |
< |
ServerInfo.rsa_private_key_file = NULL; |
| 570 |
< |
} |
| 566 |
> |
if (ServerInfo.rsa_private_key) |
| 567 |
> |
{ |
| 568 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 569 |
> |
ServerInfo.rsa_private_key = NULL; |
| 570 |
> |
} |
| 571 |
|
|
| 572 |
< |
ServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 572 |
> |
if (ServerInfo.rsa_private_key_file) |
| 573 |
> |
{ |
| 574 |
> |
MyFree(ServerInfo.rsa_private_key_file); |
| 575 |
> |
ServerInfo.rsa_private_key_file = NULL; |
| 576 |
> |
} |
| 577 |
|
|
| 578 |
< |
if ((file = BIO_new_file(yylval.string, "r")) == NULL) |
| 569 |
< |
{ |
| 570 |
< |
conf_error_report("File open failed, ignoring"); |
| 571 |
< |
break; |
| 572 |
< |
} |
| 578 |
> |
ServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 579 |
|
|
| 580 |
< |
ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL); |
| 580 |
> |
if ((file = BIO_new_file(yylval.string, "r")) == NULL) |
| 581 |
> |
{ |
| 582 |
> |
conf_error_report("File open failed, ignoring"); |
| 583 |
> |
break; |
| 584 |
> |
} |
| 585 |
|
|
| 586 |
< |
BIO_set_close(file, BIO_CLOSE); |
| 577 |
< |
BIO_free(file); |
| 586 |
> |
ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL); |
| 587 |
|
|
| 588 |
< |
if (ServerInfo.rsa_private_key == NULL) |
| 589 |
< |
{ |
| 581 |
< |
conf_error_report("Couldn't extract key, ignoring"); |
| 582 |
< |
break; |
| 583 |
< |
} |
| 588 |
> |
BIO_set_close(file, BIO_CLOSE); |
| 589 |
> |
BIO_free(file); |
| 590 |
|
|
| 591 |
< |
if (!RSA_check_key(ServerInfo.rsa_private_key)) |
| 592 |
< |
{ |
| 593 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 594 |
< |
ServerInfo.rsa_private_key = NULL; |
| 591 |
> |
if (ServerInfo.rsa_private_key == NULL) |
| 592 |
> |
{ |
| 593 |
> |
conf_error_report("Couldn't extract key, ignoring"); |
| 594 |
> |
break; |
| 595 |
> |
} |
| 596 |
|
|
| 597 |
< |
conf_error_report("Invalid key, ignoring"); |
| 598 |
< |
break; |
| 599 |
< |
} |
| 597 |
> |
if (!RSA_check_key(ServerInfo.rsa_private_key)) |
| 598 |
> |
{ |
| 599 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 600 |
> |
ServerInfo.rsa_private_key = NULL; |
| 601 |
|
|
| 602 |
< |
/* require 2048 bit (256 byte) key */ |
| 603 |
< |
if (RSA_size(ServerInfo.rsa_private_key) != 256) |
| 604 |
< |
{ |
| 597 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 598 |
< |
ServerInfo.rsa_private_key = NULL; |
| 602 |
> |
conf_error_report("Invalid key, ignoring"); |
| 603 |
> |
break; |
| 604 |
> |
} |
| 605 |
|
|
| 606 |
< |
conf_error_report("Not a 2048 bit key, ignoring"); |
| 607 |
< |
} |
| 606 |
> |
if (RSA_size(ServerInfo.rsa_private_key) < 128) |
| 607 |
> |
{ |
| 608 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 609 |
> |
ServerInfo.rsa_private_key = NULL; |
| 610 |
> |
|
| 611 |
> |
conf_error_report("Ignoring serverinfo::rsa_private_key_file -- need at least a 1024 bit key size"); |
| 612 |
|
} |
| 613 |
|
#endif |
| 614 |
|
}; |
| 649 |
|
#endif |
| 650 |
|
}; |
| 651 |
|
|
| 652 |
< |
serverinfo_name: NAME '=' QSTRING ';' |
| 652 |
> |
serverinfo_name: NAME '=' QSTRING ';' |
| 653 |
|
{ |
| 654 |
|
/* this isn't rehashable */ |
| 655 |
|
if (conf_parser_ctx.pass == 2 && !ServerInfo.name) |
| 664 |
|
} |
| 665 |
|
}; |
| 666 |
|
|
| 667 |
< |
serverinfo_sid: IRCD_SID '=' QSTRING ';' |
| 667 |
> |
serverinfo_sid: IRCD_SID '=' QSTRING ';' |
| 668 |
|
{ |
| 669 |
|
/* this isn't rehashable */ |
| 670 |
|
if (conf_parser_ctx.pass == 2 && !ServerInfo.sid) |
| 704 |
|
|
| 705 |
|
serverinfo_network_desc: NETWORK_DESC '=' QSTRING ';' |
| 706 |
|
{ |
| 707 |
< |
if (conf_parser_ctx.pass == 2) |
| 708 |
< |
{ |
| 709 |
< |
MyFree(ServerInfo.network_desc); |
| 710 |
< |
ServerInfo.network_desc = xstrdup(yylval.string); |
| 711 |
< |
} |
| 707 |
> |
if (conf_parser_ctx.pass != 2) |
| 708 |
> |
break; |
| 709 |
> |
|
| 710 |
> |
MyFree(ServerInfo.network_desc); |
| 711 |
> |
ServerInfo.network_desc = xstrdup(yylval.string); |
| 712 |
|
}; |
| 713 |
|
|
| 714 |
|
serverinfo_vhost: VHOST '=' QSTRING ';' |
| 838 |
|
ServerInfo.max_topic_length = $3; |
| 839 |
|
}; |
| 840 |
|
|
| 841 |
< |
serverinfo_hub: HUB '=' TBOOL ';' |
| 841 |
> |
serverinfo_hub: HUB '=' TBOOL ';' |
| 842 |
|
{ |
| 843 |
|
if (conf_parser_ctx.pass == 2) |
| 844 |
|
ServerInfo.hub = yylval.number; |
| 853 |
|
admin_item: admin_name | admin_description | |
| 854 |
|
admin_email | error ';' ; |
| 855 |
|
|
| 856 |
< |
admin_name: NAME '=' QSTRING ';' |
| 856 |
> |
admin_name: NAME '=' QSTRING ';' |
| 857 |
|
{ |
| 858 |
< |
if (conf_parser_ctx.pass == 2) |
| 859 |
< |
{ |
| 860 |
< |
MyFree(AdminInfo.name); |
| 861 |
< |
AdminInfo.name = xstrdup(yylval.string); |
| 862 |
< |
} |
| 858 |
> |
if (conf_parser_ctx.pass != 2) |
| 859 |
> |
break; |
| 860 |
> |
|
| 861 |
> |
MyFree(AdminInfo.name); |
| 862 |
> |
AdminInfo.name = xstrdup(yylval.string); |
| 863 |
|
}; |
| 864 |
|
|
| 865 |
|
admin_email: EMAIL '=' QSTRING ';' |
| 866 |
|
{ |
| 867 |
< |
if (conf_parser_ctx.pass == 2) |
| 868 |
< |
{ |
| 869 |
< |
MyFree(AdminInfo.email); |
| 870 |
< |
AdminInfo.email = xstrdup(yylval.string); |
| 871 |
< |
} |
| 867 |
> |
if (conf_parser_ctx.pass != 2) |
| 868 |
> |
break; |
| 869 |
> |
|
| 870 |
> |
MyFree(AdminInfo.email); |
| 871 |
> |
AdminInfo.email = xstrdup(yylval.string); |
| 872 |
|
}; |
| 873 |
|
|
| 874 |
|
admin_description: DESCRIPTION '=' QSTRING ';' |
| 875 |
|
{ |
| 876 |
+ |
if (conf_parser_ctx.pass != 2) |
| 877 |
+ |
break; |
| 878 |
+ |
|
| 879 |
+ |
MyFree(AdminInfo.description); |
| 880 |
+ |
AdminInfo.description = xstrdup(yylval.string); |
| 881 |
+ |
}; |
| 882 |
+ |
|
| 883 |
+ |
/*************************************************************************** |
| 884 |
+ |
* motd section |
| 885 |
+ |
***************************************************************************/ |
| 886 |
+ |
motd_entry: MOTD |
| 887 |
+ |
{ |
| 888 |
|
if (conf_parser_ctx.pass == 2) |
| 889 |
< |
{ |
| 890 |
< |
MyFree(AdminInfo.description); |
| 891 |
< |
AdminInfo.description = xstrdup(yylval.string); |
| 892 |
< |
} |
| 889 |
> |
reset_block_state(); |
| 890 |
> |
} '{' motd_items '}' ';' |
| 891 |
> |
{ |
| 892 |
> |
dlink_node *ptr = NULL; |
| 893 |
> |
|
| 894 |
> |
if (conf_parser_ctx.pass != 2) |
| 895 |
> |
break; |
| 896 |
> |
|
| 897 |
> |
if (!block_state.file.buf[0]) |
| 898 |
> |
break; |
| 899 |
> |
|
| 900 |
> |
DLINK_FOREACH(ptr, block_state.mask.list.head) |
| 901 |
> |
motd_add(ptr->data, block_state.file.buf); |
| 902 |
> |
}; |
| 903 |
> |
|
| 904 |
> |
motd_items: motd_items motd_item | motd_item; |
| 905 |
> |
motd_item: motd_mask | motd_file | error ';' ; |
| 906 |
> |
|
| 907 |
> |
motd_mask: MASK '=' QSTRING ';' |
| 908 |
> |
{ |
| 909 |
> |
if (conf_parser_ctx.pass == 2) |
| 910 |
> |
dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list); |
| 911 |
> |
}; |
| 912 |
> |
|
| 913 |
> |
motd_file: T_FILE '=' QSTRING ';' |
| 914 |
> |
{ |
| 915 |
> |
if (conf_parser_ctx.pass == 2) |
| 916 |
> |
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 917 |
|
}; |
| 918 |
|
|
| 919 |
|
/*************************************************************************** |
| 986 |
|
{ |
| 987 |
|
if (conf_parser_ctx.pass == 2) |
| 988 |
|
block_state.type.value = LOG_TYPE_GLINE; |
| 989 |
+ |
} | XLINE |
| 990 |
+ |
{ |
| 991 |
+ |
if (conf_parser_ctx.pass == 2) |
| 992 |
+ |
block_state.type.value = LOG_TYPE_XLINE; |
| 993 |
+ |
} | RESV |
| 994 |
+ |
{ |
| 995 |
+ |
if (conf_parser_ctx.pass == 2) |
| 996 |
+ |
block_state.type.value = LOG_TYPE_RESV; |
| 997 |
|
} | T_DLINE |
| 998 |
|
{ |
| 999 |
|
if (conf_parser_ctx.pass == 2) |
| 1016 |
|
/*************************************************************************** |
| 1017 |
|
* section oper |
| 1018 |
|
***************************************************************************/ |
| 1019 |
< |
oper_entry: OPERATOR |
| 1019 |
> |
oper_entry: OPERATOR |
| 1020 |
|
{ |
| 1021 |
|
if (conf_parser_ctx.pass != 2) |
| 1022 |
|
break; |
| 1033 |
|
if (!block_state.name.buf[0]) |
| 1034 |
|
break; |
| 1035 |
|
#ifdef HAVE_LIBCRYPTO |
| 1036 |
< |
if (!(block_state.file.buf[0] || |
| 1037 |
< |
block_state.rpass.buf[0])) |
| 1036 |
> |
if (!block_state.file.buf[0] && |
| 1037 |
> |
!block_state.rpass.buf[0]) |
| 1038 |
|
break; |
| 1039 |
|
#else |
| 1040 |
|
if (!block_state.rpass.buf[0]) |
| 1055 |
|
nuh.hostsize = sizeof(block_state.host.buf); |
| 1056 |
|
split_nuh(&nuh); |
| 1057 |
|
|
| 1058 |
< |
conf = conf_make(CONF_OPER); |
| 1059 |
< |
conf->name = xstrdup(block_state.name.buf); |
| 1060 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 1061 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 1058 |
> |
conf = conf_make(CONF_OPER); |
| 1059 |
> |
conf->name = xstrdup(block_state.name.buf); |
| 1060 |
> |
conf->user = xstrdup(block_state.user.buf); |
| 1061 |
> |
conf->host = xstrdup(block_state.host.buf); |
| 1062 |
> |
|
| 1063 |
> |
if (block_state.cert.buf[0]) |
| 1064 |
> |
conf->certfp = xstrdup(block_state.cert.buf); |
| 1065 |
|
|
| 1066 |
|
if (block_state.rpass.buf[0]) |
| 1067 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 1099 |
|
oper_items: oper_items oper_item | oper_item; |
| 1100 |
|
oper_item: oper_name | oper_user | oper_password | |
| 1101 |
|
oper_umodes | oper_class | oper_encrypted | |
| 1102 |
< |
oper_rsa_public_key_file | oper_flags | error ';' ; |
| 1102 |
> |
oper_rsa_public_key_file | oper_ssl_certificate_fingerprint | |
| 1103 |
> |
oper_ssl_connection_required | |
| 1104 |
> |
oper_flags | error ';' ; |
| 1105 |
|
|
| 1106 |
|
oper_name: NAME '=' QSTRING ';' |
| 1107 |
|
{ |
| 1123 |
|
|
| 1124 |
|
oper_encrypted: ENCRYPTED '=' TBOOL ';' |
| 1125 |
|
{ |
| 1126 |
< |
if (conf_parser_ctx.pass == 2) |
| 1127 |
< |
{ |
| 1128 |
< |
if (yylval.number) |
| 1129 |
< |
block_state.flags.value |= CONF_FLAGS_ENCRYPTED; |
| 1130 |
< |
else |
| 1131 |
< |
block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED; |
| 1132 |
< |
} |
| 1126 |
> |
if (conf_parser_ctx.pass != 2) |
| 1127 |
> |
break; |
| 1128 |
> |
|
| 1129 |
> |
if (yylval.number) |
| 1130 |
> |
block_state.flags.value |= CONF_FLAGS_ENCRYPTED; |
| 1131 |
> |
else |
| 1132 |
> |
block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED; |
| 1133 |
|
}; |
| 1134 |
|
|
| 1135 |
|
oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';' |
| 1138 |
|
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 1139 |
|
}; |
| 1140 |
|
|
| 1141 |
+ |
oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';' |
| 1142 |
+ |
{ |
| 1143 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1144 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
| 1145 |
+ |
}; |
| 1146 |
+ |
|
| 1147 |
+ |
oper_ssl_connection_required: SSL_CONNECTION_REQUIRED '=' TBOOL ';' |
| 1148 |
+ |
{ |
| 1149 |
+ |
if (conf_parser_ctx.pass != 2) |
| 1150 |
+ |
break; |
| 1151 |
+ |
|
| 1152 |
+ |
if (yylval.number) |
| 1153 |
+ |
block_state.flags.value |= CONF_FLAGS_SSL; |
| 1154 |
+ |
else |
| 1155 |
+ |
block_state.flags.value &= ~CONF_FLAGS_SSL; |
| 1156 |
+ |
}; |
| 1157 |
+ |
|
| 1158 |
|
oper_class: CLASS '=' QSTRING ';' |
| 1159 |
|
{ |
| 1160 |
|
if (conf_parser_ctx.pass == 2) |
| 1176 |
|
{ |
| 1177 |
|
if (conf_parser_ctx.pass == 2) |
| 1178 |
|
block_state.modes.value |= UMODE_CCONN; |
| 1103 |
– |
} | T_CCONN_FULL |
| 1104 |
– |
{ |
| 1105 |
– |
if (conf_parser_ctx.pass == 2) |
| 1106 |
– |
block_state.modes.value |= UMODE_CCONN_FULL; |
| 1179 |
|
} | T_DEAF |
| 1180 |
|
{ |
| 1181 |
|
if (conf_parser_ctx.pass == 2) |
| 1261 |
|
} '=' oper_flags_items ';'; |
| 1262 |
|
|
| 1263 |
|
oper_flags_items: oper_flags_items ',' oper_flags_item | oper_flags_item; |
| 1264 |
< |
oper_flags_item: GLOBAL_KILL |
| 1264 |
> |
oper_flags_item: KILL ':' REMOTE |
| 1265 |
> |
{ |
| 1266 |
> |
if (conf_parser_ctx.pass == 2) |
| 1267 |
> |
block_state.port.value |= OPER_FLAG_KILL_REMOTE; |
| 1268 |
> |
} | KILL |
| 1269 |
> |
{ |
| 1270 |
> |
if (conf_parser_ctx.pass == 2) |
| 1271 |
> |
block_state.port.value |= OPER_FLAG_KILL; |
| 1272 |
> |
} | CONNECT ':' REMOTE |
| 1273 |
> |
{ |
| 1274 |
> |
if (conf_parser_ctx.pass == 2) |
| 1275 |
> |
block_state.port.value |= OPER_FLAG_CONNECT_REMOTE; |
| 1276 |
> |
} | CONNECT |
| 1277 |
> |
{ |
| 1278 |
> |
if (conf_parser_ctx.pass == 2) |
| 1279 |
> |
block_state.port.value |= OPER_FLAG_CONNECT; |
| 1280 |
> |
} | SQUIT ':' REMOTE |
| 1281 |
|
{ |
| 1282 |
|
if (conf_parser_ctx.pass == 2) |
| 1283 |
< |
block_state.port.value |= OPER_FLAG_GLOBAL_KILL; |
| 1284 |
< |
} | REMOTE |
| 1283 |
> |
block_state.port.value |= OPER_FLAG_SQUIT_REMOTE; |
| 1284 |
> |
} | SQUIT |
| 1285 |
|
{ |
| 1286 |
|
if (conf_parser_ctx.pass == 2) |
| 1287 |
< |
block_state.port.value |= OPER_FLAG_REMOTE; |
| 1287 |
> |
block_state.port.value |= OPER_FLAG_SQUIT; |
| 1288 |
|
} | KLINE |
| 1289 |
|
{ |
| 1290 |
|
if (conf_parser_ctx.pass == 2) |
| 1304 |
|
} | XLINE |
| 1305 |
|
{ |
| 1306 |
|
if (conf_parser_ctx.pass == 2) |
| 1307 |
< |
block_state.port.value |= OPER_FLAG_X; |
| 1307 |
> |
block_state.port.value |= OPER_FLAG_XLINE; |
| 1308 |
> |
} | T_UNXLINE |
| 1309 |
> |
{ |
| 1310 |
> |
if (conf_parser_ctx.pass == 2) |
| 1311 |
> |
block_state.port.value |= OPER_FLAG_UNXLINE; |
| 1312 |
|
} | GLINE |
| 1313 |
|
{ |
| 1314 |
|
if (conf_parser_ctx.pass == 2) |
| 1337 |
|
{ |
| 1338 |
|
if (conf_parser_ctx.pass == 2) |
| 1339 |
|
block_state.port.value |= OPER_FLAG_GLOBOPS; |
| 1340 |
< |
} | OPER_SPY_T |
| 1340 |
> |
} | T_WALLOPS |
| 1341 |
|
{ |
| 1342 |
|
if (conf_parser_ctx.pass == 2) |
| 1343 |
< |
block_state.port.value |= OPER_FLAG_OPER_SPY; |
| 1343 |
> |
block_state.port.value |= OPER_FLAG_WALLOPS; |
| 1344 |
> |
} | T_LOCOPS |
| 1345 |
> |
{ |
| 1346 |
> |
if (conf_parser_ctx.pass == 2) |
| 1347 |
> |
block_state.port.value |= OPER_FLAG_LOCOPS; |
| 1348 |
|
} | REMOTEBAN |
| 1349 |
|
{ |
| 1350 |
|
if (conf_parser_ctx.pass == 2) |
| 1441 |
|
class_flags | |
| 1442 |
|
error ';' ; |
| 1443 |
|
|
| 1444 |
< |
class_name: NAME '=' QSTRING ';' |
| 1444 |
> |
class_name: NAME '=' QSTRING ';' |
| 1445 |
|
{ |
| 1446 |
|
if (conf_parser_ctx.pass == 1) |
| 1447 |
|
strlcpy(block_state.class.buf, yylval.string, sizeof(block_state.class.buf)); |
| 1667 |
|
split_nuh(&nuh); |
| 1668 |
|
|
| 1669 |
|
conf = conf_make(CONF_CLIENT); |
| 1670 |
< |
conf->user = xstrdup(collapse(block_state.user.buf)); |
| 1671 |
< |
conf->host = xstrdup(collapse(block_state.host.buf)); |
| 1670 |
> |
conf->user = xstrdup(block_state.user.buf); |
| 1671 |
> |
conf->host = xstrdup(block_state.host.buf); |
| 1672 |
|
|
| 1673 |
|
if (block_state.rpass.buf[0]) |
| 1674 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 1681 |
|
conf_add_class_to_conf(conf, block_state.class.buf); |
| 1682 |
|
add_conf_by_address(CONF_CLIENT, conf); |
| 1683 |
|
} |
| 1684 |
< |
}; |
| 1684 |
> |
}; |
| 1685 |
|
|
| 1686 |
|
auth_items: auth_items auth_item | auth_item; |
| 1687 |
|
auth_item: auth_user | auth_passwd | auth_class | auth_flags | |
| 1720 |
|
auth_flags: IRCD_FLAGS |
| 1721 |
|
{ |
| 1722 |
|
if (conf_parser_ctx.pass == 2) |
| 1723 |
< |
block_state.flags.value &= CONF_FLAGS_ENCRYPTED; |
| 1723 |
> |
block_state.flags.value &= (CONF_FLAGS_ENCRYPTED | CONF_FLAGS_SPOOF_IP); |
| 1724 |
|
} '=' auth_flags_items ';'; |
| 1725 |
|
|
| 1726 |
|
auth_flags_items: auth_flags_items ',' auth_flags_item | auth_flags_item; |
| 1766 |
|
block_state.flags.value |= CONF_FLAGS_NEED_PASSWORD; |
| 1767 |
|
}; |
| 1768 |
|
|
| 1769 |
< |
auth_spoof: SPOOF '=' QSTRING ';' |
| 1769 |
> |
auth_spoof: SPOOF '=' QSTRING ';' |
| 1770 |
|
{ |
| 1771 |
|
if (conf_parser_ctx.pass != 2) |
| 1772 |
|
break; |
| 1849 |
|
|
| 1850 |
|
service_name: NAME '=' QSTRING ';' |
| 1851 |
|
{ |
| 1852 |
< |
if (conf_parser_ctx.pass == 2) |
| 1852 |
> |
if (conf_parser_ctx.pass != 2) |
| 1853 |
> |
break; |
| 1854 |
> |
|
| 1855 |
> |
if (valid_servname(yylval.string)) |
| 1856 |
|
{ |
| 1857 |
< |
if (valid_servname(yylval.string)) |
| 1858 |
< |
{ |
| 1760 |
< |
struct MaskItem *conf = conf_make(CONF_SERVICE); |
| 1761 |
< |
conf->name = xstrdup(yylval.string); |
| 1762 |
< |
} |
| 1857 |
> |
struct MaskItem *conf = conf_make(CONF_SERVICE); |
| 1858 |
> |
conf->name = xstrdup(yylval.string); |
| 1859 |
|
} |
| 1860 |
|
}; |
| 1861 |
|
|
| 2049 |
|
/*************************************************************************** |
| 2050 |
|
* section connect |
| 2051 |
|
***************************************************************************/ |
| 2052 |
< |
connect_entry: CONNECT |
| 2052 |
> |
connect_entry: CONNECT |
| 2053 |
|
{ |
| 2054 |
|
|
| 2055 |
|
if (conf_parser_ctx.pass != 2) |
| 2056 |
|
break; |
| 2057 |
|
|
| 2058 |
|
reset_block_state(); |
| 2059 |
+ |
block_state.aftype.value = AF_INET; |
| 2060 |
|
block_state.port.value = PORTNUM; |
| 2061 |
|
} '{' connect_items '}' ';' |
| 2062 |
|
{ |
| 2070 |
|
!block_state.host.buf[0]) |
| 2071 |
|
break; |
| 2072 |
|
|
| 2073 |
< |
if (!(block_state.rpass.buf[0] || |
| 2074 |
< |
block_state.spass.buf[0])) |
| 2073 |
> |
if (!block_state.rpass.buf[0] || |
| 2074 |
> |
!block_state.spass.buf[0]) |
| 2075 |
|
break; |
| 2076 |
|
|
| 2077 |
|
if (has_wildcards(block_state.name.buf) || |
| 2086 |
|
conf->name = xstrdup(block_state.name.buf); |
| 2087 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 2088 |
|
conf->spasswd = xstrdup(block_state.spass.buf); |
| 2089 |
< |
conf->cipher_list = xstrdup(block_state.ciph.buf); |
| 2089 |
> |
|
| 2090 |
> |
if (block_state.cert.buf[0]) |
| 2091 |
> |
conf->certfp = xstrdup(block_state.cert.buf); |
| 2092 |
> |
|
| 2093 |
> |
if (block_state.ciph.buf[0]) |
| 2094 |
> |
conf->cipher_list = xstrdup(block_state.ciph.buf); |
| 2095 |
|
|
| 2096 |
|
dlinkMoveList(&block_state.leaf.list, &conf->leaf_list); |
| 2097 |
|
dlinkMoveList(&block_state.hub.list, &conf->hub_list); |
| 2124 |
|
connect_items: connect_items connect_item | connect_item; |
| 2125 |
|
connect_item: connect_name | connect_host | connect_vhost | |
| 2126 |
|
connect_send_password | connect_accept_password | |
| 2127 |
+ |
connect_ssl_certificate_fingerprint | |
| 2128 |
|
connect_aftype | connect_port | connect_ssl_cipher_list | |
| 2129 |
|
connect_flags | connect_hub_mask | connect_leaf_mask | |
| 2130 |
< |
connect_class | connect_encrypted | |
| 2130 |
> |
connect_class | connect_encrypted | |
| 2131 |
|
error ';' ; |
| 2132 |
|
|
| 2133 |
|
connect_name: NAME '=' QSTRING ';' |
| 2136 |
|
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 2137 |
|
}; |
| 2138 |
|
|
| 2139 |
< |
connect_host: HOST '=' QSTRING ';' |
| 2139 |
> |
connect_host: HOST '=' QSTRING ';' |
| 2140 |
|
{ |
| 2141 |
|
if (conf_parser_ctx.pass == 2) |
| 2142 |
|
strlcpy(block_state.host.buf, yylval.string, sizeof(block_state.host.buf)); |
| 2143 |
|
}; |
| 2144 |
|
|
| 2145 |
< |
connect_vhost: VHOST '=' QSTRING ';' |
| 2145 |
> |
connect_vhost: VHOST '=' QSTRING ';' |
| 2146 |
|
{ |
| 2147 |
|
if (conf_parser_ctx.pass == 2) |
| 2148 |
|
strlcpy(block_state.bind.buf, yylval.string, sizeof(block_state.bind.buf)); |
| 2149 |
|
}; |
| 2150 |
< |
|
| 2150 |
> |
|
| 2151 |
|
connect_send_password: SEND_PASSWORD '=' QSTRING ';' |
| 2152 |
|
{ |
| 2153 |
|
if (conf_parser_ctx.pass != 2) |
| 2174 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2175 |
|
}; |
| 2176 |
|
|
| 2177 |
+ |
connect_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';' |
| 2178 |
+ |
{ |
| 2179 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2180 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
| 2181 |
+ |
}; |
| 2182 |
+ |
|
| 2183 |
|
connect_port: PORT '=' NUMBER ';' |
| 2184 |
|
{ |
| 2185 |
|
if (conf_parser_ctx.pass == 2) |
| 2225 |
|
} |
| 2226 |
|
}; |
| 2227 |
|
|
| 2228 |
< |
connect_hub_mask: HUB_MASK '=' QSTRING ';' |
| 2228 |
> |
connect_hub_mask: HUB_MASK '=' QSTRING ';' |
| 2229 |
|
{ |
| 2230 |
|
if (conf_parser_ctx.pass == 2) |
| 2231 |
|
dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.hub.list); |
| 2232 |
|
}; |
| 2233 |
|
|
| 2234 |
< |
connect_leaf_mask: LEAF_MASK '=' QSTRING ';' |
| 2234 |
> |
connect_leaf_mask: LEAF_MASK '=' QSTRING ';' |
| 2235 |
|
{ |
| 2236 |
|
if (conf_parser_ctx.pass == 2) |
| 2237 |
|
dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.leaf.list); |
| 2282 |
|
else |
| 2283 |
|
conf->reason = xstrdup(CONF_NOREASON); |
| 2284 |
|
add_conf_by_address(CONF_KLINE, conf); |
| 2285 |
< |
}; |
| 2285 |
> |
}; |
| 2286 |
|
|
| 2287 |
|
kill_items: kill_items kill_item | kill_item; |
| 2288 |
|
kill_item: kill_user | kill_reason | error; |
| 2307 |
|
} |
| 2308 |
|
}; |
| 2309 |
|
|
| 2310 |
< |
kill_reason: REASON '=' QSTRING ';' |
| 2310 |
> |
kill_reason: REASON '=' QSTRING ';' |
| 2311 |
|
{ |
| 2312 |
|
if (conf_parser_ctx.pass == 2) |
| 2313 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2316 |
|
/*************************************************************************** |
| 2317 |
|
* section deny |
| 2318 |
|
***************************************************************************/ |
| 2319 |
< |
deny_entry: DENY |
| 2319 |
> |
deny_entry: DENY |
| 2320 |
|
{ |
| 2321 |
|
if (conf_parser_ctx.pass == 2) |
| 2322 |
|
reset_block_state(); |
| 2341 |
|
conf->reason = xstrdup(CONF_NOREASON); |
| 2342 |
|
add_conf_by_address(CONF_DLINE, conf); |
| 2343 |
|
} |
| 2344 |
< |
}; |
| 2344 |
> |
}; |
| 2345 |
|
|
| 2346 |
|
deny_items: deny_items deny_item | deny_item; |
| 2347 |
|
deny_item: deny_ip | deny_reason | error; |
| 2352 |
|
strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf)); |
| 2353 |
|
}; |
| 2354 |
|
|
| 2355 |
< |
deny_reason: REASON '=' QSTRING ';' |
| 2355 |
> |
deny_reason: REASON '=' QSTRING ';' |
| 2356 |
|
{ |
| 2357 |
|
if (conf_parser_ctx.pass == 2) |
| 2358 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2409 |
|
gecos_items: gecos_items gecos_item | gecos_item; |
| 2410 |
|
gecos_item: gecos_name | gecos_reason | error; |
| 2411 |
|
|
| 2412 |
< |
gecos_name: NAME '=' QSTRING ';' |
| 2412 |
> |
gecos_name: NAME '=' QSTRING ';' |
| 2413 |
|
{ |
| 2414 |
|
if (conf_parser_ctx.pass == 2) |
| 2415 |
|
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 2416 |
|
}; |
| 2417 |
|
|
| 2418 |
< |
gecos_reason: REASON '=' QSTRING ';' |
| 2418 |
> |
gecos_reason: REASON '=' QSTRING ';' |
| 2419 |
|
{ |
| 2420 |
|
if (conf_parser_ctx.pass == 2) |
| 2421 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2439 |
|
general_stats_o_oper_only | general_stats_k_oper_only | |
| 2440 |
|
general_pace_wait | general_stats_i_oper_only | |
| 2441 |
|
general_pace_wait_simple | general_stats_P_oper_only | |
| 2442 |
+ |
general_stats_u_oper_only | |
| 2443 |
|
general_short_motd | general_no_oper_flood | |
| 2444 |
|
general_true_no_oper_flood | general_oper_pass_resv | |
| 2445 |
|
general_oper_only_umodes | general_max_targets | |
| 2447 |
|
general_oper_umodes | general_caller_id_wait | |
| 2448 |
|
general_opers_bypass_callerid | general_default_floodcount | |
| 2449 |
|
general_min_nonwildcard | general_min_nonwildcard_simple | |
| 2340 |
– |
general_disable_remote_commands | |
| 2450 |
|
general_throttle_time | general_havent_read_conf | |
| 2451 |
|
general_ping_cookie | |
| 2452 |
< |
general_disable_auth | |
| 2452 |
> |
general_disable_auth | |
| 2453 |
|
general_tkline_expire_notices | general_gline_enable | |
| 2454 |
|
general_gline_duration | general_gline_request_duration | |
| 2455 |
|
general_gline_min_cidr | |
| 2456 |
|
general_gline_min_cidr6 | |
| 2457 |
|
general_stats_e_disabled | |
| 2458 |
|
general_max_watch | general_services_name | |
| 2459 |
+ |
general_cycle_on_host_change | |
| 2460 |
|
error; |
| 2461 |
|
|
| 2462 |
|
|
| 2465 |
|
ConfigFileEntry.max_watch = $3; |
| 2466 |
|
}; |
| 2467 |
|
|
| 2468 |
+ |
general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';' |
| 2469 |
+ |
{ |
| 2470 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2471 |
+ |
ConfigFileEntry.cycle_on_host_change = yylval.number; |
| 2472 |
+ |
}; |
| 2473 |
+ |
|
| 2474 |
|
general_gline_enable: GLINE_ENABLE '=' TBOOL ';' |
| 2475 |
|
{ |
| 2476 |
|
if (conf_parser_ctx.pass == 2) |
| 2519 |
|
ConfigFileEntry.ignore_bogus_ts = yylval.number; |
| 2520 |
|
}; |
| 2521 |
|
|
| 2406 |
– |
general_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';' |
| 2407 |
– |
{ |
| 2408 |
– |
ConfigFileEntry.disable_remote = yylval.number; |
| 2409 |
– |
}; |
| 2410 |
– |
|
| 2522 |
|
general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';' |
| 2523 |
|
{ |
| 2524 |
|
ConfigFileEntry.failed_oper_notice = yylval.number; |
| 2531 |
|
|
| 2532 |
|
general_max_nick_time: MAX_NICK_TIME '=' timespec ';' |
| 2533 |
|
{ |
| 2534 |
< |
ConfigFileEntry.max_nick_time = $3; |
| 2534 |
> |
ConfigFileEntry.max_nick_time = $3; |
| 2535 |
|
}; |
| 2536 |
|
|
| 2537 |
|
general_max_nick_changes: MAX_NICK_CHANGES '=' NUMBER ';' |
| 2596 |
|
ConfigFileEntry.stats_P_oper_only = yylval.number; |
| 2597 |
|
}; |
| 2598 |
|
|
| 2599 |
+ |
general_stats_u_oper_only: STATS_U_OPER_ONLY '=' TBOOL ';' |
| 2600 |
+ |
{ |
| 2601 |
+ |
ConfigFileEntry.stats_u_oper_only = yylval.number; |
| 2602 |
+ |
}; |
| 2603 |
+ |
|
| 2604 |
|
general_stats_k_oper_only: STATS_K_OPER_ONLY '=' TBOOL ';' |
| 2605 |
|
{ |
| 2606 |
|
ConfigFileEntry.stats_k_oper_only = 2 * yylval.number; |
| 2641 |
|
{ |
| 2642 |
|
ConfigFileEntry.short_motd = yylval.number; |
| 2643 |
|
}; |
| 2644 |
< |
|
| 2644 |
> |
|
| 2645 |
|
general_no_oper_flood: NO_OPER_FLOOD '=' TBOOL ';' |
| 2646 |
|
{ |
| 2647 |
|
ConfigFileEntry.no_oper_flood = yylval.number; |
| 2702 |
|
|
| 2703 |
|
general_throttle_time: THROTTLE_TIME '=' timespec ';' |
| 2704 |
|
{ |
| 2705 |
< |
ConfigFileEntry.throttle_time = yylval.number; |
| 2705 |
> |
ConfigFileEntry.throttle_time = $3; |
| 2706 |
|
}; |
| 2707 |
|
|
| 2708 |
|
general_oper_umodes: OPER_UMODES |
| 2717 |
|
} | T_CCONN |
| 2718 |
|
{ |
| 2719 |
|
ConfigFileEntry.oper_umodes |= UMODE_CCONN; |
| 2604 |
– |
} | T_CCONN_FULL |
| 2605 |
– |
{ |
| 2606 |
– |
ConfigFileEntry.oper_umodes |= UMODE_CCONN_FULL; |
| 2720 |
|
} | T_DEAF |
| 2721 |
|
{ |
| 2722 |
|
ConfigFileEntry.oper_umodes |= UMODE_DEAF; |
| 2776 |
|
ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT; |
| 2777 |
|
}; |
| 2778 |
|
|
| 2779 |
< |
general_oper_only_umodes: OPER_ONLY_UMODES |
| 2779 |
> |
general_oper_only_umodes: OPER_ONLY_UMODES |
| 2780 |
|
{ |
| 2781 |
|
ConfigFileEntry.oper_only_umodes = 0; |
| 2782 |
|
} '=' umode_items ';' ; |
| 2783 |
|
|
| 2784 |
|
umode_items: umode_items ',' umode_item | umode_item; |
| 2785 |
< |
umode_item: T_BOTS |
| 2785 |
> |
umode_item: T_BOTS |
| 2786 |
|
{ |
| 2787 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_BOTS; |
| 2788 |
|
} | T_CCONN |
| 2789 |
|
{ |
| 2790 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_CCONN; |
| 2678 |
– |
} | T_CCONN_FULL |
| 2679 |
– |
{ |
| 2680 |
– |
ConfigFileEntry.oper_only_umodes |= UMODE_CCONN_FULL; |
| 2791 |
|
} | T_DEAF |
| 2792 |
|
{ |
| 2793 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_DEAF; |
| 2795 |
|
{ |
| 2796 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_DEBUG; |
| 2797 |
|
} | T_FULL |
| 2798 |
< |
{ |
| 2798 |
> |
{ |
| 2799 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_FULL; |
| 2800 |
|
} | T_SKILL |
| 2801 |
|
{ |
| 2937 |
|
|
| 2938 |
|
channel_jflood_time: JOIN_FLOOD_TIME '=' timespec ';' |
| 2939 |
|
{ |
| 2940 |
< |
GlobalSetOptions.joinfloodtime = yylval.number; |
| 2940 |
> |
GlobalSetOptions.joinfloodtime = $3; |
| 2941 |
|
}; |
| 2942 |
|
|
| 2943 |
|
/*************************************************************************** |
| 2947 |
|
'{' serverhide_items '}' ';'; |
| 2948 |
|
|
| 2949 |
|
serverhide_items: serverhide_items serverhide_item | serverhide_item; |
| 2950 |
< |
serverhide_item: serverhide_flatten_links | serverhide_hide_servers | |
| 2950 |
> |
serverhide_item: serverhide_flatten_links | serverhide_disable_remote_commands | |
| 2951 |
> |
serverhide_hide_servers | |
| 2952 |
|
serverhide_hide_services | |
| 2953 |
|
serverhide_links_delay | |
| 2954 |
|
serverhide_hidden | serverhide_hidden_name | |
| 2961 |
|
ConfigServerHide.flatten_links = yylval.number; |
| 2962 |
|
}; |
| 2963 |
|
|
| 2964 |
+ |
serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';' |
| 2965 |
+ |
{ |
| 2966 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2967 |
+ |
ConfigServerHide.disable_remote_commands = yylval.number; |
| 2968 |
+ |
}; |
| 2969 |
+ |
|
| 2970 |
|
serverhide_hide_servers: HIDE_SERVERS '=' TBOOL ';' |
| 2971 |
|
{ |
| 2972 |
|
if (conf_parser_ctx.pass == 2) |