| 47 |
|
#include "resv.h" |
| 48 |
|
#include "numeric.h" |
| 49 |
|
#include "s_user.h" |
| 50 |
+ |
#include "motd.h" |
| 51 |
|
|
| 52 |
|
#ifdef HAVE_LIBCRYPTO |
| 53 |
|
#include <openssl/rsa.h> |
| 77 |
|
bind, |
| 78 |
|
file, |
| 79 |
|
ciph, |
| 80 |
+ |
cert, |
| 81 |
|
rpass, |
| 82 |
|
spass, |
| 83 |
|
class; |
| 152 |
|
%token CALLER_ID_WAIT |
| 153 |
|
%token CAN_FLOOD |
| 154 |
|
%token CHANNEL |
| 155 |
< |
%token CIDR_BITLEN_IPV4 |
| 156 |
< |
%token CIDR_BITLEN_IPV6 |
| 155 |
> |
%token CIDR_BITLEN_IPV4 |
| 156 |
> |
%token CIDR_BITLEN_IPV6 |
| 157 |
|
%token CLASS |
| 158 |
|
%token CONNECT |
| 159 |
|
%token CONNECTFREQ |
| 173 |
|
%token EXCEED_LIMIT |
| 174 |
|
%token EXEMPT |
| 175 |
|
%token FAILED_OPER_NOTICE |
| 174 |
– |
%token IRCD_FLAGS |
| 176 |
|
%token FLATTEN_LINKS |
| 177 |
|
%token GECOS |
| 178 |
|
%token GENERAL |
| 180 |
|
%token GLINE_DURATION |
| 181 |
|
%token GLINE_ENABLE |
| 182 |
|
%token GLINE_EXEMPT |
| 182 |
– |
%token GLINE_REQUEST_DURATION |
| 183 |
|
%token GLINE_MIN_CIDR |
| 184 |
|
%token GLINE_MIN_CIDR6 |
| 185 |
+ |
%token GLINE_REQUEST_DURATION |
| 186 |
|
%token GLOBAL_KILL |
| 186 |
– |
%token IRCD_AUTH |
| 187 |
– |
%token NEED_IDENT |
| 187 |
|
%token HAVENT_READ_CONF |
| 188 |
|
%token HIDDEN |
| 189 |
< |
%token HIDDEN_NAME |
| 189 |
> |
%token HIDDEN_NAME |
| 190 |
> |
%token HIDE_IDLE_FROM_OPERS |
| 191 |
|
%token HIDE_SERVER_IPS |
| 192 |
|
%token HIDE_SERVERS |
| 193 |
< |
%token HIDE_SPOOF_IPS |
| 193 |
> |
%token HIDE_SERVICES |
| 194 |
> |
%token HIDE_SPOOF_IPS |
| 195 |
|
%token HOST |
| 196 |
|
%token HUB |
| 197 |
|
%token HUB_MASK |
| 198 |
|
%token IGNORE_BOGUS_TS |
| 199 |
|
%token INVISIBLE_ON_CONNECT |
| 200 |
|
%token IP |
| 201 |
+ |
%token IRCD_AUTH |
| 202 |
+ |
%token IRCD_FLAGS |
| 203 |
+ |
%token IRCD_SID |
| 204 |
+ |
%token JOIN_FLOOD_COUNT |
| 205 |
+ |
%token JOIN_FLOOD_TIME |
| 206 |
|
%token KILL |
| 207 |
< |
%token KILL_CHASE_TIME_LIMIT |
| 207 |
> |
%token KILL_CHASE_TIME_LIMIT |
| 208 |
|
%token KLINE |
| 209 |
|
%token KLINE_EXEMPT |
| 210 |
|
%token KNOCK_DELAY |
| 212 |
|
%token LEAF_MASK |
| 213 |
|
%token LINKS_DELAY |
| 214 |
|
%token LISTEN |
| 215 |
< |
%token T_LOG |
| 215 |
> |
%token MASK |
| 216 |
|
%token MAX_ACCEPT |
| 217 |
|
%token MAX_BANS |
| 218 |
|
%token MAX_CHANS_PER_OPER |
| 219 |
|
%token MAX_CHANS_PER_USER |
| 220 |
|
%token MAX_GLOBAL |
| 221 |
|
%token MAX_IDENT |
| 222 |
+ |
%token MAX_IDLE |
| 223 |
|
%token MAX_LOCAL |
| 224 |
|
%token MAX_NICK_CHANGES |
| 225 |
|
%token MAX_NICK_LENGTH |
| 228 |
|
%token MAX_TARGETS |
| 229 |
|
%token MAX_TOPIC_LENGTH |
| 230 |
|
%token MAX_WATCH |
| 231 |
< |
%token MESSAGE_LOCALE |
| 231 |
> |
%token MIN_IDLE |
| 232 |
|
%token MIN_NONWILDCARD |
| 233 |
|
%token MIN_NONWILDCARD_SIMPLE |
| 227 |
– |
%token MIN_IDLE |
| 228 |
– |
%token MAX_IDLE |
| 229 |
– |
%token RANDOM_IDLE |
| 230 |
– |
%token HIDE_IDLE_FROM_OPERS |
| 234 |
|
%token MODULE |
| 235 |
|
%token MODULES |
| 236 |
+ |
%token MOTD |
| 237 |
|
%token NAME |
| 238 |
+ |
%token NEED_IDENT |
| 239 |
|
%token NEED_PASSWORD |
| 240 |
|
%token NETWORK_DESC |
| 241 |
|
%token NETWORK_NAME |
| 242 |
|
%token NICK |
| 238 |
– |
%token NICK_CHANGES |
| 243 |
|
%token NO_CREATE_ON_SPLIT |
| 244 |
|
%token NO_JOIN_ON_SPLIT |
| 245 |
|
%token NO_OPER_FLOOD |
| 247 |
|
%token NUMBER |
| 248 |
|
%token NUMBER_PER_CIDR |
| 249 |
|
%token NUMBER_PER_IP |
| 246 |
– |
%token OPERATOR |
| 247 |
– |
%token OPERS_BYPASS_CALLERID |
| 250 |
|
%token OPER_ONLY_UMODES |
| 251 |
|
%token OPER_PASS_RESV |
| 250 |
– |
%token OPER_SPY_T |
| 252 |
|
%token OPER_UMODES |
| 253 |
< |
%token JOIN_FLOOD_COUNT |
| 254 |
< |
%token JOIN_FLOOD_TIME |
| 253 |
> |
%token OPERATOR |
| 254 |
> |
%token OPERS_BYPASS_CALLERID |
| 255 |
|
%token PACE_WAIT |
| 256 |
|
%token PACE_WAIT_SIMPLE |
| 257 |
|
%token PASSWORD |
| 260 |
|
%token PING_TIME |
| 261 |
|
%token PORT |
| 262 |
|
%token QSTRING |
| 263 |
< |
%token QUIET_ON_BAN |
| 263 |
> |
%token RANDOM_IDLE |
| 264 |
|
%token REASON |
| 265 |
|
%token REDIRPORT |
| 266 |
|
%token REDIRSERV |
| 266 |
– |
%token REGEX_T |
| 267 |
|
%token REHASH |
| 268 |
|
%token REMOTE |
| 269 |
|
%token REMOTEBAN |
| 270 |
– |
%token RESTRICT_CHANNELS |
| 271 |
– |
%token RSA_PRIVATE_KEY_FILE |
| 272 |
– |
%token RSA_PUBLIC_KEY_FILE |
| 273 |
– |
%token SSL_CERTIFICATE_FILE |
| 274 |
– |
%token SSL_DH_PARAM_FILE |
| 275 |
– |
%token T_SSL_CLIENT_METHOD |
| 276 |
– |
%token T_SSL_SERVER_METHOD |
| 277 |
– |
%token T_SSLV3 |
| 278 |
– |
%token T_TLSV1 |
| 270 |
|
%token RESV |
| 271 |
|
%token RESV_EXEMPT |
| 272 |
+ |
%token RSA_PRIVATE_KEY_FILE |
| 273 |
+ |
%token RSA_PUBLIC_KEY_FILE |
| 274 |
|
%token SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS |
| 282 |
– |
%token SENDQ |
| 275 |
|
%token SEND_PASSWORD |
| 276 |
+ |
%token SENDQ |
| 277 |
|
%token SERVERHIDE |
| 278 |
|
%token SERVERINFO |
| 286 |
– |
%token IRCD_SID |
| 287 |
– |
%token TKLINE_EXPIRE_NOTICES |
| 288 |
– |
%token T_SHARED |
| 289 |
– |
%token T_CLUSTER |
| 290 |
– |
%token TYPE |
| 279 |
|
%token SHORT_MOTD |
| 280 |
|
%token SPOOF |
| 281 |
|
%token SPOOF_NOTICE |
| 282 |
+ |
%token SQUIT |
| 283 |
+ |
%token SSL_CERTIFICATE_FILE |
| 284 |
+ |
%token SSL_CERTIFICATE_FINGERPRINT |
| 285 |
+ |
%token SSL_CONNECTION_REQUIRED |
| 286 |
+ |
%token SSL_DH_PARAM_FILE |
| 287 |
|
%token STATS_E_DISABLED |
| 288 |
|
%token STATS_I_OPER_ONLY |
| 289 |
|
%token STATS_K_OPER_ONLY |
| 290 |
|
%token STATS_O_OPER_ONLY |
| 291 |
|
%token STATS_P_OPER_ONLY |
| 299 |
– |
%token TBOOL |
| 300 |
– |
%token TMASKED |
| 301 |
– |
%token TS_MAX_DELTA |
| 302 |
– |
%token TS_WARN_DELTA |
| 303 |
– |
%token TWODOTS |
| 292 |
|
%token T_ALL |
| 293 |
|
%token T_BOTS |
| 306 |
– |
%token T_SOFTCALLERID |
| 294 |
|
%token T_CALLERID |
| 295 |
|
%token T_CCONN |
| 296 |
< |
%token T_CCONN_FULL |
| 310 |
< |
%token T_SSL_CIPHER_LIST |
| 296 |
> |
%token T_CLUSTER |
| 297 |
|
%token T_DEAF |
| 298 |
|
%token T_DEBUG |
| 299 |
|
%token T_DLINE |
| 300 |
|
%token T_EXTERNAL |
| 301 |
+ |
%token T_FARCONNECT |
| 302 |
+ |
%token T_FILE |
| 303 |
|
%token T_FULL |
| 304 |
+ |
%token T_GLOBOPS |
| 305 |
|
%token T_INVISIBLE |
| 306 |
|
%token T_IPV4 |
| 307 |
|
%token T_IPV6 |
| 308 |
|
%token T_LOCOPS |
| 309 |
+ |
%token T_LOG |
| 310 |
|
%token T_MAX_CLIENTS |
| 311 |
|
%token T_NCHANGE |
| 312 |
+ |
%token T_NONONREG |
| 313 |
|
%token T_OPERWALL |
| 314 |
|
%token T_RECVQ |
| 315 |
|
%token T_REJ |
| 316 |
+ |
%token T_RESTART |
| 317 |
|
%token T_SERVER |
| 318 |
+ |
%token T_SERVICE |
| 319 |
+ |
%token T_SERVICES_NAME |
| 320 |
|
%token T_SERVNOTICE |
| 321 |
|
%token T_SET |
| 322 |
+ |
%token T_SHARED |
| 323 |
+ |
%token T_SIZE |
| 324 |
|
%token T_SKILL |
| 325 |
+ |
%token T_SOFTCALLERID |
| 326 |
|
%token T_SPY |
| 327 |
|
%token T_SSL |
| 328 |
+ |
%token T_SSL_CIPHER_LIST |
| 329 |
+ |
%token T_SSL_CLIENT_METHOD |
| 330 |
+ |
%token T_SSL_SERVER_METHOD |
| 331 |
+ |
%token T_SSLV3 |
| 332 |
+ |
%token T_TLSV1 |
| 333 |
|
%token T_UMODES |
| 334 |
|
%token T_UNAUTH |
| 335 |
|
%token T_UNDLINE |
| 336 |
|
%token T_UNLIMITED |
| 337 |
|
%token T_UNRESV |
| 338 |
|
%token T_UNXLINE |
| 337 |
– |
%token T_GLOBOPS |
| 339 |
|
%token T_WALLOP |
| 340 |
+ |
%token T_WALLOPS |
| 341 |
|
%token T_WEBIRC |
| 342 |
< |
%token T_RESTART |
| 341 |
< |
%token T_SERVICE |
| 342 |
< |
%token T_SERVICES_NAME |
| 342 |
> |
%token TBOOL |
| 343 |
|
%token THROTTLE_TIME |
| 344 |
+ |
%token TKLINE_EXPIRE_NOTICES |
| 345 |
+ |
%token TMASKED |
| 346 |
|
%token TRUE_NO_OPER_FLOOD |
| 347 |
+ |
%token TS_MAX_DELTA |
| 348 |
+ |
%token TS_WARN_DELTA |
| 349 |
+ |
%token TWODOTS |
| 350 |
+ |
%token TYPE |
| 351 |
|
%token UNKLINE |
| 346 |
– |
%token USER |
| 352 |
|
%token USE_EGD |
| 353 |
|
%token USE_LOGGING |
| 354 |
+ |
%token USER |
| 355 |
|
%token VHOST |
| 356 |
|
%token VHOST6 |
| 351 |
– |
%token XLINE |
| 357 |
|
%token WARN_NO_NLINE |
| 358 |
< |
%token T_SIZE |
| 354 |
< |
%token T_FILE |
| 358 |
> |
%token XLINE |
| 359 |
|
|
| 360 |
< |
%type <string> QSTRING |
| 361 |
< |
%type <number> NUMBER |
| 362 |
< |
%type <number> timespec |
| 363 |
< |
%type <number> timespec_ |
| 364 |
< |
%type <number> sizespec |
| 365 |
< |
%type <number> sizespec_ |
| 360 |
> |
%type <string> QSTRING |
| 361 |
> |
%type <number> NUMBER |
| 362 |
> |
%type <number> timespec |
| 363 |
> |
%type <number> timespec_ |
| 364 |
> |
%type <number> sizespec |
| 365 |
> |
%type <number> sizespec_ |
| 366 |
|
|
| 367 |
|
%% |
| 368 |
|
conf: |
| 389 |
|
| general_entry |
| 390 |
|
| gecos_entry |
| 391 |
|
| modules_entry |
| 392 |
+ |
| motd_entry |
| 393 |
|
| error ';' |
| 394 |
|
| error '}' |
| 395 |
|
; |
| 553 |
|
serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';' |
| 554 |
|
{ |
| 555 |
|
#ifdef HAVE_LIBCRYPTO |
| 556 |
< |
if (conf_parser_ctx.pass == 1) |
| 552 |
< |
{ |
| 553 |
< |
BIO *file; |
| 556 |
> |
BIO *file = NULL; |
| 557 |
|
|
| 558 |
< |
if (ServerInfo.rsa_private_key) |
| 559 |
< |
{ |
| 557 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 558 |
< |
ServerInfo.rsa_private_key = NULL; |
| 559 |
< |
} |
| 558 |
> |
if (conf_parser_ctx.pass != 1) |
| 559 |
> |
break; |
| 560 |
|
|
| 561 |
< |
if (ServerInfo.rsa_private_key_file) |
| 562 |
< |
{ |
| 563 |
< |
MyFree(ServerInfo.rsa_private_key_file); |
| 564 |
< |
ServerInfo.rsa_private_key_file = NULL; |
| 565 |
< |
} |
| 561 |
> |
if (ServerInfo.rsa_private_key) |
| 562 |
> |
{ |
| 563 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 564 |
> |
ServerInfo.rsa_private_key = NULL; |
| 565 |
> |
} |
| 566 |
|
|
| 567 |
< |
ServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 567 |
> |
if (ServerInfo.rsa_private_key_file) |
| 568 |
> |
{ |
| 569 |
> |
MyFree(ServerInfo.rsa_private_key_file); |
| 570 |
> |
ServerInfo.rsa_private_key_file = NULL; |
| 571 |
> |
} |
| 572 |
|
|
| 573 |
< |
if ((file = BIO_new_file(yylval.string, "r")) == NULL) |
| 570 |
< |
{ |
| 571 |
< |
conf_error_report("File open failed, ignoring"); |
| 572 |
< |
break; |
| 573 |
< |
} |
| 573 |
> |
ServerInfo.rsa_private_key_file = xstrdup(yylval.string); |
| 574 |
|
|
| 575 |
< |
ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL); |
| 575 |
> |
if ((file = BIO_new_file(yylval.string, "r")) == NULL) |
| 576 |
> |
{ |
| 577 |
> |
conf_error_report("File open failed, ignoring"); |
| 578 |
> |
break; |
| 579 |
> |
} |
| 580 |
|
|
| 581 |
< |
BIO_set_close(file, BIO_CLOSE); |
| 578 |
< |
BIO_free(file); |
| 581 |
> |
ServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL); |
| 582 |
|
|
| 583 |
< |
if (ServerInfo.rsa_private_key == NULL) |
| 584 |
< |
{ |
| 582 |
< |
conf_error_report("Couldn't extract key, ignoring"); |
| 583 |
< |
break; |
| 584 |
< |
} |
| 583 |
> |
BIO_set_close(file, BIO_CLOSE); |
| 584 |
> |
BIO_free(file); |
| 585 |
|
|
| 586 |
< |
if (!RSA_check_key(ServerInfo.rsa_private_key)) |
| 587 |
< |
{ |
| 588 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 589 |
< |
ServerInfo.rsa_private_key = NULL; |
| 586 |
> |
if (ServerInfo.rsa_private_key == NULL) |
| 587 |
> |
{ |
| 588 |
> |
conf_error_report("Couldn't extract key, ignoring"); |
| 589 |
> |
break; |
| 590 |
> |
} |
| 591 |
|
|
| 592 |
< |
conf_error_report("Invalid key, ignoring"); |
| 593 |
< |
break; |
| 594 |
< |
} |
| 592 |
> |
if (!RSA_check_key(ServerInfo.rsa_private_key)) |
| 593 |
> |
{ |
| 594 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 595 |
> |
ServerInfo.rsa_private_key = NULL; |
| 596 |
|
|
| 597 |
< |
/* require 2048 bit (256 byte) key */ |
| 598 |
< |
if (RSA_size(ServerInfo.rsa_private_key) != 256) |
| 599 |
< |
{ |
| 598 |
< |
RSA_free(ServerInfo.rsa_private_key); |
| 599 |
< |
ServerInfo.rsa_private_key = NULL; |
| 597 |
> |
conf_error_report("Invalid key, ignoring"); |
| 598 |
> |
break; |
| 599 |
> |
} |
| 600 |
|
|
| 601 |
< |
conf_error_report("Not a 2048 bit key, ignoring"); |
| 602 |
< |
} |
| 601 |
> |
/* require 2048 bit (256 byte) key */ |
| 602 |
> |
if (RSA_size(ServerInfo.rsa_private_key) != 256) |
| 603 |
> |
{ |
| 604 |
> |
RSA_free(ServerInfo.rsa_private_key); |
| 605 |
> |
ServerInfo.rsa_private_key = NULL; |
| 606 |
> |
|
| 607 |
> |
conf_error_report("Not a 2048 bit key, ignoring"); |
| 608 |
|
} |
| 609 |
|
#endif |
| 610 |
|
}; |
| 700 |
|
|
| 701 |
|
serverinfo_network_desc: NETWORK_DESC '=' QSTRING ';' |
| 702 |
|
{ |
| 703 |
< |
if (conf_parser_ctx.pass == 2) |
| 704 |
< |
{ |
| 705 |
< |
MyFree(ServerInfo.network_desc); |
| 706 |
< |
ServerInfo.network_desc = xstrdup(yylval.string); |
| 707 |
< |
} |
| 703 |
> |
if (conf_parser_ctx.pass != 2) |
| 704 |
> |
break; |
| 705 |
> |
|
| 706 |
> |
MyFree(ServerInfo.network_desc); |
| 707 |
> |
ServerInfo.network_desc = xstrdup(yylval.string); |
| 708 |
|
}; |
| 709 |
|
|
| 710 |
|
serverinfo_vhost: VHOST '=' QSTRING ';' |
| 851 |
|
|
| 852 |
|
admin_name: NAME '=' QSTRING ';' |
| 853 |
|
{ |
| 854 |
< |
if (conf_parser_ctx.pass == 2) |
| 855 |
< |
{ |
| 856 |
< |
MyFree(AdminInfo.name); |
| 857 |
< |
AdminInfo.name = xstrdup(yylval.string); |
| 858 |
< |
} |
| 854 |
> |
if (conf_parser_ctx.pass != 2) |
| 855 |
> |
break; |
| 856 |
> |
|
| 857 |
> |
MyFree(AdminInfo.name); |
| 858 |
> |
AdminInfo.name = xstrdup(yylval.string); |
| 859 |
|
}; |
| 860 |
|
|
| 861 |
|
admin_email: EMAIL '=' QSTRING ';' |
| 862 |
|
{ |
| 863 |
< |
if (conf_parser_ctx.pass == 2) |
| 864 |
< |
{ |
| 865 |
< |
MyFree(AdminInfo.email); |
| 866 |
< |
AdminInfo.email = xstrdup(yylval.string); |
| 867 |
< |
} |
| 863 |
> |
if (conf_parser_ctx.pass != 2) |
| 864 |
> |
break; |
| 865 |
> |
|
| 866 |
> |
MyFree(AdminInfo.email); |
| 867 |
> |
AdminInfo.email = xstrdup(yylval.string); |
| 868 |
|
}; |
| 869 |
|
|
| 870 |
|
admin_description: DESCRIPTION '=' QSTRING ';' |
| 871 |
|
{ |
| 872 |
+ |
if (conf_parser_ctx.pass != 2) |
| 873 |
+ |
break; |
| 874 |
+ |
|
| 875 |
+ |
MyFree(AdminInfo.description); |
| 876 |
+ |
AdminInfo.description = xstrdup(yylval.string); |
| 877 |
+ |
}; |
| 878 |
+ |
|
| 879 |
+ |
/*************************************************************************** |
| 880 |
+ |
* motd section |
| 881 |
+ |
***************************************************************************/ |
| 882 |
+ |
motd_entry: MOTD |
| 883 |
+ |
{ |
| 884 |
|
if (conf_parser_ctx.pass == 2) |
| 885 |
< |
{ |
| 886 |
< |
MyFree(AdminInfo.description); |
| 887 |
< |
AdminInfo.description = xstrdup(yylval.string); |
| 888 |
< |
} |
| 885 |
> |
reset_block_state(); |
| 886 |
> |
} '{' motd_items '}' ';' |
| 887 |
> |
{ |
| 888 |
> |
dlink_node *ptr = NULL; |
| 889 |
> |
|
| 890 |
> |
if (conf_parser_ctx.pass != 2) |
| 891 |
> |
break; |
| 892 |
> |
|
| 893 |
> |
if (!block_state.file.buf[0]) |
| 894 |
> |
break; |
| 895 |
> |
|
| 896 |
> |
DLINK_FOREACH(ptr, block_state.mask.list.head) |
| 897 |
> |
motd_add(ptr->data, block_state.file.buf); |
| 898 |
> |
}; |
| 899 |
> |
|
| 900 |
> |
motd_items: motd_items motd_item | motd_item; |
| 901 |
> |
motd_item: motd_mask | motd_file | error ';' ; |
| 902 |
> |
|
| 903 |
> |
motd_mask: MASK '=' QSTRING ';' |
| 904 |
> |
{ |
| 905 |
> |
if (conf_parser_ctx.pass == 2) |
| 906 |
> |
dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list); |
| 907 |
> |
}; |
| 908 |
> |
|
| 909 |
> |
motd_file: T_FILE '=' QSTRING ';' |
| 910 |
> |
{ |
| 911 |
> |
if (conf_parser_ctx.pass == 2) |
| 912 |
> |
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 913 |
|
}; |
| 914 |
|
|
| 915 |
|
/*************************************************************************** |
| 937 |
|
break; |
| 938 |
|
|
| 939 |
|
if (block_state.type.value && block_state.file.buf[0]) |
| 940 |
< |
log_add_file(block_state.type.value, block_state.size.value, |
| 940 |
> |
log_set_file(block_state.type.value, block_state.size.value, |
| 941 |
|
block_state.file.buf); |
| 942 |
|
}; |
| 943 |
|
|
| 1021 |
|
if (!block_state.name.buf[0]) |
| 1022 |
|
break; |
| 1023 |
|
#ifdef HAVE_LIBCRYPTO |
| 1024 |
< |
if (!(block_state.file.buf[0] || |
| 1025 |
< |
block_state.rpass.buf[0])) |
| 1024 |
> |
if (!block_state.file.buf[0] && |
| 1025 |
> |
!block_state.rpass.buf[0]) |
| 1026 |
|
break; |
| 1027 |
|
#else |
| 1028 |
|
if (!block_state.rpass.buf[0]) |
| 1043 |
|
nuh.hostsize = sizeof(block_state.host.buf); |
| 1044 |
|
split_nuh(&nuh); |
| 1045 |
|
|
| 1046 |
< |
conf = conf_make(CONF_OPER); |
| 1047 |
< |
conf->name = xstrdup(block_state.name.buf); |
| 1048 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 1049 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 1046 |
> |
conf = conf_make(CONF_OPER); |
| 1047 |
> |
conf->name = xstrdup(block_state.name.buf); |
| 1048 |
> |
conf->user = xstrdup(block_state.user.buf); |
| 1049 |
> |
conf->host = xstrdup(block_state.host.buf); |
| 1050 |
> |
|
| 1051 |
> |
if (block_state.cert.buf[0]) |
| 1052 |
> |
conf->certfp = xstrdup(block_state.cert.buf); |
| 1053 |
|
|
| 1054 |
|
if (block_state.rpass.buf[0]) |
| 1055 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 1087 |
|
oper_items: oper_items oper_item | oper_item; |
| 1088 |
|
oper_item: oper_name | oper_user | oper_password | |
| 1089 |
|
oper_umodes | oper_class | oper_encrypted | |
| 1090 |
< |
oper_rsa_public_key_file | oper_flags | error ';' ; |
| 1090 |
> |
oper_rsa_public_key_file | oper_ssl_certificate_fingerprint | |
| 1091 |
> |
oper_ssl_connection_required | |
| 1092 |
> |
oper_flags | error ';' ; |
| 1093 |
|
|
| 1094 |
|
oper_name: NAME '=' QSTRING ';' |
| 1095 |
|
{ |
| 1111 |
|
|
| 1112 |
|
oper_encrypted: ENCRYPTED '=' TBOOL ';' |
| 1113 |
|
{ |
| 1114 |
< |
if (conf_parser_ctx.pass == 2) |
| 1115 |
< |
{ |
| 1116 |
< |
if (yylval.number) |
| 1117 |
< |
block_state.flags.value |= CONF_FLAGS_ENCRYPTED; |
| 1118 |
< |
else |
| 1119 |
< |
block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED; |
| 1120 |
< |
} |
| 1114 |
> |
if (conf_parser_ctx.pass != 2) |
| 1115 |
> |
break; |
| 1116 |
> |
|
| 1117 |
> |
if (yylval.number) |
| 1118 |
> |
block_state.flags.value |= CONF_FLAGS_ENCRYPTED; |
| 1119 |
> |
else |
| 1120 |
> |
block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED; |
| 1121 |
|
}; |
| 1122 |
|
|
| 1123 |
|
oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';' |
| 1126 |
|
strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf)); |
| 1127 |
|
}; |
| 1128 |
|
|
| 1129 |
+ |
oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';' |
| 1130 |
+ |
{ |
| 1131 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1132 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
| 1133 |
+ |
}; |
| 1134 |
+ |
|
| 1135 |
+ |
oper_ssl_connection_required: SSL_CONNECTION_REQUIRED '=' TBOOL ';' |
| 1136 |
+ |
{ |
| 1137 |
+ |
if (conf_parser_ctx.pass != 2) |
| 1138 |
+ |
break; |
| 1139 |
+ |
|
| 1140 |
+ |
if (yylval.number) |
| 1141 |
+ |
block_state.flags.value |= CONF_FLAGS_SSL; |
| 1142 |
+ |
else |
| 1143 |
+ |
block_state.flags.value &= ~CONF_FLAGS_SSL; |
| 1144 |
+ |
}; |
| 1145 |
+ |
|
| 1146 |
|
oper_class: CLASS '=' QSTRING ';' |
| 1147 |
|
{ |
| 1148 |
|
if (conf_parser_ctx.pass == 2) |
| 1164 |
|
{ |
| 1165 |
|
if (conf_parser_ctx.pass == 2) |
| 1166 |
|
block_state.modes.value |= UMODE_CCONN; |
| 1104 |
– |
} | T_CCONN_FULL |
| 1105 |
– |
{ |
| 1106 |
– |
if (conf_parser_ctx.pass == 2) |
| 1107 |
– |
block_state.modes.value |= UMODE_CCONN_FULL; |
| 1167 |
|
} | T_DEAF |
| 1168 |
|
{ |
| 1169 |
|
if (conf_parser_ctx.pass == 2) |
| 1232 |
|
{ |
| 1233 |
|
if (conf_parser_ctx.pass == 2) |
| 1234 |
|
block_state.modes.value |= UMODE_LOCOPS; |
| 1235 |
+ |
} | T_NONONREG |
| 1236 |
+ |
{ |
| 1237 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1238 |
+ |
block_state.modes.value |= UMODE_REGONLY; |
| 1239 |
+ |
} | T_FARCONNECT |
| 1240 |
+ |
{ |
| 1241 |
+ |
if (conf_parser_ctx.pass == 2) |
| 1242 |
+ |
block_state.modes.value |= UMODE_FARCONNECT; |
| 1243 |
|
}; |
| 1244 |
|
|
| 1245 |
|
oper_flags: IRCD_FLAGS |
| 1249 |
|
} '=' oper_flags_items ';'; |
| 1250 |
|
|
| 1251 |
|
oper_flags_items: oper_flags_items ',' oper_flags_item | oper_flags_item; |
| 1252 |
< |
oper_flags_item: GLOBAL_KILL |
| 1252 |
> |
oper_flags_item: KILL ':' REMOTE |
| 1253 |
> |
{ |
| 1254 |
> |
if (conf_parser_ctx.pass == 2) |
| 1255 |
> |
block_state.port.value |= OPER_FLAG_KILL_REMOTE; |
| 1256 |
> |
} | KILL |
| 1257 |
> |
{ |
| 1258 |
> |
if (conf_parser_ctx.pass == 2) |
| 1259 |
> |
block_state.port.value |= OPER_FLAG_KILL; |
| 1260 |
> |
} | CONNECT ':' REMOTE |
| 1261 |
> |
{ |
| 1262 |
> |
if (conf_parser_ctx.pass == 2) |
| 1263 |
> |
block_state.port.value |= OPER_FLAG_CONNECT_REMOTE; |
| 1264 |
> |
} | CONNECT |
| 1265 |
|
{ |
| 1266 |
|
if (conf_parser_ctx.pass == 2) |
| 1267 |
< |
block_state.port.value |= OPER_FLAG_GLOBAL_KILL; |
| 1268 |
< |
} | REMOTE |
| 1267 |
> |
block_state.port.value |= OPER_FLAG_CONNECT; |
| 1268 |
> |
} | SQUIT ':' REMOTE |
| 1269 |
|
{ |
| 1270 |
|
if (conf_parser_ctx.pass == 2) |
| 1271 |
< |
block_state.port.value |= OPER_FLAG_REMOTE; |
| 1271 |
> |
block_state.port.value |= OPER_FLAG_SQUIT_REMOTE; |
| 1272 |
> |
} | SQUIT |
| 1273 |
> |
{ |
| 1274 |
> |
if (conf_parser_ctx.pass == 2) |
| 1275 |
> |
block_state.port.value |= OPER_FLAG_SQUIT; |
| 1276 |
|
} | KLINE |
| 1277 |
|
{ |
| 1278 |
|
if (conf_parser_ctx.pass == 2) |
| 1313 |
|
{ |
| 1314 |
|
if (conf_parser_ctx.pass == 2) |
| 1315 |
|
block_state.port.value |= OPER_FLAG_ADMIN; |
| 1233 |
– |
} | NICK_CHANGES |
| 1234 |
– |
{ |
| 1235 |
– |
if (conf_parser_ctx.pass == 2) |
| 1236 |
– |
block_state.port.value |= OPER_FLAG_N; |
| 1316 |
|
} | T_OPERWALL |
| 1317 |
|
{ |
| 1318 |
|
if (conf_parser_ctx.pass == 2) |
| 1321 |
|
{ |
| 1322 |
|
if (conf_parser_ctx.pass == 2) |
| 1323 |
|
block_state.port.value |= OPER_FLAG_GLOBOPS; |
| 1324 |
< |
} | OPER_SPY_T |
| 1324 |
> |
} | T_WALLOPS |
| 1325 |
|
{ |
| 1326 |
|
if (conf_parser_ctx.pass == 2) |
| 1327 |
< |
block_state.port.value |= OPER_FLAG_OPER_SPY; |
| 1327 |
> |
block_state.port.value |= OPER_FLAG_WALLOPS; |
| 1328 |
> |
} | T_LOCOPS |
| 1329 |
> |
{ |
| 1330 |
> |
if (conf_parser_ctx.pass == 2) |
| 1331 |
> |
block_state.port.value |= OPER_FLAG_LOCOPS; |
| 1332 |
|
} | REMOTEBAN |
| 1333 |
|
{ |
| 1334 |
|
if (conf_parser_ctx.pass == 2) |
| 1651 |
|
split_nuh(&nuh); |
| 1652 |
|
|
| 1653 |
|
conf = conf_make(CONF_CLIENT); |
| 1654 |
< |
conf->user = xstrdup(collapse(block_state.user.buf)); |
| 1655 |
< |
conf->host = xstrdup(collapse(block_state.host.buf)); |
| 1654 |
> |
conf->user = xstrdup(block_state.user.buf); |
| 1655 |
> |
conf->host = xstrdup(block_state.host.buf); |
| 1656 |
|
|
| 1657 |
|
if (block_state.rpass.buf[0]) |
| 1658 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 1659 |
|
if (block_state.name.buf[0]) |
| 1660 |
< |
conf->passwd = xstrdup(block_state.name.buf); |
| 1660 |
> |
conf->name = xstrdup(block_state.name.buf); |
| 1661 |
|
|
| 1662 |
|
conf->flags = block_state.flags.value; |
| 1663 |
|
conf->port = block_state.port.value; |
| 1704 |
|
auth_flags: IRCD_FLAGS |
| 1705 |
|
{ |
| 1706 |
|
if (conf_parser_ctx.pass == 2) |
| 1707 |
< |
block_state.flags.value &= CONF_FLAGS_ENCRYPTED; |
| 1707 |
> |
block_state.flags.value &= (CONF_FLAGS_ENCRYPTED | CONF_FLAGS_SPOOF_IP); |
| 1708 |
|
} '=' auth_flags_items ';'; |
| 1709 |
|
|
| 1710 |
|
auth_flags_items: auth_flags_items ',' auth_flags_item | auth_flags_item; |
| 1795 |
|
strlcpy(block_state.rpass.buf, CONF_NOREASON, sizeof(block_state.rpass.buf)); |
| 1796 |
|
} '{' resv_items '}' ';' |
| 1797 |
|
{ |
| 1798 |
< |
if (IsChanPrefix(block_state.name.buf[0])) |
| 1799 |
< |
create_channel_resv(block_state.name.buf, block_state.rpass.buf, 1); |
| 1800 |
< |
else if (block_state.name.buf[0]) |
| 1801 |
< |
create_nick_resv(block_state.name.buf, block_state.rpass.buf, 1); |
| 1798 |
> |
if (conf_parser_ctx.pass != 2) |
| 1799 |
> |
break; |
| 1800 |
> |
|
| 1801 |
> |
create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list); |
| 1802 |
|
}; |
| 1803 |
|
|
| 1804 |
|
resv_items: resv_items resv_item | resv_item; |
| 1805 |
< |
resv_item: resv_reason | resv_channel | resv_nick | error ';' ; |
| 1805 |
> |
resv_item: resv_mask | resv_reason | resv_exempt | error ';' ; |
| 1806 |
|
|
| 1807 |
< |
resv_reason: REASON '=' QSTRING ';' |
| 1807 |
> |
resv_mask: MASK '=' QSTRING ';' |
| 1808 |
|
{ |
| 1809 |
|
if (conf_parser_ctx.pass == 2) |
| 1810 |
< |
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 1810 |
> |
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 1811 |
|
}; |
| 1812 |
|
|
| 1813 |
< |
resv_channel: CHANNEL '=' QSTRING ';' |
| 1813 |
> |
resv_reason: REASON '=' QSTRING ';' |
| 1814 |
|
{ |
| 1815 |
|
if (conf_parser_ctx.pass == 2) |
| 1816 |
< |
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 1816 |
> |
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 1817 |
|
}; |
| 1818 |
|
|
| 1819 |
< |
resv_nick: NICK '=' QSTRING ';' |
| 1819 |
> |
resv_exempt: EXEMPT '=' QSTRING ';' |
| 1820 |
|
{ |
| 1821 |
|
if (conf_parser_ctx.pass == 2) |
| 1822 |
< |
strlcpy(block_state.name.buf, yylval.string, sizeof(block_state.name.buf)); |
| 1822 |
> |
dlinkAdd(xstrdup(yylval.string), make_dlink_node(), &block_state.mask.list); |
| 1823 |
|
}; |
| 1824 |
|
|
| 1825 |
+ |
|
| 1826 |
|
/*************************************************************************** |
| 1827 |
|
* section service |
| 1828 |
|
***************************************************************************/ |
| 1833 |
|
|
| 1834 |
|
service_name: NAME '=' QSTRING ';' |
| 1835 |
|
{ |
| 1836 |
< |
if (conf_parser_ctx.pass == 2) |
| 1836 |
> |
if (conf_parser_ctx.pass != 2) |
| 1837 |
> |
break; |
| 1838 |
> |
|
| 1839 |
> |
if (valid_servname(yylval.string)) |
| 1840 |
|
{ |
| 1841 |
< |
if (valid_servname(yylval.string)) |
| 1842 |
< |
{ |
| 1756 |
< |
struct MaskItem *conf = conf_make(CONF_SERVICE); |
| 1757 |
< |
conf->name = xstrdup(yylval.string); |
| 1758 |
< |
} |
| 1841 |
> |
struct MaskItem *conf = conf_make(CONF_SERVICE); |
| 1842 |
> |
conf->name = xstrdup(yylval.string); |
| 1843 |
|
} |
| 1844 |
|
}; |
| 1845 |
|
|
| 1868 |
|
conf->flags = block_state.flags.value; |
| 1869 |
|
conf->name = xstrdup(block_state.name.buf); |
| 1870 |
|
conf->user = xstrdup(block_state.user.buf); |
| 1871 |
< |
conf->user = xstrdup(block_state.host.buf); |
| 1871 |
> |
conf->host = xstrdup(block_state.host.buf); |
| 1872 |
|
}; |
| 1873 |
|
|
| 1874 |
|
shared_items: shared_items shared_item | shared_item; |
| 2053 |
|
!block_state.host.buf[0]) |
| 2054 |
|
break; |
| 2055 |
|
|
| 2056 |
< |
if (!(block_state.rpass.buf[0] || |
| 2057 |
< |
block_state.spass.buf[0])) |
| 2056 |
> |
if (!block_state.rpass.buf[0] || |
| 2057 |
> |
!block_state.spass.buf[0]) |
| 2058 |
|
break; |
| 2059 |
|
|
| 2060 |
|
if (has_wildcards(block_state.name.buf) || |
| 2069 |
|
conf->name = xstrdup(block_state.name.buf); |
| 2070 |
|
conf->passwd = xstrdup(block_state.rpass.buf); |
| 2071 |
|
conf->spasswd = xstrdup(block_state.spass.buf); |
| 2072 |
< |
conf->cipher_list = xstrdup(block_state.ciph.buf); |
| 2072 |
> |
|
| 2073 |
> |
if (block_state.cert.buf[0]) |
| 2074 |
> |
conf->certfp = xstrdup(block_state.cert.buf); |
| 2075 |
> |
|
| 2076 |
> |
if (block_state.ciph.buf[0]) |
| 2077 |
> |
conf->cipher_list = xstrdup(block_state.ciph.buf); |
| 2078 |
|
|
| 2079 |
|
dlinkMoveList(&block_state.leaf.list, &conf->leaf_list); |
| 2080 |
|
dlinkMoveList(&block_state.hub.list, &conf->hub_list); |
| 2107 |
|
connect_items: connect_items connect_item | connect_item; |
| 2108 |
|
connect_item: connect_name | connect_host | connect_vhost | |
| 2109 |
|
connect_send_password | connect_accept_password | |
| 2110 |
+ |
connect_ssl_certificate_fingerprint | |
| 2111 |
|
connect_aftype | connect_port | connect_ssl_cipher_list | |
| 2112 |
|
connect_flags | connect_hub_mask | connect_leaf_mask | |
| 2113 |
|
connect_class | connect_encrypted | |
| 2157 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |
| 2158 |
|
}; |
| 2159 |
|
|
| 2160 |
+ |
connect_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';' |
| 2161 |
+ |
{ |
| 2162 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2163 |
+ |
strlcpy(block_state.cert.buf, yylval.string, sizeof(block_state.cert.buf)); |
| 2164 |
+ |
}; |
| 2165 |
+ |
|
| 2166 |
|
connect_port: PORT '=' NUMBER ';' |
| 2167 |
|
{ |
| 2168 |
|
if (conf_parser_ctx.pass == 2) |
| 2256 |
|
!block_state.host.buf[0]) |
| 2257 |
|
break; |
| 2258 |
|
|
| 2259 |
+ |
conf = conf_make(CONF_KLINE); |
| 2260 |
+ |
conf->user = xstrdup(block_state.user.buf); |
| 2261 |
+ |
conf->host = xstrdup(block_state.host.buf); |
| 2262 |
|
|
| 2263 |
< |
if (block_state.port.value == 1) |
| 2264 |
< |
{ |
| 2166 |
< |
#ifdef HAVE_LIBPCRE |
| 2167 |
< |
void *exp_user = NULL; |
| 2168 |
< |
void *exp_host = NULL; |
| 2169 |
< |
const char *errptr = NULL; |
| 2170 |
< |
|
| 2171 |
< |
if (!(exp_user = ircd_pcre_compile(block_state.user.buf, &errptr)) || |
| 2172 |
< |
!(exp_host = ircd_pcre_compile(block_state.host.buf, &errptr))) |
| 2173 |
< |
{ |
| 2174 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based K-Line: %s", |
| 2175 |
< |
errptr); |
| 2176 |
< |
break; |
| 2177 |
< |
} |
| 2178 |
< |
|
| 2179 |
< |
conf = conf_make(CONF_RKLINE); |
| 2180 |
< |
conf->regexuser = exp_user; |
| 2181 |
< |
conf->regexhost = exp_host; |
| 2182 |
< |
|
| 2183 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 2184 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 2185 |
< |
|
| 2186 |
< |
if (block_state.rpass.buf[0]) |
| 2187 |
< |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2188 |
< |
else |
| 2189 |
< |
conf->reason = xstrdup(CONF_NOREASON); |
| 2190 |
< |
#else |
| 2191 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based K-Line: no PCRE support"); |
| 2192 |
< |
break; |
| 2193 |
< |
#endif |
| 2194 |
< |
} |
| 2263 |
> |
if (block_state.rpass.buf[0]) |
| 2264 |
> |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2265 |
|
else |
| 2266 |
< |
{ |
| 2267 |
< |
conf = conf_make(CONF_KLINE); |
| 2198 |
< |
|
| 2199 |
< |
conf->user = xstrdup(block_state.user.buf); |
| 2200 |
< |
conf->host = xstrdup(block_state.host.buf); |
| 2201 |
< |
|
| 2202 |
< |
if (block_state.rpass.buf[0]) |
| 2203 |
< |
conf->reason = xstrdup(block_state.rpass.buf); |
| 2204 |
< |
else |
| 2205 |
< |
conf->reason = xstrdup(CONF_NOREASON); |
| 2206 |
< |
add_conf_by_address(CONF_KLINE, conf); |
| 2207 |
< |
} |
| 2266 |
> |
conf->reason = xstrdup(CONF_NOREASON); |
| 2267 |
> |
add_conf_by_address(CONF_KLINE, conf); |
| 2268 |
|
}; |
| 2269 |
|
|
| 2210 |
– |
kill_type: TYPE |
| 2211 |
– |
{ |
| 2212 |
– |
if (conf_parser_ctx.pass == 2) |
| 2213 |
– |
block_state.port.value = 0; |
| 2214 |
– |
} '=' kill_type_items ';'; |
| 2215 |
– |
|
| 2216 |
– |
kill_type_items: kill_type_items ',' kill_type_item | kill_type_item; |
| 2217 |
– |
kill_type_item: REGEX_T |
| 2218 |
– |
{ |
| 2219 |
– |
if (conf_parser_ctx.pass == 2) |
| 2220 |
– |
block_state.port.value = 1; |
| 2221 |
– |
}; |
| 2222 |
– |
|
| 2270 |
|
kill_items: kill_items kill_item | kill_item; |
| 2271 |
< |
kill_item: kill_user | kill_reason | kill_type | error; |
| 2271 |
> |
kill_item: kill_user | kill_reason | error; |
| 2272 |
|
|
| 2273 |
|
kill_user: USER '=' QSTRING ';' |
| 2274 |
|
{ |
| 2380 |
|
if (!block_state.name.buf[0]) |
| 2381 |
|
break; |
| 2382 |
|
|
| 2383 |
< |
if (block_state.port.value == 1) |
| 2337 |
< |
{ |
| 2338 |
< |
#ifdef HAVE_LIBPCRE |
| 2339 |
< |
void *exp_p = NULL; |
| 2340 |
< |
const char *errptr = NULL; |
| 2341 |
< |
|
| 2342 |
< |
if (!(exp_p = ircd_pcre_compile(block_state.name.buf, &errptr))) |
| 2343 |
< |
{ |
| 2344 |
< |
ilog(LOG_TYPE_IRCD, "Failed to add regular expression based X-Line: %s", |
| 2345 |
< |
errptr); |
| 2346 |
< |
break; |
| 2347 |
< |
} |
| 2348 |
< |
|
| 2349 |
< |
conf = conf_make(CONF_RXLINE); |
| 2350 |
< |
conf->regexuser = exp_p; |
| 2351 |
< |
#else |
| 2352 |
< |
conf_error_report("Failed to add regular expression based X-Line: no PCRE support"); |
| 2353 |
< |
break; |
| 2354 |
< |
#endif |
| 2355 |
< |
} |
| 2356 |
< |
else |
| 2357 |
< |
conf = conf_make(CONF_XLINE); |
| 2358 |
< |
|
| 2383 |
> |
conf = conf_make(CONF_XLINE); |
| 2384 |
|
conf->name = xstrdup(block_state.name.buf); |
| 2385 |
|
|
| 2386 |
|
if (block_state.rpass.buf[0]) |
| 2389 |
|
conf->reason = xstrdup(CONF_NOREASON); |
| 2390 |
|
}; |
| 2391 |
|
|
| 2367 |
– |
gecos_flags: TYPE |
| 2368 |
– |
{ |
| 2369 |
– |
if (conf_parser_ctx.pass == 2) |
| 2370 |
– |
block_state.port.value = 0; |
| 2371 |
– |
} '=' gecos_flags_items ';'; |
| 2372 |
– |
|
| 2373 |
– |
gecos_flags_items: gecos_flags_items ',' gecos_flags_item | gecos_flags_item; |
| 2374 |
– |
gecos_flags_item: REGEX_T |
| 2375 |
– |
{ |
| 2376 |
– |
if (conf_parser_ctx.pass == 2) |
| 2377 |
– |
block_state.port.value = 1; |
| 2378 |
– |
}; |
| 2379 |
– |
|
| 2392 |
|
gecos_items: gecos_items gecos_item | gecos_item; |
| 2393 |
< |
gecos_item: gecos_name | gecos_reason | gecos_flags | error; |
| 2393 |
> |
gecos_item: gecos_name | gecos_reason | error; |
| 2394 |
|
|
| 2395 |
|
gecos_name: NAME '=' QSTRING ';' |
| 2396 |
|
{ |
| 2424 |
|
general_pace_wait_simple | general_stats_P_oper_only | |
| 2425 |
|
general_short_motd | general_no_oper_flood | |
| 2426 |
|
general_true_no_oper_flood | general_oper_pass_resv | |
| 2415 |
– |
general_message_locale | |
| 2427 |
|
general_oper_only_umodes | general_max_targets | |
| 2428 |
|
general_use_egd | general_egdpool_path | |
| 2429 |
|
general_oper_umodes | general_caller_id_wait | |
| 2430 |
|
general_opers_bypass_callerid | general_default_floodcount | |
| 2431 |
|
general_min_nonwildcard | general_min_nonwildcard_simple | |
| 2421 |
– |
general_disable_remote_commands | |
| 2432 |
|
general_throttle_time | general_havent_read_conf | |
| 2433 |
|
general_ping_cookie | |
| 2434 |
|
general_disable_auth | |
| 2494 |
|
ConfigFileEntry.ignore_bogus_ts = yylval.number; |
| 2495 |
|
}; |
| 2496 |
|
|
| 2487 |
– |
general_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';' |
| 2488 |
– |
{ |
| 2489 |
– |
ConfigFileEntry.disable_remote = yylval.number; |
| 2490 |
– |
}; |
| 2491 |
– |
|
| 2497 |
|
general_failed_oper_notice: FAILED_OPER_NOTICE '=' TBOOL ';' |
| 2498 |
|
{ |
| 2499 |
|
ConfigFileEntry.failed_oper_notice = yylval.number; |
| 2627 |
|
ConfigFileEntry.oper_pass_resv = yylval.number; |
| 2628 |
|
}; |
| 2629 |
|
|
| 2625 |
– |
general_message_locale: MESSAGE_LOCALE '=' QSTRING ';' |
| 2626 |
– |
{ |
| 2627 |
– |
if (conf_parser_ctx.pass == 2) |
| 2628 |
– |
{ |
| 2629 |
– |
if (strlen(yylval.string) > LOCALE_LENGTH-2) |
| 2630 |
– |
yylval.string[LOCALE_LENGTH-1] = '\0'; |
| 2631 |
– |
|
| 2632 |
– |
set_locale(yylval.string); |
| 2633 |
– |
} |
| 2634 |
– |
}; |
| 2635 |
– |
|
| 2630 |
|
general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';' |
| 2631 |
|
{ |
| 2632 |
|
ConfigFileEntry.dots_in_ident = $3; |
| 2687 |
|
} | T_CCONN |
| 2688 |
|
{ |
| 2689 |
|
ConfigFileEntry.oper_umodes |= UMODE_CCONN; |
| 2696 |
– |
} | T_CCONN_FULL |
| 2697 |
– |
{ |
| 2698 |
– |
ConfigFileEntry.oper_umodes |= UMODE_CCONN_FULL; |
| 2690 |
|
} | T_DEAF |
| 2691 |
|
{ |
| 2692 |
|
ConfigFileEntry.oper_umodes |= UMODE_DEAF; |
| 2738 |
|
} | T_LOCOPS |
| 2739 |
|
{ |
| 2740 |
|
ConfigFileEntry.oper_umodes |= UMODE_LOCOPS; |
| 2741 |
+ |
} | T_NONONREG |
| 2742 |
+ |
{ |
| 2743 |
+ |
ConfigFileEntry.oper_umodes |= UMODE_REGONLY; |
| 2744 |
+ |
} | T_FARCONNECT |
| 2745 |
+ |
{ |
| 2746 |
+ |
ConfigFileEntry.oper_umodes |= UMODE_FARCONNECT; |
| 2747 |
|
}; |
| 2748 |
|
|
| 2749 |
|
general_oper_only_umodes: OPER_ONLY_UMODES |
| 2758 |
|
} | T_CCONN |
| 2759 |
|
{ |
| 2760 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_CCONN; |
| 2764 |
– |
} | T_CCONN_FULL |
| 2765 |
– |
{ |
| 2766 |
– |
ConfigFileEntry.oper_only_umodes |= UMODE_CCONN_FULL; |
| 2761 |
|
} | T_DEAF |
| 2762 |
|
{ |
| 2763 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_DEAF; |
| 2809 |
|
} | T_LOCOPS |
| 2810 |
|
{ |
| 2811 |
|
ConfigFileEntry.oper_only_umodes |= UMODE_LOCOPS; |
| 2812 |
+ |
} | T_NONONREG |
| 2813 |
+ |
{ |
| 2814 |
+ |
ConfigFileEntry.oper_only_umodes |= UMODE_REGONLY; |
| 2815 |
+ |
} | T_FARCONNECT |
| 2816 |
+ |
{ |
| 2817 |
+ |
ConfigFileEntry.oper_only_umodes |= UMODE_FARCONNECT; |
| 2818 |
|
}; |
| 2819 |
|
|
| 2820 |
|
general_min_nonwildcard: MIN_NONWILDCARD '=' NUMBER ';' |
| 2843 |
|
channel_item: channel_max_bans | |
| 2844 |
|
channel_knock_delay | channel_knock_delay_channel | |
| 2845 |
|
channel_max_chans_per_user | channel_max_chans_per_oper | |
| 2846 |
< |
channel_quiet_on_ban | channel_default_split_user_count | |
| 2846 |
> |
channel_default_split_user_count | |
| 2847 |
|
channel_default_split_server_count | |
| 2848 |
< |
channel_no_create_on_split | channel_restrict_channels | |
| 2848 |
> |
channel_no_create_on_split | |
| 2849 |
|
channel_no_join_on_split | |
| 2850 |
|
channel_jflood_count | channel_jflood_time | |
| 2851 |
|
channel_disable_fake_channels | error; |
| 2855 |
|
ConfigChannel.disable_fake_channels = yylval.number; |
| 2856 |
|
}; |
| 2857 |
|
|
| 2858 |
– |
channel_restrict_channels: RESTRICT_CHANNELS '=' TBOOL ';' |
| 2859 |
– |
{ |
| 2860 |
– |
ConfigChannel.restrict_channels = yylval.number; |
| 2861 |
– |
}; |
| 2862 |
– |
|
| 2858 |
|
channel_knock_delay: KNOCK_DELAY '=' timespec ';' |
| 2859 |
|
{ |
| 2860 |
|
ConfigChannel.knock_delay = $3; |
| 2875 |
|
ConfigChannel.max_chans_per_oper = $3; |
| 2876 |
|
}; |
| 2877 |
|
|
| 2883 |
– |
channel_quiet_on_ban: QUIET_ON_BAN '=' TBOOL ';' |
| 2884 |
– |
{ |
| 2885 |
– |
ConfigChannel.quiet_on_ban = yylval.number; |
| 2886 |
– |
}; |
| 2887 |
– |
|
| 2878 |
|
channel_max_bans: MAX_BANS '=' NUMBER ';' |
| 2879 |
|
{ |
| 2880 |
|
ConfigChannel.max_bans = $3; |
| 2917 |
|
'{' serverhide_items '}' ';'; |
| 2918 |
|
|
| 2919 |
|
serverhide_items: serverhide_items serverhide_item | serverhide_item; |
| 2920 |
< |
serverhide_item: serverhide_flatten_links | serverhide_hide_servers | |
| 2920 |
> |
serverhide_item: serverhide_flatten_links | serverhide_disable_remote_commands | |
| 2921 |
> |
serverhide_hide_servers | |
| 2922 |
> |
serverhide_hide_services | |
| 2923 |
|
serverhide_links_delay | |
| 2924 |
|
serverhide_hidden | serverhide_hidden_name | |
| 2925 |
|
serverhide_hide_server_ips | |
| 2931 |
|
ConfigServerHide.flatten_links = yylval.number; |
| 2932 |
|
}; |
| 2933 |
|
|
| 2934 |
+ |
serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';' |
| 2935 |
+ |
{ |
| 2936 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2937 |
+ |
ConfigServerHide.disable_remote_commands = yylval.number; |
| 2938 |
+ |
}; |
| 2939 |
+ |
|
| 2940 |
|
serverhide_hide_servers: HIDE_SERVERS '=' TBOOL ';' |
| 2941 |
|
{ |
| 2942 |
|
if (conf_parser_ctx.pass == 2) |
| 2943 |
|
ConfigServerHide.hide_servers = yylval.number; |
| 2944 |
|
}; |
| 2945 |
|
|
| 2946 |
+ |
serverhide_hide_services: HIDE_SERVICES '=' TBOOL ';' |
| 2947 |
+ |
{ |
| 2948 |
+ |
if (conf_parser_ctx.pass == 2) |
| 2949 |
+ |
ConfigServerHide.hide_services = yylval.number; |
| 2950 |
+ |
}; |
| 2951 |
+ |
|
| 2952 |
|
serverhide_hidden_name: HIDDEN_NAME '=' QSTRING ';' |
| 2953 |
|
{ |
| 2954 |
|
if (conf_parser_ctx.pass == 2) |