ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf_parser.y
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf_parser.y (file contents):
Revision 6375 by michael, Fri Aug 21 10:34:16 2015 UTC vs.
Revision 7624 by michael, Thu Jun 23 12:44:09 2016 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 2000-2015 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
# Line 27 | Line 27
27  
28   %{
29  
30 #include <sys/types.h>
31 #include <string.h>
32
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"
43 #include "client.h"     /* for UMODE_SERVNOTICE only */
45   #include "irc_string.h"
46   #include "memory.h"
47   #include "modules.h"
48   #include "server.h"
49   #include "hostmask.h"
49 #include "send.h"
50   #include "listener.h"
51 #include "resv.h"
52 #include "numeric.h"
51   #include "user.h"
52   #include "motd.h"
53  
56 #ifdef HAVE_LIBCRYPTO
57 #include <openssl/rsa.h>
58 #include <openssl/bio.h>
59 #include <openssl/pem.h>
60 #include <openssl/dh.h>
61 #endif
62
63 #include "rsa.h"
64
54   int yylex(void);
55  
56   static struct
# Line 110 | Line 99 | static struct
99      max_total,
100      max_global,
101      max_local,
113    max_ident,
102      max_sendq,
103      max_recvq,
104      max_channels,
# Line 126 | Line 114 | reset_block_state(void)
114  
115    DLINK_FOREACH_SAFE(node, node_next, block_state.mask.list.head)
116    {
117 <    MyFree(node->data);
117 >    xfree(node->data);
118      dlinkDelete(node, &block_state.mask.list);
119      free_dlink_node(node);
120    }
121  
122    DLINK_FOREACH_SAFE(node, node_next, block_state.leaf.list.head)
123    {
124 <    MyFree(node->data);
124 >    xfree(node->data);
125      dlinkDelete(node, &block_state.leaf.list);
126      free_dlink_node(node);
127    }
128  
129    DLINK_FOREACH_SAFE(node, node_next, block_state.hub.list.head)
130    {
131 <    MyFree(node->data);
131 >    xfree(node->data);
132      dlinkDelete(node, &block_state.hub.list);
133      free_dlink_node(node);
134    }
# Line 167 | Line 155 | reset_block_state(void)
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
# Line 192 | Line 182 | reset_block_state(void)
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  HIDDEN
# Line 209 | Line 201 | reset_block_state(void)
201   %token  INVISIBLE_ON_CONNECT
202   %token  INVITE_CLIENT_COUNT
203   %token  INVITE_CLIENT_TIME
204 + %token  INVITE_DELAY_CHANNEL
205   %token  IP
206   %token  IRCD_AUTH
207   %token  IRCD_FLAGS
208   %token  IRCD_SID
209 + %token  JOIN
210   %token  KILL
211   %token  KILL_CHASE_TIME_LIMIT
212   %token  KLINE
# Line 223 | Line 217 | reset_block_state(void)
217   %token  KNOCK_CLIENT_TIME
218   %token  KNOCK_DELAY_CHANNEL
219   %token  LEAF_MASK
220 < %token  LINKS_DELAY
220 > %token  LIBGEOIP_DATABASE_OPTIONS
221 > %token  LIBGEOIP_IPV4_DATABASE_FILE
222 > %token  LIBGEOIP_IPV6_DATABASE_FILE
223   %token  LISTEN
224   %token  MASK
225   %token  MAX_ACCEPT
226   %token  MAX_BANS
227   %token  MAX_CHANNELS
228   %token  MAX_GLOBAL
233 %token  MAX_IDENT
229   %token  MAX_IDLE
230   %token  MAX_LOCAL
231   %token  MAX_NICK_CHANGES
# Line 240 | Line 235 | reset_block_state(void)
235   %token  MAX_TARGETS
236   %token  MAX_TOPIC_LENGTH
237   %token  MAX_WATCH
238 + %token  MEMORY_CACHE
239   %token  MIN_IDLE
240   %token  MIN_NONWILDCARD
241   %token  MIN_NONWILDCARD_SIMPLE
242 + %token  MMAP_CACHE
243   %token  MODULE
244   %token  MODULES
245   %token  MOTD
# Line 258 | Line 255 | reset_block_state(void)
255   %token  NUMBER_PER_CIDR
256   %token  NUMBER_PER_IP
257   %token  OPER_ONLY_UMODES
261 %token  OPER_PASS_RESV
258   %token  OPER_UMODES
259   %token  OPERATOR
260   %token  OPERS_BYPASS_CALLERID
# Line 280 | Line 276 | reset_block_state(void)
276   %token  RESV
277   %token  RESV_EXEMPT
278   %token  RSA_PRIVATE_KEY_FILE
283 %token  RSA_PUBLIC_KEY_FILE
279   %token  SECONDS MINUTES HOURS DAYS WEEKS MONTHS YEARS
280   %token  SEND_PASSWORD
281   %token  SENDQ
# Line 296 | Line 291 | reset_block_state(void)
291   %token  SSL_DH_ELLIPTIC_CURVE
292   %token  SSL_DH_PARAM_FILE
293   %token  SSL_MESSAGE_DIGEST_ALGORITHM
294 + %token  STANDARD
295   %token  STATS_E_DISABLED
296   %token  STATS_I_OPER_ONLY
297   %token  STATS_K_OPER_ONLY
# Line 367 | Line 363 | reset_block_state(void)
363   %token  VHOST6
364   %token  WARN_NO_CONNECT_BLOCK
365   %token  WHOIS
366 + %token  WHOWAS_HISTORY_LENGTH
367   %token  XLINE
368   %token  XLINE_EXEMPT
369  
# Line 429 | Line 426 | sizespec:   NUMBER sizespec_ { $$ = $1 +
426  
427  
428   /***************************************************************************
429 < *  section modules
429 > * modules {} section
430   ***************************************************************************/
431 < modules_entry: MODULES
435 <  '{' modules_items '}' ';';
431 > modules_entry: MODULES '{' modules_items '}' ';';
432  
433   modules_items:  modules_items modules_item | modules_item;
434   modules_item:   modules_module | modules_path | error ';' ;
# Line 450 | Line 446 | modules_path: PATH '=' QSTRING ';'
446   };
447  
448  
449 + /***************************************************************************
450 + * serverinfo {}  section
451 + ***************************************************************************/
452   serverinfo_entry: SERVERINFO '{' serverinfo_items '}' ';';
453  
454   serverinfo_items:       serverinfo_items serverinfo_item | serverinfo_item ;
# Line 470 | Line 469 | serverinfo_item:        serverinfo_name
469                          serverinfo_ssl_certificate_file |
470                          serverinfo_ssl_cipher_list |
471                          serverinfo_ssl_message_digest_algorithm |
472 +                        serverinfo_libgeoip_database_options |
473 +                        serverinfo_libgeoip_ipv4_database_file |
474 +                        serverinfo_libgeoip_ipv6_database_file |
475                          error ';' ;
476  
477  
478   serverinfo_ssl_certificate_file: SSL_CERTIFICATE_FILE '=' QSTRING ';'
479   {
478 #ifdef HAVE_LIBCRYPTO
480    if (conf_parser_ctx.pass == 2)
481    {
482 <    if (!ConfigServerInfo.rsa_private_key_file)
483 <    {
483 <      conf_error_report("No rsa_private_key_file specified, SSL disabled");
484 <      break;
485 <    }
486 <
487 <    if (SSL_CTX_use_certificate_chain_file(ConfigServerInfo.server_ctx, yylval.string) <= 0 ||
488 <        SSL_CTX_use_certificate_chain_file(ConfigServerInfo.client_ctx, yylval.string) <= 0)
489 <    {
490 <      report_crypto_errors();
491 <      conf_error_report("Could not open/read certificate file");
492 <      break;
493 <    }
494 <
495 <    if (SSL_CTX_use_PrivateKey_file(ConfigServerInfo.server_ctx, ConfigServerInfo.rsa_private_key_file,
496 <                                    SSL_FILETYPE_PEM) <= 0 ||
497 <        SSL_CTX_use_PrivateKey_file(ConfigServerInfo.client_ctx, ConfigServerInfo.rsa_private_key_file,
498 <                                    SSL_FILETYPE_PEM) <= 0)
499 <    {
500 <      report_crypto_errors();
501 <      conf_error_report("Could not read RSA private key");
502 <      break;
503 <    }
504 <
505 <    if (!SSL_CTX_check_private_key(ConfigServerInfo.server_ctx) ||
506 <        !SSL_CTX_check_private_key(ConfigServerInfo.client_ctx))
507 <    {
508 <      report_crypto_errors();
509 <      conf_error_report("Could not read RSA private key");
510 <      break;
511 <    }
482 >    xfree(ConfigServerInfo.ssl_certificate_file);
483 >    ConfigServerInfo.ssl_certificate_file = xstrdup(yylval.string);
484    }
513 #endif
485   };
486  
487   serverinfo_rsa_private_key_file: RSA_PRIVATE_KEY_FILE '=' QSTRING ';'
488   {
489 < #ifdef HAVE_LIBCRYPTO
519 <  BIO *file = NULL;
520 <
521 <  if (conf_parser_ctx.pass != 1)
522 <    break;
523 <
524 <  if (ConfigServerInfo.rsa_private_key)
525 <  {
526 <    RSA_free(ConfigServerInfo.rsa_private_key);
527 <    ConfigServerInfo.rsa_private_key = NULL;
528 <  }
529 <
530 <  if (ConfigServerInfo.rsa_private_key_file)
489 >  if (conf_parser_ctx.pass == 2)
490    {
491 <    MyFree(ConfigServerInfo.rsa_private_key_file);
492 <    ConfigServerInfo.rsa_private_key_file = NULL;
491 >    xfree(ConfigServerInfo.rsa_private_key_file);
492 >    ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
493    }
494 + };
495  
496 <  ConfigServerInfo.rsa_private_key_file = xstrdup(yylval.string);
497 <
498 <  if ((file = BIO_new_file(yylval.string, "r")) == NULL)
496 > serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
497 > {
498 >  if (conf_parser_ctx.pass == 2)
499    {
500 <    conf_error_report("File open failed, ignoring");
501 <    break;
500 >    xfree(ConfigServerInfo.ssl_dh_param_file);
501 >    ConfigServerInfo.ssl_dh_param_file = xstrdup(yylval.string);
502    }
503 + };
504  
505 <  ConfigServerInfo.rsa_private_key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
506 <
507 <  BIO_set_close(file, BIO_CLOSE);
547 <  BIO_free(file);
548 <
549 <  if (ConfigServerInfo.rsa_private_key == NULL)
505 > serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
506 > {
507 >  if (conf_parser_ctx.pass == 2)
508    {
509 <    conf_error_report("Couldn't extract key, ignoring");
510 <    break;
509 >    xfree(ConfigServerInfo.ssl_cipher_list);
510 >    ConfigServerInfo.ssl_cipher_list = xstrdup(yylval.string);
511    }
512 + };
513  
514 <  if (!RSA_check_key(ConfigServerInfo.rsa_private_key))
514 > serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
515 > {
516 >  if (conf_parser_ctx.pass == 2)
517    {
518 <    RSA_free(ConfigServerInfo.rsa_private_key);
519 <    ConfigServerInfo.rsa_private_key = NULL;
559 <
560 <    conf_error_report("Invalid key, ignoring");
561 <    break;
518 >    xfree(ConfigServerInfo.ssl_message_digest_algorithm);
519 >    ConfigServerInfo.ssl_message_digest_algorithm = xstrdup(yylval.string);
520    }
521 + }
522  
523 <  if (RSA_size(ConfigServerInfo.rsa_private_key) < 128)
523 > serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
524 > {
525 >  if (conf_parser_ctx.pass == 2)
526    {
527 <    RSA_free(ConfigServerInfo.rsa_private_key);
528 <    ConfigServerInfo.rsa_private_key = NULL;
568 <
569 <    conf_error_report("Ignoring serverinfo::rsa_private_key_file -- need at least a 1024 bit key size");
527 >    xfree(ConfigServerInfo.ssl_dh_elliptic_curve);
528 >    ConfigServerInfo.ssl_dh_elliptic_curve = xstrdup(yylval.string);
529    }
571 #endif
530   };
531  
532 < serverinfo_ssl_dh_param_file: SSL_DH_PARAM_FILE '=' QSTRING ';'
532 > serverinfo_libgeoip_database_options: LIBGEOIP_DATABASE_OPTIONS
533   {
534 < #ifdef HAVE_LIBCRYPTO
535 <  if (conf_parser_ctx.pass == 2)
536 <  {
579 <    BIO *file = BIO_new_file(yylval.string, "r");
580 <
581 <    if (file)
582 <    {
583 <      DH *dh = PEM_read_bio_DHparams(file, NULL, NULL, NULL);
584 <
585 <      BIO_free(file);
586 <
587 <      if (dh)
588 <      {
589 <        if (DH_size(dh) < 128)
590 <          conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- need at least a 1024 bit DH prime size");
591 <        else
592 <          SSL_CTX_set_tmp_dh(ConfigServerInfo.server_ctx, dh);
534 >  if (conf_parser_ctx.pass == 1)
535 >    ConfigServerInfo.libgeoip_database_options = 0;
536 > } '='  options_items ';';
537  
538 <        DH_free(dh);
539 <      }
540 <    }
541 <    else
542 <      conf_error_report("Ignoring serverinfo::ssl_dh_param_file -- could not open/read Diffie-Hellman parameter file");
543 <  }
538 > options_items: options_items ',' options_item | options_item;
539 > options_item: STANDARD
540 > {
541 > #ifdef HAVE_LIBGEOIP
542 >  if (conf_parser_ctx.pass == 1)
543 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_STANDARD;
544   #endif
545 < };
602 <
603 < serverinfo_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
545 > } | MEMORY_CACHE
546   {
547 < #ifdef HAVE_LIBCRYPTO
548 <  if (conf_parser_ctx.pass == 2)
549 <    SSL_CTX_set_cipher_list(ConfigServerInfo.server_ctx, yylval.string);
547 > #ifdef HAVE_LIBGEOIP
548 >  if (conf_parser_ctx.pass == 1)
549 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_MEMORY_CACHE;
550 > #endif
551 > } | MMAP_CACHE
552 > {
553 > #ifdef HAVE_LIBGEOIP
554 >  if (conf_parser_ctx.pass == 1)
555 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_MMAP_CACHE;
556 > #endif
557 > } | CHECK_CACHE
558 > {
559 > #ifdef HAVE_LIBGEOIP
560 >  if (conf_parser_ctx.pass == 1)
561 >    ConfigServerInfo.libgeoip_database_options |= GEOIP_CHECK_CACHE;
562   #endif
563   };
564  
565 < serverinfo_ssl_message_digest_algorithm: SSL_MESSAGE_DIGEST_ALGORITHM '=' QSTRING ';'
565 > serverinfo_libgeoip_ipv4_database_file:  LIBGEOIP_IPV4_DATABASE_FILE '=' QSTRING ';'
566   {
613 #ifdef HAVE_LIBCRYPTO
567    if (conf_parser_ctx.pass == 2)
568    {
569 <    if ((ConfigServerInfo.message_digest_algorithm = EVP_get_digestbyname(yylval.string)) == NULL)
570 <    {
571 <      ConfigServerInfo.message_digest_algorithm = EVP_sha256();
572 <      conf_error_report("Ignoring serverinfo::ssl_message_digest_algorithm -- unknown message digest algorithm");
573 <    }
574 <  }
569 >    xfree(ConfigServerInfo.libgeoip_ipv4_database_file);
570 >    ConfigServerInfo.libgeoip_ipv4_database_file = xstrdup(yylval.string);
571 >
572 > #ifdef HAVE_LIBGEOIP
573 >    if (GeoIPv4_ctx)
574 >      GeoIP_delete(GeoIPv4_ctx);
575 >    GeoIPv4_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
576   #endif
577 < }
577 >  }
578 > };
579  
580 < serverinfo_ssl_dh_elliptic_curve: SSL_DH_ELLIPTIC_CURVE '=' QSTRING ';'
580 > serverinfo_libgeoip_ipv6_database_file:  LIBGEOIP_IPV6_DATABASE_FILE '=' QSTRING ';'
581   {
627 #ifdef HAVE_LIBCRYPTO
628 #if OPENSSL_VERSION_NUMBER >= 0x009080FFL && !defined(OPENSSL_NO_ECDH)
629  int nid = 0;
630  EC_KEY *key = NULL;
631
582    if (conf_parser_ctx.pass == 2)
583    {
584 <    if ((nid = OBJ_sn2nid(yylval.string)) == 0)
585 <    {
636 <        conf_error_report("Ignoring serverinfo::ssl_dh_elliptic_curve -- unknown curve name");
637 <        break;
638 <    }
584 >    xfree(ConfigServerInfo.libgeoip_ipv6_database_file);
585 >    ConfigServerInfo.libgeoip_ipv6_database_file = xstrdup(yylval.string);
586  
587 <    if ((key = EC_KEY_new_by_curve_name(nid)) == NULL)
588 <    {
589 <      conf_error_report("Ignoring serverinfo::ssl_dh_elliptic_curve -- could not create curve");
590 <      break;
644 <    }
645 <
646 <    SSL_CTX_set_tmp_ecdh(ConfigServerInfo.server_ctx, key);
647 <    EC_KEY_free(key);
648 < }
649 < #endif
587 > #ifdef HAVE_LIBGEOIP
588 >    if (GeoIPv6_ctx)
589 >      GeoIP_delete(GeoIPv6_ctx);
590 >    GeoIPv6_ctx = GeoIP_open(yylval.string, ConfigServerInfo.libgeoip_database_options);
591   #endif
592 +  }
593   };
594  
595   serverinfo_name: NAME '=' QSTRING ';'
596   {
597 <  /* this isn't rehashable */
597 >  /* This isn't rehashable */
598    if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.name)
599    {
600      if (valid_servname(yylval.string))
# Line 660 | Line 602 | serverinfo_name: NAME '=' QSTRING ';'
602      else
603      {
604        conf_error_report("Ignoring serverinfo::name -- invalid name. Aborting.");
605 <      exit(0);
605 >      exit(EXIT_FAILURE);
606      }
607    }
608   };
609  
610   serverinfo_sid: IRCD_SID '=' QSTRING ';'
611   {
612 <  /* this isn't rehashable */
612 >  /* This isn't rehashable */
613    if (conf_parser_ctx.pass == 2 && !ConfigServerInfo.sid)
614    {
615      if (valid_sid(yylval.string))
# Line 675 | Line 617 | serverinfo_sid: IRCD_SID '=' QSTRING ';'
617      else
618      {
619        conf_error_report("Ignoring serverinfo::sid -- invalid SID. Aborting.");
620 <      exit(0);
620 >      exit(EXIT_FAILURE);
621      }
622    }
623   };
# Line 684 | Line 626 | serverinfo_description: DESCRIPTION '='
626   {
627    if (conf_parser_ctx.pass == 2)
628    {
629 <    MyFree(ConfigServerInfo.description);
629 >    xfree(ConfigServerInfo.description);
630      ConfigServerInfo.description = xstrdup(yylval.string);
631      strlcpy(me.info, ConfigServerInfo.description, sizeof(me.info));
632    }
# Line 699 | Line 641 | serverinfo_network_name: NETWORK_NAME '=
641      if ((p = strchr(yylval.string, ' ')))
642        *p = '\0';
643  
644 <    MyFree(ConfigServerInfo.network_name);
644 >    xfree(ConfigServerInfo.network_name);
645      ConfigServerInfo.network_name = xstrdup(yylval.string);
646    }
647   };
# Line 709 | Line 651 | serverinfo_network_desc: NETWORK_DESC '=
651    if (conf_parser_ctx.pass != 2)
652      break;
653  
654 <  MyFree(ConfigServerInfo.network_desc);
654 >  xfree(ConfigServerInfo.network_desc);
655    ConfigServerInfo.network_desc = xstrdup(yylval.string);
656   };
657  
# Line 844 | Line 786 | serverinfo_hub: HUB '=' TBOOL ';'
786      ConfigServerInfo.hub = yylval.number;
787   };
788  
789 +
790   /***************************************************************************
791 < * admin section
791 > * admin {} section
792   ***************************************************************************/
793   admin_entry: ADMIN  '{' admin_items '}' ';' ;
794  
# Line 860 | Line 803 | admin_name: NAME '=' QSTRING ';'
803    if (conf_parser_ctx.pass != 2)
804      break;
805  
806 <  MyFree(ConfigAdminInfo.name);
806 >  xfree(ConfigAdminInfo.name);
807    ConfigAdminInfo.name = xstrdup(yylval.string);
808   };
809  
# Line 869 | Line 812 | admin_email: EMAIL '=' QSTRING ';'
812    if (conf_parser_ctx.pass != 2)
813      break;
814  
815 <  MyFree(ConfigAdminInfo.email);
815 >  xfree(ConfigAdminInfo.email);
816    ConfigAdminInfo.email = xstrdup(yylval.string);
817   };
818  
# Line 878 | Line 821 | admin_description: DESCRIPTION '=' QSTRI
821    if (conf_parser_ctx.pass != 2)
822      break;
823  
824 <  MyFree(ConfigAdminInfo.description);
824 >  xfree(ConfigAdminInfo.description);
825    ConfigAdminInfo.description = xstrdup(yylval.string);
826   };
827  
828 +
829   /***************************************************************************
830 < * motd section
830 > * motd {} section
831   ***************************************************************************/
832   motd_entry: MOTD
833   {
# Line 918 | Line 862 | motd_file: T_FILE '=' QSTRING ';'
862      strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
863   };
864  
865 +
866   /***************************************************************************
867 < * pseudo section
867 > * pseudo {} section
868   ***************************************************************************/
869   pseudo_entry: T_PSEUDO
870   {
# Line 979 | Line 924 | pseudo_target: T_TARGET '=' QSTRING ';'
924    }
925   };
926  
927 +
928   /***************************************************************************
929 < *  section logging
929 > * log {} section
930   ***************************************************************************/
931   logging_entry:          T_LOG  '{' logging_items '}' ';' ;
932   logging_items:          logging_items logging_item | logging_item ;
# Line 1073 | Line 1019 | logging_file_type_item:  USER
1019  
1020  
1021   /***************************************************************************
1022 < * section oper
1022 > * operator {} section
1023   ***************************************************************************/
1024   oper_entry: OPERATOR
1025   {
# Line 1091 | Line 1037 | oper_entry: OPERATOR
1037  
1038    if (!block_state.name.buf[0])
1039      break;
1040 < #ifdef HAVE_LIBCRYPTO
1095 <  if (!block_state.file.buf[0] &&
1096 <      !block_state.rpass.buf[0])
1097 <    break;
1098 < #else
1040 >
1041    if (!block_state.rpass.buf[0])
1042      break;
1101 #endif
1043  
1044    DLINK_FOREACH(node, block_state.mask.list.head)
1045    {
1046      struct MaskItem *conf = NULL;
1047      struct split_nuh_item nuh;
1048 +    char *s = node->data;
1049 +
1050 +    if (EmptyString(s))
1051 +      continue;
1052  
1053 <    nuh.nuhmask  = node->data;
1053 >    nuh.nuhmask  = s;
1054      nuh.nickptr  = NULL;
1055      nuh.userptr  = block_state.user.buf;
1056      nuh.hostptr  = block_state.host.buf;
# Line 1134 | Line 1079 | oper_entry: OPERATOR
1079      conf->htype = parse_netmask(conf->host, &conf->addr, &conf->bits);
1080  
1081      conf_add_class_to_conf(conf, block_state.class.buf);
1137
1138 #ifdef HAVE_LIBCRYPTO
1139    if (block_state.file.buf[0])
1140    {
1141      BIO *file = NULL;
1142      RSA *pkey = NULL;
1143
1144      if ((file = BIO_new_file(block_state.file.buf, "r")) == NULL)
1145      {
1146        ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- file doesn't exist");
1147        break;
1148      }
1149
1150      if ((pkey = PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL)) == NULL)
1151        ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key invalid; check key syntax");
1152      else
1153      {
1154        if (RSA_size(pkey) > 128)
1155          ilog(LOG_TYPE_IRCD, "Ignoring rsa_public_key_file -- key size must be 1024 or below");
1156        else
1157          conf->rsa_public_key = pkey;
1158      }
1159
1160      BIO_set_close(file, BIO_CLOSE);
1161      BIO_free(file);
1162    }
1163 #endif /* HAVE_LIBCRYPTO */
1082    }
1083   };
1084  
# Line 1172 | Line 1090 | oper_item:      oper_name |
1090                  oper_umodes |
1091                  oper_class |
1092                  oper_encrypted |
1175                oper_rsa_public_key_file |
1093                  oper_ssl_certificate_fingerprint |
1094                  oper_ssl_connection_required |
1095                  oper_flags |
# Line 1213 | Line 1130 | oper_encrypted: ENCRYPTED '=' TBOOL ';'
1130      block_state.flags.value &= ~CONF_FLAGS_ENCRYPTED;
1131   };
1132  
1216 oper_rsa_public_key_file: RSA_PUBLIC_KEY_FILE '=' QSTRING ';'
1217 {
1218  if (conf_parser_ctx.pass == 2)
1219    strlcpy(block_state.file.buf, yylval.string, sizeof(block_state.file.buf));
1220 };
1221
1133   oper_ssl_certificate_fingerprint: SSL_CERTIFICATE_FINGERPRINT '=' QSTRING ';'
1134   {
1135    if (conf_parser_ctx.pass == 2)
# Line 1402 | Line 1313 | oper_flags_item: KILL ':' REMOTE
1313   {
1314    if (conf_parser_ctx.pass == 2)
1315      block_state.port.value |= OPER_FLAG_RESTART;
1316 + } | REHASH ':' REMOTE
1317 + {
1318 +  if (conf_parser_ctx.pass == 2)
1319 +    block_state.port.value |= OPER_FLAG_REHASH_REMOTE;
1320   } | REHASH
1321   {
1322    if (conf_parser_ctx.pass == 2)
# Line 1438 | Line 1353 | oper_flags_item: KILL ':' REMOTE
1353   {
1354    if (conf_parser_ctx.pass == 2)
1355      block_state.port.value |= OPER_FLAG_OPME;
1356 + } | NICK ':' RESV
1357 + {
1358 +  if (conf_parser_ctx.pass == 2)
1359 +    block_state.port.value |= OPER_FLAG_NICK_RESV;
1360 + } | JOIN ':' RESV
1361 + {
1362 +  if (conf_parser_ctx.pass == 2)
1363 +    block_state.port.value |= OPER_FLAG_JOIN_RESV;
1364 + } | RESV
1365 + {
1366 +  if (conf_parser_ctx.pass == 2)
1367 +    block_state.port.value |= OPER_FLAG_RESV;
1368 + } | T_UNRESV
1369 + {
1370 +  if (conf_parser_ctx.pass == 2)
1371 +    block_state.port.value |= OPER_FLAG_UNRESV;
1372 + } | CLOSE
1373 + {
1374 +  if (conf_parser_ctx.pass == 2)
1375 +    block_state.port.value |= OPER_FLAG_CLOSE;
1376   };
1377  
1378  
1379   /***************************************************************************
1380 < *  section class
1380 > * class {} section
1381   ***************************************************************************/
1382   class_entry: CLASS
1383   {
# Line 1470 | Line 1405 | class_entry: CLASS
1405      class = class_make();
1406  
1407    class->active = 1;
1408 <  MyFree(class->name);
1408 >  xfree(class->name);
1409    class->name = xstrdup(block_state.class.buf);
1410    class->ping_freq = block_state.ping_freq.value;
1411    class->max_perip = block_state.max_perip.value;
# Line 1478 | Line 1413 | class_entry: CLASS
1413    class->max_total = block_state.max_total.value;
1414    class->max_global = block_state.max_global.value;
1415    class->max_local = block_state.max_local.value;
1481  class->max_ident = block_state.max_ident.value;
1416    class->max_sendq = block_state.max_sendq.value;
1417    class->max_recvq = block_state.max_recvq.value;
1418    class->max_channels = block_state.max_channels.value;
# Line 1513 | Line 1447 | class_item:     class_name |
1447                  class_max_number |
1448                  class_max_global |
1449                  class_max_local |
1450 <                class_max_ident |
1451 <                class_sendq | class_recvq |
1450 >                class_sendq |
1451 >                class_recvq |
1452                  class_min_idle |
1453                  class_max_idle |
1454                  class_flags |
# Line 1568 | Line 1502 | class_max_local: MAX_LOCAL '=' NUMBER ';
1502      block_state.max_local.value = $3;
1503   };
1504  
1571 class_max_ident: MAX_IDENT '=' NUMBER ';'
1572 {
1573  if (conf_parser_ctx.pass == 1)
1574    block_state.max_ident.value = $3;
1575 };
1576
1505   class_sendq: SENDQ '=' sizespec ';'
1506   {
1507    if (conf_parser_ctx.pass == 1)
# Line 1642 | Line 1570 | class_flags_item: RANDOM_IDLE
1570  
1571  
1572   /***************************************************************************
1573 < *  section listen
1573 > * listen {} section
1574   ***************************************************************************/
1575   listen_entry: LISTEN
1576   {
# Line 1681 | Line 1609 | port_item: NUMBER
1609   {
1610    if (conf_parser_ctx.pass == 2)
1611    {
1612 < #ifndef HAVE_LIBCRYPTO
1612 > #ifndef HAVE_TLS
1613      if (block_state.flags.value & LISTENER_SSL)
1614      {
1615 <      conf_error_report("SSL not available - port closed");
1615 >      conf_error_report("TLS not available - port closed");
1616        break;
1617      }
1618   #endif
# Line 1694 | Line 1622 | port_item: NUMBER
1622   {
1623    if (conf_parser_ctx.pass == 2)
1624    {
1625 < #ifndef HAVE_LIBCRYPTO
1625 > #ifndef HAVE_TLS
1626      if (block_state.flags.value & LISTENER_SSL)
1627      {
1628 <      conf_error_report("SSL not available - port closed");
1628 >      conf_error_report("TLS not available - port closed");
1629        break;
1630      }
1631   #endif
# Line 1719 | Line 1647 | listen_host: HOST '=' QSTRING ';'
1647      strlcpy(block_state.addr.buf, yylval.string, sizeof(block_state.addr.buf));
1648   };
1649  
1650 +
1651   /***************************************************************************
1652 < *  section auth
1652 > * auth {} section
1653   ***************************************************************************/
1654   auth_entry: IRCD_AUTH
1655   {
# Line 1737 | Line 1666 | auth_entry: IRCD_AUTH
1666    {
1667      struct MaskItem *conf = NULL;
1668      struct split_nuh_item nuh;
1669 +    char *s = node->data;
1670  
1671 <    nuh.nuhmask  = node->data;
1671 >    if (EmptyString(s))
1672 >      continue;
1673 >
1674 >    nuh.nuhmask  = s;
1675      nuh.nickptr  = NULL;
1676      nuh.userptr  = block_state.user.buf;
1677      nuh.hostptr  = block_state.host.buf;
# Line 1887 | Line 1820 | auth_redir_port: REDIRPORT '=' NUMBER ';
1820  
1821  
1822   /***************************************************************************
1823 < *  section resv
1823 > * resv {} section
1824   ***************************************************************************/
1825   resv_entry: RESV
1826   {
# Line 1901 | Line 1834 | resv_entry: RESV
1834    if (conf_parser_ctx.pass != 2)
1835      break;
1836  
1837 <  create_resv(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1837 >  resv_make(block_state.name.buf, block_state.rpass.buf, &block_state.mask.list);
1838   };
1839  
1840   resv_items:     resv_items resv_item | resv_item;
# Line 1927 | Line 1860 | resv_exempt: EXEMPT '=' QSTRING ';'
1860  
1861  
1862   /***************************************************************************
1863 < *  section service
1863 > * service {} section
1864   ***************************************************************************/
1865   service_entry: T_SERVICE '{' service_items '}' ';';
1866  
# Line 1941 | Line 1874 | service_name: NAME '=' QSTRING ';'
1874  
1875    if (valid_servname(yylval.string))
1876    {
1877 <    struct MaskItem *conf = conf_make(CONF_SERVICE);
1878 <    conf->name = xstrdup(yylval.string);
1877 >    struct ServiceItem *service = service_make();
1878 >    service->name = xstrdup(yylval.string);
1879    }
1880   };
1881  
1882 +
1883   /***************************************************************************
1884 < *  section shared, for sharing remote klines etc.
1884 > * shared {} section, for sharing remote klines etc.
1885   ***************************************************************************/
1886   shared_entry: T_SHARED
1887   {
# Line 1962 | Line 1896 | shared_entry: T_SHARED
1896    block_state.flags.value = SHARED_ALL;
1897   } '{' shared_items '}' ';'
1898   {
1965  struct MaskItem *conf = NULL;
1966
1899    if (conf_parser_ctx.pass != 2)
1900      break;
1901  
1902 <  conf = conf_make(CONF_ULINE);
1903 <  conf->flags = block_state.flags.value;
1904 <  conf->name = xstrdup(block_state.name.buf);
1905 <  conf->user = xstrdup(block_state.user.buf);
1906 <  conf->host = xstrdup(block_state.host.buf);
1902 >  struct SharedItem *shared = shared_make();
1903 >  shared->type = block_state.flags.value;
1904 >  shared->server = xstrdup(block_state.name.buf);
1905 >  shared->user = xstrdup(block_state.user.buf);
1906 >  shared->host = xstrdup(block_state.host.buf);
1907   };
1908  
1909   shared_items: shared_items shared_item | shared_item;
# Line 2051 | Line 1983 | shared_type_item: KLINE
1983      block_state.flags.value = SHARED_ALL;
1984   };
1985  
1986 +
1987   /***************************************************************************
1988 < *  section cluster
1988 > * cluster {} section
1989   ***************************************************************************/
1990   cluster_entry: T_CLUSTER
1991   {
# Line 2062 | Line 1995 | cluster_entry: T_CLUSTER
1995    reset_block_state();
1996  
1997    strlcpy(block_state.name.buf, "*", sizeof(block_state.name.buf));
1998 <  block_state.flags.value = SHARED_ALL;
1998 >  block_state.flags.value = CLUSTER_ALL;
1999   } '{' cluster_items '}' ';'
2000   {
2068  struct MaskItem *conf = NULL;
2069
2001    if (conf_parser_ctx.pass != 2)
2002      break;
2003  
2004 <  conf = conf_make(CONF_CLUSTER);
2005 <  conf->flags = block_state.flags.value;
2006 <  conf->name = xstrdup(block_state.name.buf);
2004 >  struct ClusterItem *cluster = cluster_make();
2005 >  cluster->type = block_state.flags.value;
2006 >  cluster->server = xstrdup(block_state.name.buf);
2007   };
2008  
2009   cluster_items:  cluster_items cluster_item | cluster_item;
# Line 2094 | Line 2025 | cluster_types:  cluster_types ',' cluste
2025   cluster_type_item: KLINE
2026   {
2027    if (conf_parser_ctx.pass == 2)
2028 <    block_state.flags.value |= SHARED_KLINE;
2028 >    block_state.flags.value |= CLUSTER_KLINE;
2029   } | UNKLINE
2030   {
2031    if (conf_parser_ctx.pass == 2)
2032 <    block_state.flags.value |= SHARED_UNKLINE;
2032 >    block_state.flags.value |= CLUSTER_UNKLINE;
2033   } | T_DLINE
2034   {
2035    if (conf_parser_ctx.pass == 2)
2036 <    block_state.flags.value |= SHARED_DLINE;
2036 >    block_state.flags.value |= CLUSTER_DLINE;
2037   } | T_UNDLINE
2038   {
2039    if (conf_parser_ctx.pass == 2)
2040 <    block_state.flags.value |= SHARED_UNDLINE;
2040 >    block_state.flags.value |= CLUSTER_UNDLINE;
2041   } | XLINE
2042   {
2043    if (conf_parser_ctx.pass == 2)
2044 <    block_state.flags.value |= SHARED_XLINE;
2044 >    block_state.flags.value |= CLUSTER_XLINE;
2045   } | T_UNXLINE
2046   {
2047    if (conf_parser_ctx.pass == 2)
2048 <    block_state.flags.value |= SHARED_UNXLINE;
2048 >    block_state.flags.value |= CLUSTER_UNXLINE;
2049   } | RESV
2050   {
2051    if (conf_parser_ctx.pass == 2)
2052 <    block_state.flags.value |= SHARED_RESV;
2052 >    block_state.flags.value |= CLUSTER_RESV;
2053   } | T_UNRESV
2054   {
2055    if (conf_parser_ctx.pass == 2)
2056 <    block_state.flags.value |= SHARED_UNRESV;
2056 >    block_state.flags.value |= CLUSTER_UNRESV;
2057   } | T_LOCOPS
2058   {
2059    if (conf_parser_ctx.pass == 2)
2060 <    block_state.flags.value |= SHARED_LOCOPS;
2060 >    block_state.flags.value |= CLUSTER_LOCOPS;
2061   } | T_ALL
2062   {
2063    if (conf_parser_ctx.pass == 2)
2064 <    block_state.flags.value = SHARED_ALL;
2064 >    block_state.flags.value = CLUSTER_ALL;
2065   };
2066  
2067 +
2068   /***************************************************************************
2069 < *  section connect
2069 > * connect {}  section
2070   ***************************************************************************/
2071   connect_entry: CONNECT
2072   {
# Line 2338 | Line 2270 | connect_class: CLASS '=' QSTRING ';'
2270  
2271   connect_ssl_cipher_list: T_SSL_CIPHER_LIST '=' QSTRING ';'
2272   {
2273 < #ifdef HAVE_LIBCRYPTO
2273 > #ifdef HAVE_TLS
2274    if (conf_parser_ctx.pass == 2)
2275      strlcpy(block_state.ciph.buf, yylval.string, sizeof(block_state.ciph.buf));
2276   #else
2277    if (conf_parser_ctx.pass == 2)
2278 <    conf_error_report("Ignoring connect::ciphers -- no OpenSSL support");
2278 >    conf_error_report("Ignoring connect::ciphers -- no TLS support");
2279   #endif
2280   };
2281  
2282  
2283   /***************************************************************************
2284 < *  section kill
2284 > * kill {} section
2285   ***************************************************************************/
2286   kill_entry: KILL
2287   {
# Line 2406 | Line 2338 | kill_reason: REASON '=' QSTRING ';'
2338      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2339   };
2340  
2341 +
2342   /***************************************************************************
2343 < *  section deny
2343 > * deny {} section
2344   ***************************************************************************/
2345   deny_entry: DENY
2346   {
# Line 2451 | Line 2384 | deny_reason: REASON '=' QSTRING ';'
2384      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2385   };
2386  
2387 +
2388   /***************************************************************************
2389 < *  section exempt
2389 > * exempt {} section
2390   ***************************************************************************/
2391   exempt_entry: EXEMPT '{' exempt_items '}' ';';
2392  
2393 < exempt_items:     exempt_items exempt_item | exempt_item;
2394 < exempt_item:      exempt_ip | error;
2393 > exempt_items: exempt_items exempt_item | exempt_item;
2394 > exempt_item:  exempt_ip | error;
2395  
2396   exempt_ip: IP '=' QSTRING ';'
2397   {
2398    if (conf_parser_ctx.pass == 2)
2399    {
2400 <    if (yylval.string[0] && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2400 >    if (*yylval.string && parse_netmask(yylval.string, NULL, NULL) != HM_HOST)
2401      {
2402        struct MaskItem *conf = conf_make(CONF_EXEMPT);
2403        conf->host = xstrdup(yylval.string);
# Line 2474 | Line 2408 | exempt_ip: IP '=' QSTRING ';'
2408   };
2409  
2410   /***************************************************************************
2411 < *  section gecos
2411 > * gecos {} section
2412   ***************************************************************************/
2413   gecos_entry: GECOS
2414   {
# Line 2482 | Line 2416 | gecos_entry: GECOS
2416      reset_block_state();
2417   } '{' gecos_items '}' ';'
2418   {
2485  struct MaskItem *conf = NULL;
2486
2419    if (conf_parser_ctx.pass != 2)
2420      break;
2421  
2422    if (!block_state.name.buf[0])
2423      break;
2424  
2425 <  conf = conf_make(CONF_XLINE);
2426 <  conf->name = xstrdup(block_state.name.buf);
2425 >  struct GecosItem *gecos = gecos_make();
2426 >  gecos->mask = xstrdup(block_state.name.buf);
2427  
2428    if (block_state.rpass.buf[0])
2429 <    conf->reason = xstrdup(block_state.rpass.buf);
2429 >    gecos->reason = xstrdup(block_state.rpass.buf);
2430    else
2431 <    conf->reason = xstrdup(CONF_NOREASON);
2431 >    gecos->reason = xstrdup(CONF_NOREASON);
2432   };
2433  
2434   gecos_items: gecos_items gecos_item | gecos_item;
# Line 2514 | Line 2446 | gecos_reason: REASON '=' QSTRING ';'
2446      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));
2447   };
2448  
2449 +
2450   /***************************************************************************
2451 < *  section general
2451 > * general {} section
2452   ***************************************************************************/
2453 < general_entry: GENERAL
2521 <  '{' general_items '}' ';';
2453 > general_entry: GENERAL '{' general_items '}' ';';
2454  
2455   general_items:      general_items general_item | general_item;
2456   general_item:       general_away_count |
# Line 2529 | Line 2461 | general_item:       general_away_count |
2461                      general_max_nick_time |
2462                      general_max_nick_changes |
2463                      general_max_accept |
2464 +                    general_whowas_history_length |
2465                      general_anti_spam_exit_message_time |
2466                      general_ts_warn_delta |
2467                      general_ts_max_delta |
# Line 2546 | Line 2479 | general_item:       general_away_count |
2479                      general_pace_wait_simple |
2480                      general_short_motd |
2481                      general_no_oper_flood |
2549                    general_oper_pass_resv |
2482                      general_oper_only_umodes |
2483                      general_max_targets |
2484                      general_oper_umodes |
# Line 2585 | Line 2517 | general_max_watch: MAX_WATCH '=' NUMBER
2517    ConfigGeneral.max_watch = $3;
2518   };
2519  
2520 + general_whowas_history_length: WHOWAS_HISTORY_LENGTH '=' NUMBER ';'
2521 + {
2522 +  ConfigGeneral.whowas_history_length = $3;
2523 + };
2524 +
2525   general_cycle_on_host_change: CYCLE_ON_HOST_CHANGE '=' TBOOL ';'
2526   {
2527    if (conf_parser_ctx.pass == 2)
# Line 2748 | Line 2685 | general_no_oper_flood: NO_OPER_FLOOD '='
2685    ConfigGeneral.no_oper_flood = yylval.number;
2686   };
2687  
2751 general_oper_pass_resv: OPER_PASS_RESV '=' TBOOL ';'
2752 {
2753  ConfigGeneral.oper_pass_resv = yylval.number;
2754 };
2755
2688   general_dots_in_ident: DOTS_IN_IDENT '=' NUMBER ';'
2689   {
2690    ConfigGeneral.dots_in_ident = $3;
# Line 2942 | Line 2874 | general_default_floodcount: DEFAULT_FLOO
2874  
2875  
2876   /***************************************************************************
2877 < *  section channel
2877 > * channel {} section
2878   ***************************************************************************/
2879 < channel_entry: CHANNEL
2948 <  '{' channel_items '}' ';';
2879 > channel_entry: CHANNEL '{' channel_items '}' ';';
2880  
2881   channel_items:      channel_items channel_item | channel_item;
2882   channel_item:       channel_max_bans |
2883                      channel_invite_client_count |
2884                      channel_invite_client_time |
2885 +                    channel_invite_delay_channel |
2886                      channel_knock_client_count |
2887                      channel_knock_client_time |
2888                      channel_knock_delay_channel |
# Line 2975 | Line 2907 | channel_invite_client_time: INVITE_CLIEN
2907    ConfigChannel.invite_client_time = $3;
2908   };
2909  
2910 + channel_invite_delay_channel: INVITE_DELAY_CHANNEL '=' timespec ';'
2911 + {
2912 +  ConfigChannel.invite_delay_channel = $3;
2913 + };
2914 +
2915   channel_knock_client_count: KNOCK_CLIENT_COUNT '=' NUMBER ';'
2916   {
2917    ConfigChannel.knock_client_count = $3;
# Line 3010 | Line 2947 | channel_default_join_flood_time: DEFAULT
2947    ConfigChannel.default_join_flood_time = $3;
2948   };
2949  
2950 +
2951   /***************************************************************************
2952 < *  section serverhide
2952 > * serverhide {} section
2953   ***************************************************************************/
2954 < serverhide_entry: SERVERHIDE
3017 <  '{' serverhide_items '}' ';';
2954 > serverhide_entry: SERVERHIDE '{' serverhide_items '}' ';';
2955  
2956   serverhide_items:   serverhide_items serverhide_item | serverhide_item;
2957   serverhide_item:    serverhide_flatten_links |
2958 +                    serverhide_flatten_links_delay |
2959 +                    serverhide_flatten_links_file |
2960                      serverhide_disable_remote_commands |
2961                      serverhide_hide_servers |
2962                      serverhide_hide_services |
3024                    serverhide_links_delay |
2963                      serverhide_hidden |
2964                      serverhide_hidden_name |
2965                      serverhide_hide_server_ips |
# Line 3033 | Line 2971 | serverhide_flatten_links: FLATTEN_LINKS
2971      ConfigServerHide.flatten_links = yylval.number;
2972   };
2973  
2974 + serverhide_flatten_links_delay: FLATTEN_LINKS_DELAY '=' timespec ';'
2975 + {
2976 +  if (conf_parser_ctx.pass == 2)
2977 +  {
2978 +    if ($3 > 0)
2979 +    {
2980 +      event_write_links_file.when = $3;
2981 +      event_add(&event_write_links_file, NULL);
2982 +    }
2983 +    else
2984 +     event_delete(&event_write_links_file);
2985 +
2986 +    ConfigServerHide.flatten_links_delay = $3;
2987 +  }
2988 + };
2989 +
2990 + serverhide_flatten_links_file: FLATTEN_LINKS_FILE '=' QSTRING ';'
2991 + {
2992 +  if (conf_parser_ctx.pass == 2)
2993 +  {
2994 +    xfree(ConfigServerHide.flatten_links_file);
2995 +    ConfigServerHide.flatten_links_file = xstrdup(yylval.string);
2996 +  }
2997 + };
2998 +
2999   serverhide_disable_remote_commands: DISABLE_REMOTE_COMMANDS '=' TBOOL ';'
3000   {
3001    if (conf_parser_ctx.pass == 2)
# Line 3055 | Line 3018 | serverhide_hidden_name: HIDDEN_NAME '='
3018   {
3019    if (conf_parser_ctx.pass == 2)
3020    {
3021 <    MyFree(ConfigServerHide.hidden_name);
3021 >    xfree(ConfigServerHide.hidden_name);
3022      ConfigServerHide.hidden_name = xstrdup(yylval.string);
3023    }
3024   };
3025  
3063 serverhide_links_delay: LINKS_DELAY '=' timespec ';'
3064 {
3065  if (conf_parser_ctx.pass == 2)
3066  {
3067    if (($3 > 0) && ConfigServerHide.links_disabled == 1)
3068    {
3069      event_write_links_file.when = $3;
3070      event_addish(&event_write_links_file, NULL);
3071      ConfigServerHide.links_disabled = 0;
3072    }
3073
3074    ConfigServerHide.links_delay = $3;
3075  }
3076 };
3077
3026   serverhide_hidden: HIDDEN '=' TBOOL ';'
3027   {
3028    if (conf_parser_ctx.pass == 2)

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)