From: Dave Hart Date: Sat, 19 Sep 2009 16:52:44 +0000 (+0000) Subject: [Bug 1300] reject remote configuration of dangerous items. X-Git-Tag: NTP_4_2_5P217~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6294d7c9630db781f56b542a92dfe80274a5d905;p=thirdparty%2Fntp.git [Bug 1300] reject remote configuration of dangerous items. bk: 4ab50c5c59N_koqUujpxwaSlaqNwxw --- diff --git a/ChangeLog b/ChangeLog index 2d03ecc1b..00b02f458 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 1300] reject remote configuration of dangerous items. (4.2.5p216) 2009/09/19 Released by Harlan Stenn * [Bug 1312] ntpq/ntpdc MD5 passwords truncated to 8 chars on Suns. * CID 10 missing free(up); in refclock_palisade.c error return, again. diff --git a/include/ntpd.h b/include/ntpd.h index 95e205404..30d6d838b 100644 --- a/include/ntpd.h +++ b/include/ntpd.h @@ -15,6 +15,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ extern char *keysdir; /* crypto keys and leaptable directory */ +extern char * saveconfigdir; /* ntpq saveconfig output directory */ extern void getconfig (int, char **); extern void ctl_clr_stats (void); diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index bb2330613..2334e1e88 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -141,6 +141,7 @@ short default_ai_family = AF_INET; /* [Bug 891]: FIX ME */ char *sys_phone[MAXPHONE] = {NULL}; /* ACTS phone numbers */ char default_keysdir[] = NTP_KEYSDIR; char *keysdir = default_keysdir; /* crypto keys directory */ +char * saveconfigdir; #if defined(HAVE_SCHED_SETSCHEDULER) int config_priority_override = 0; int config_priority; @@ -546,37 +547,42 @@ dump_config_tree( atrv->attr); break; - case T_Broadcastdelay: + case T_Broadcastdelay: fprintf(df, "broadcastdelay %g\n", atrv->value.d); break; - case T_Calldelay: + case T_Calldelay: fprintf(df, "calldelay %i\n", atrv->value.i); break; - case T_Tick: + case T_Tick: fprintf(df, "tick %g\n", atrv->value.d); break; - case T_Driftfile: + case T_Driftfile: fprintf(df, "driftfile \"%s\"\n", atrv->value.s); break; - case T_WanderThreshold: + case T_WanderThreshold: fprintf(df, "wander_threshold %g\n", atrv->value.d); break; - case T_Leapfile: + case T_Leapfile: fprintf(df, "leapfile \"%s\"\n", atrv->value.s); break; - case T_Pidfile: + case T_Pidfile: fprintf(df, "pidfile \"%s\"\n", atrv->value.s); break; - case T_Logfile: + case T_Logfile: fprintf(df, "logfile \"%s\"\n", atrv->value.s); break; + + case T_Saveconfigdir: + fprintf(df, "saveconfigdir \"%s\"\n", + atrv->value.s); + break; #ifdef OPENSSL case T_Automax: fprintf(df, "automax %i\n", atrv->value.i); @@ -627,10 +633,11 @@ dump_config_tree( list_ptr = next_node(list_ptr)) { fgen_node = list_ptr; - fprintf(df, "filegen %s", fgen_node->name); - opt_ptr = queue_head(fgen_node->options); + if (opt_ptr != NULL) + fprintf(df, "filegen %s", fgen_node->name); + for(; opt_ptr != NULL; opt_ptr = next_node(opt_ptr)) { @@ -1868,6 +1875,8 @@ create_nic_rule_node( { nic_rule_node *my_node; + NTP_REQUIRE(match_class != 0 || if_name != NULL); + my_node = get_node(sizeof(*my_node)); my_node->match_class = match_class; my_node->if_name = if_name; @@ -2202,6 +2211,7 @@ struct key_tok keyword_list[] = { { "port", T_Port, NO_ARG }, { "interface", T_Interface, NO_ARG }, { "qos", T_Qos, NO_ARG }, + { "saveconfigdir", T_Saveconfigdir, SINGLE_ARG }, /* interface_command (ignore and interface already defined) */ { "nic", T_Nic, NO_ARG }, { "all", T_All, NO_ARG }, @@ -3454,6 +3464,7 @@ config_vars( { struct attr_val *curr_var; FILE *new_file; + int len; curr_var = queue_head(ptree->vars); while (curr_var != NULL) { @@ -3502,6 +3513,28 @@ config_vars( curr_var->value.s); break; + case T_Saveconfigdir: + if (saveconfigdir != NULL) + free(saveconfigdir); + len = strlen(curr_var->value.s); + if (0 == len) + saveconfigdir = NULL; + else if (DIR_SEP != curr_var->value.s[len - 1] +#ifdef SYS_WINNT /* slash is also a dir. sep. on Windows */ + && '/' != curr_var->value.s[len - 1] +#endif + ) { + len++; + saveconfigdir = emalloc(len + 1); + snprintf(saveconfigdir, len + 1, + "%s%c", + curr_var->value.s, + DIR_SEP); + } else + saveconfigdir = estrdup( + curr_var->value.s); + break; + case T_Automax: #ifdef OPENSSL sys_automax = curr_var->value.i; diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index 41a3f99fb..b21445e5d 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -513,10 +513,8 @@ ctl_error( int errcode ) { -#ifdef DEBUG - if (debug >= 4) - printf("sending control error %d\n", errcode); -#endif + DPRINTF(3, ("sending control error %d\n", errcode)); + /* * Fill in the fields. We assume rpkt.sequence and rpkt.associd * have already been filled in. @@ -558,14 +556,14 @@ save_config( { char reply[128]; #ifdef SAVECONFIG - char filespec[256]; - char filename[256]; + char filespec[128]; + char filename[128]; + char fullpath[512]; + const char savedconfig_eq[] = "savedconfig="; + char savedconfig[sizeof(savedconfig_eq) + sizeof(filename)]; time_t now; int fd; FILE *fptr; - const char savedconfig_eq[] = "savedconfig="; - size_t octets; - char *savedconfig; #endif if (restrict_mask & RES_NOMODIFY) { @@ -580,6 +578,17 @@ save_config( } #ifdef SAVECONFIG + if (NULL == saveconfigdir) { + snprintf(reply, sizeof(reply), + "saveconfig prohibited, no saveconfigdir configured"); + ctl_putdata(reply, strlen(reply), 0); + ctl_flushpkt(0); + msyslog(LOG_NOTICE, + "saveconfig from %s rejected, no saveconfigdir", + stoa(&rbufp->recv_srcadr)); + return; + } + if (0 == reqend - reqpt) return; @@ -588,27 +597,32 @@ save_config( time(&now); - /* - * "saveconfig ." is shorthand for replacing the startup - * configuration file. - */ - if ('.' == filespec[0] && '\0' == filespec[1] - && NULL != cfg_tree_history) - strncpy(filename, cfg_tree_history->source.value.s, - sizeof(filename)); /* * allow timestamping of the saved config filename with * strftime() format such as: * ntpq -c "saveconfig ntp-%Y%m%d-%H%M%S.conf" */ - else if (0 == strftime(filename, sizeof(filename), filespec, + if (0 == strftime(filename, sizeof(filename), filespec, localtime(&now))) strncpy(filename, filespec, sizeof(filename)); filename[sizeof(filename) - 1] = '\0'; + if (strchr(filename, '\\') || strchr(filename, '/')) { + snprintf(reply, sizeof(reply), + "saveconfig does not allow directory in filename"); + ctl_putdata(reply, strlen(reply), 0); + ctl_flushpkt(0); + msyslog(LOG_NOTICE, + "saveconfig with path from %s rejected", + stoa(&rbufp->recv_srcadr)); + return; + } + + snprintf(fullpath, sizeof(fullpath), "%s%s", + saveconfigdir, filename); - fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, + fd = open(fullpath, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR); if (-1 == fd) fptr = NULL; @@ -624,27 +638,23 @@ save_config( stoa(&rbufp->recv_srcadr)); } else { snprintf(reply, sizeof(reply), - "Configuration saved to %s", - filename); + "Configuration saved to %s", filename); msyslog(LOG_NOTICE, "Configuration saved to %s (requested by %s)", - filename, stoa(&rbufp->recv_srcadr)); + fullpath, stoa(&rbufp->recv_srcadr)); /* * save the output filename in system variable * savedconfig, retrieved with: * ntpq -c "rv 0 savedconfig" */ - octets = sizeof(savedconfig_eq) + strlen(filename) + 1; - savedconfig = emalloc(octets); - snprintf(savedconfig, octets, "%s%s", + snprintf(savedconfig, sizeof(savedconfig), "%s%s", savedconfig_eq, filename); - set_sys_var(savedconfig, octets, RO); - free(savedconfig); + set_sys_var(savedconfig, strlen(savedconfig) + 1, RO); } if (NULL != fptr) fclose(fptr); -#else /* !SAFECONFIG follows */ +#else /* !SAVECONFIG follows */ snprintf(reply, sizeof(reply), "saveconfig unavailable, configured with --disable-saveconfig"); #endif @@ -652,7 +662,8 @@ save_config( ctl_putdata(reply, strlen(reply), 0); ctl_flushpkt(0); } - + + /* * process_control - process an incoming control message */ @@ -669,10 +680,7 @@ process_control( int properlen; int maclen; -#ifdef DEBUG - if (debug > 2) - printf("in process_control()\n"); -#endif + DPRINTF(3, ("in process_control()\n")); /* * Save the addresses for error responses @@ -689,10 +697,7 @@ process_control( if (rbufp->recv_length < CTL_HEADER_LEN || pkt->r_m_e_op & (CTL_RESPONSE|CTL_MORE|CTL_ERROR) || pkt->offset != 0) { -#ifdef DEBUG - if (debug) - printf("invalid format in control packet\n"); -#endif + DPRINTF(1, ("invalid format in control packet\n")); if (rbufp->recv_length < CTL_HEADER_LEN) numctltooshort++; if (pkt->r_m_e_op & CTL_RESPONSE) @@ -707,11 +712,8 @@ process_control( } res_version = PKT_VERSION(pkt->li_vn_mode); if (res_version > NTP_VERSION || res_version < NTP_OLDVERSION) { -#ifdef DEBUG - if (debug) - printf("unknown version %d in control packet\n", - res_version); -#endif + DPRINTF(1, ("unknown version %d in control packet\n", + res_version)); numctlbadversion++; return; } @@ -738,6 +740,10 @@ process_control( datapt = rpkt.data; dataend = &(rpkt.data[CTL_MAX_DATA_LEN]); + if ((rbufp->recv_length & 0x3) != 0) + DPRINTF(3, ("Control packet length %d unrounded\n", + rbufp->recv_length)); + /* * We're set up now. Make sure we've got at least enough * incoming data space to match the count. @@ -750,11 +756,6 @@ process_control( } properlen = req_count + CTL_HEADER_LEN; -#ifdef DEBUG - if (debug > 2 && (rbufp->recv_length & 0x3) != 0) - printf("Packet length %d unrounded\n", - rbufp->recv_length); -#endif /* round up proper len to a 8 octet boundary */ properlen = (properlen + 7) & ~7; @@ -766,30 +767,19 @@ process_control( res_keyid = ntohl(*(u_int32 *)((u_char *)pkt + properlen)); -#ifdef DEBUG - if (debug > 2) - printf( - "recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n", - rbufp->recv_length, properlen, res_keyid, maclen); -#endif - if (!authistrusted(res_keyid)) { -#ifdef DEBUG - if (debug > 2) - printf("invalid keyid %08x\n", - res_keyid); -#endif - } else if (authdecrypt(res_keyid, (u_int32 *)pkt, - rbufp->recv_length - maclen, maclen)) { -#ifdef DEBUG - if (debug > 2) - printf("authenticated okay\n"); -#endif + DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n", + rbufp->recv_length, properlen, res_keyid, + maclen)); + + if (!authistrusted(res_keyid)) + DPRINTF(3, ("invalid keyid %08x\n", res_keyid)); + else if (authdecrypt(res_keyid, (u_int32 *)pkt, + rbufp->recv_length - maclen, + maclen)) { + DPRINTF(3, ("authenticated okay\n")); res_authokay = 1; } else { -#ifdef DEBUG - if (debug > 2) - printf("authentication failed\n"); -#endif + DPRINTF(3, ("authentication failed\n")); res_keyid = 0; } } @@ -805,11 +795,8 @@ process_control( */ for (cc = control_codes; cc->control_code != NO_REQUEST; cc++) { if (cc->control_code == res_opcode) { -#ifdef DEBUG - if (debug > 2) - printf("opcode %d, found command handler\n", - res_opcode); -#endif + DPRINTF(3, ("opcode %d, found command handler\n", + res_opcode)); if (cc->flags == AUTH && (!res_authokay || res_keyid != ctl_auth_keyid)) { diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c index e7ca1da5b..79cf99d73 100644 --- a/ntpd/ntp_parser.c +++ b/ntpd/ntp_parser.c @@ -249,48 +249,49 @@ T_Requestkey = 373, T_Restrict = 374, T_Revoke = 375, - T_Server = 376, - T_Setvar = 377, - T_Sign = 378, - T_Statistics = 379, - T_Stats = 380, - T_Statsdir = 381, - T_Step = 382, - T_Stepout = 383, - T_Stratum = 384, - T_String = 385, - T_Sysstats = 386, - T_Tick = 387, - T_Time1 = 388, - T_Time2 = 389, - T_Timingstats = 390, - T_Tinker = 391, - T_Tos = 392, - T_Trap = 393, - T_True = 394, - T_Trustedkey = 395, - T_Ttl = 396, - T_Type = 397, - T_Unconfig = 398, - T_Unpeer = 399, - T_Version = 400, - T_WanderThreshold = 401, - T_Week = 402, - T_Xleave = 403, - T_Year = 404, - T_Flag = 405, - T_Void = 406, - T_EOC = 407, - T_Simulate = 408, - T_Beep_Delay = 409, - T_Sim_Duration = 410, - T_Server_Offset = 411, - T_Duration = 412, - T_Freq_Offset = 413, - T_Wander = 414, - T_Jitter = 415, - T_Prop_Delay = 416, - T_Proc_Delay = 417 + T_Saveconfigdir = 376, + T_Server = 377, + T_Setvar = 378, + T_Sign = 379, + T_Statistics = 380, + T_Stats = 381, + T_Statsdir = 382, + T_Step = 383, + T_Stepout = 384, + T_Stratum = 385, + T_String = 386, + T_Sysstats = 387, + T_Tick = 388, + T_Time1 = 389, + T_Time2 = 390, + T_Timingstats = 391, + T_Tinker = 392, + T_Tos = 393, + T_Trap = 394, + T_True = 395, + T_Trustedkey = 396, + T_Ttl = 397, + T_Type = 398, + T_Unconfig = 399, + T_Unpeer = 400, + T_Version = 401, + T_WanderThreshold = 402, + T_Week = 403, + T_Xleave = 404, + T_Year = 405, + T_Flag = 406, + T_Void = 407, + T_EOC = 408, + T_Simulate = 409, + T_Beep_Delay = 410, + T_Sim_Duration = 411, + T_Server_Offset = 412, + T_Duration = 413, + T_Freq_Offset = 414, + T_Wander = 415, + T_Jitter = 416, + T_Prop_Delay = 417, + T_Proc_Delay = 418 }; #endif /* Tokens. */ @@ -412,48 +413,49 @@ #define T_Requestkey 373 #define T_Restrict 374 #define T_Revoke 375 -#define T_Server 376 -#define T_Setvar 377 -#define T_Sign 378 -#define T_Statistics 379 -#define T_Stats 380 -#define T_Statsdir 381 -#define T_Step 382 -#define T_Stepout 383 -#define T_Stratum 384 -#define T_String 385 -#define T_Sysstats 386 -#define T_Tick 387 -#define T_Time1 388 -#define T_Time2 389 -#define T_Timingstats 390 -#define T_Tinker 391 -#define T_Tos 392 -#define T_Trap 393 -#define T_True 394 -#define T_Trustedkey 395 -#define T_Ttl 396 -#define T_Type 397 -#define T_Unconfig 398 -#define T_Unpeer 399 -#define T_Version 400 -#define T_WanderThreshold 401 -#define T_Week 402 -#define T_Xleave 403 -#define T_Year 404 -#define T_Flag 405 -#define T_Void 406 -#define T_EOC 407 -#define T_Simulate 408 -#define T_Beep_Delay 409 -#define T_Sim_Duration 410 -#define T_Server_Offset 411 -#define T_Duration 412 -#define T_Freq_Offset 413 -#define T_Wander 414 -#define T_Jitter 415 -#define T_Prop_Delay 416 -#define T_Proc_Delay 417 +#define T_Saveconfigdir 376 +#define T_Server 377 +#define T_Setvar 378 +#define T_Sign 379 +#define T_Statistics 380 +#define T_Stats 381 +#define T_Statsdir 382 +#define T_Step 383 +#define T_Stepout 384 +#define T_Stratum 385 +#define T_String 386 +#define T_Sysstats 387 +#define T_Tick 388 +#define T_Time1 389 +#define T_Time2 390 +#define T_Timingstats 391 +#define T_Tinker 392 +#define T_Tos 393 +#define T_Trap 394 +#define T_True 395 +#define T_Trustedkey 396 +#define T_Ttl 397 +#define T_Type 398 +#define T_Unconfig 399 +#define T_Unpeer 400 +#define T_Version 401 +#define T_WanderThreshold 402 +#define T_Week 403 +#define T_Xleave 404 +#define T_Year 405 +#define T_Flag 406 +#define T_Void 407 +#define T_EOC 408 +#define T_Simulate 409 +#define T_Beep_Delay 410 +#define T_Sim_Duration 411 +#define T_Server_Offset 412 +#define T_Duration 413 +#define T_Freq_Offset 414 +#define T_Wander 415 +#define T_Jitter 416 +#define T_Prop_Delay 417 +#define T_Proc_Delay 418 @@ -481,7 +483,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 485 "ntp_parser.c" +#line 487 "ntp_parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -493,7 +495,7 @@ typedef union YYSTYPE /* Line 264 of yacc.c */ -#line 497 "ntp_parser.c" +#line 499 "ntp_parser.c" #ifdef short # undef short @@ -706,22 +708,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 169 +#define YYFINAL 171 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 647 +#define YYLAST 666 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 166 +#define YYNTOKENS 167 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 68 /* YYNRULES -- Number of rules. */ -#define YYNRULES 242 +#define YYNRULES 243 /* YYNRULES -- Number of states. */ -#define YYNSTATES 379 +#define YYNSTATES 381 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 417 +#define YYMAXUTOK 418 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -735,13 +737,13 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 163, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 164, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 164, 2, 165, 2, 2, 2, 2, + 2, 2, 2, 165, 2, 166, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -770,7 +772,7 @@ static const yytype_uint8 yytranslate[] = 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162 + 155, 156, 157, 158, 159, 160, 161, 162, 163 }; #if YYDEBUG @@ -796,114 +798,114 @@ static const yytype_uint16 yyprhs[] = 382, 385, 388, 391, 394, 396, 398, 400, 402, 404, 406, 408, 410, 413, 416, 418, 421, 424, 427, 430, 433, 436, 439, 441, 445, 447, 450, 453, 456, 459, - 462, 465, 468, 471, 474, 477, 480, 484, 487, 490, - 492, 495, 496, 501, 505, 508, 510, 513, 516, 519, - 521, 523, 527, 531, 533, 535, 537, 539, 541, 543, - 545, 547, 550, 552, 555, 557, 560, 562, 564, 566, - 568, 570, 572, 578, 580, 584, 587, 591, 595, 598, - 600, 606, 611, 615, 618, 620, 627, 631, 634, 638, - 642, 646, 650 + 462, 465, 468, 471, 474, 477, 480, 483, 487, 490, + 493, 495, 498, 499, 504, 508, 511, 513, 516, 519, + 522, 524, 526, 530, 534, 536, 538, 540, 542, 544, + 546, 548, 550, 553, 555, 558, 560, 563, 565, 567, + 569, 571, 573, 575, 581, 583, 587, 590, 594, 598, + 601, 603, 609, 614, 618, 621, 623, 630, 634, 637, + 641, 645, 649, 653 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 167, 0, -1, 168, -1, 168, 169, 152, -1, 169, - 152, -1, 1, 152, -1, -1, 170, -1, 176, -1, - 178, -1, 179, -1, 186, -1, 192, -1, 183, -1, - 197, -1, 200, -1, 203, -1, 206, -1, 222, -1, - 171, 172, 174, -1, 171, 172, -1, 121, -1, 108, - -1, 103, -1, 13, -1, 72, -1, 173, -1, 55, - 130, -1, 57, 130, -1, 130, -1, 174, 175, -1, - 175, -1, 7, -1, 12, 221, -1, 16, -1, 48, + 168, 0, -1, 169, -1, 169, 170, 153, -1, 170, + 153, -1, 1, 153, -1, -1, 171, -1, 177, -1, + 179, -1, 180, -1, 187, -1, 193, -1, 184, -1, + 198, -1, 201, -1, 204, -1, 207, -1, 223, -1, + 172, 173, 175, -1, 172, 173, -1, 122, -1, 108, + -1, 103, -1, 13, -1, 72, -1, 174, -1, 55, + 131, -1, 57, 131, -1, 131, -1, 175, 176, -1, + 176, -1, 7, -1, 12, 222, -1, 16, -1, 48, -1, 59, 52, -1, 82, 52, -1, 78, 52, -1, - 94, -1, 110, -1, 111, -1, 139, -1, 148, -1, - 141, 52, -1, 84, 52, -1, 145, 52, -1, 177, - 172, -1, 143, -1, 144, -1, 14, -1, 73, 219, - -1, 87, 219, -1, 8, 52, -1, 22, 52, -1, - 23, 180, -1, 60, 130, -1, 61, 130, -1, 118, - 52, -1, 140, 217, -1, 100, 130, -1, 181, -1, - -1, 181, 182, -1, 182, -1, 46, 130, -1, 49, - 130, -1, 113, 130, -1, 115, 130, -1, 120, 52, - -1, 123, 130, -1, 137, 184, -1, 184, 185, -1, - 185, -1, 19, 52, -1, 43, 52, -1, 21, 220, - -1, 101, 52, -1, 80, 221, -1, 76, 221, -1, - 79, 221, -1, 75, 221, -1, 83, 52, -1, 11, - 52, -1, 77, 52, -1, 124, 187, -1, 126, 130, - -1, 37, 188, 189, -1, 187, 188, -1, 188, -1, + 94, -1, 110, -1, 111, -1, 140, -1, 149, -1, + 142, 52, -1, 84, 52, -1, 146, 52, -1, 178, + 173, -1, 144, -1, 145, -1, 14, -1, 73, 220, + -1, 87, 220, -1, 8, 52, -1, 22, 52, -1, + 23, 181, -1, 60, 131, -1, 61, 131, -1, 118, + 52, -1, 141, 218, -1, 100, 131, -1, 182, -1, + -1, 182, 183, -1, 183, -1, 46, 131, -1, 49, + 131, -1, 113, 131, -1, 115, 131, -1, 120, 52, + -1, 124, 131, -1, 138, 185, -1, 185, 186, -1, + 186, -1, 19, 52, -1, 43, 52, -1, 21, 221, + -1, 101, 52, -1, 80, 222, -1, 76, 222, -1, + 79, 222, -1, 75, 222, -1, 83, 52, -1, 11, + 52, -1, 77, 52, -1, 125, 188, -1, 127, 131, + -1, 37, 189, 190, -1, 188, 189, -1, 189, -1, 20, -1, 24, -1, 70, -1, 104, -1, 116, -1, - 131, -1, 135, -1, 112, -1, 189, 190, -1, 190, - -1, 36, 130, -1, 142, 191, -1, 66, -1, 89, + 132, -1, 136, -1, 112, -1, 190, 191, -1, 191, + -1, 36, 131, -1, 143, 192, -1, 66, -1, 89, -1, 33, -1, 27, -1, 91, -1, 106, -1, 25, - -1, 147, -1, 86, -1, 149, -1, 3, -1, 28, - 195, -1, 119, 172, 193, -1, 119, 26, 193, -1, - 119, 55, 26, 193, -1, 119, 57, 26, 193, -1, - 119, 173, 74, 173, 193, -1, -1, 193, 194, -1, + -1, 148, -1, 86, -1, 150, -1, 3, -1, 28, + 196, -1, 119, 173, 194, -1, 119, 26, 194, -1, + 119, 55, 26, 194, -1, 119, 57, 26, 194, -1, + 119, 174, 74, 174, 194, -1, -1, 194, 195, -1, 42, -1, 50, -1, 62, -1, 63, -1, 65, -1, 71, -1, 90, -1, 92, -1, 93, -1, 95, -1, - 96, -1, 97, -1, 99, -1, 145, -1, 195, 196, - -1, 196, -1, 9, 52, -1, 81, 52, -1, 85, - 52, -1, 45, 172, 198, -1, 198, 199, -1, 199, - -1, 133, 221, -1, 134, 221, -1, 129, 52, -1, - 117, 130, -1, 38, 220, -1, 39, 220, -1, 40, - 220, -1, 41, 220, -1, 33, 201, -1, 27, 201, - -1, 201, 202, -1, 202, -1, 6, -1, 10, -1, - 17, -1, 58, -1, 85, -1, 98, -1, 125, -1, - 136, 204, -1, 204, 205, -1, 205, -1, 5, 221, - -1, 29, 221, -1, 44, 221, -1, 47, 221, -1, - 102, 221, -1, 127, 221, -1, 128, 221, -1, 213, - -1, 51, 130, 169, -1, 34, -1, 15, 221, -1, - 18, 52, -1, 132, 221, -1, 31, 207, -1, 64, - 130, -1, 107, 130, -1, 69, 130, -1, 68, 211, - -1, 105, 218, -1, 122, 208, -1, 138, 173, -1, - 138, 173, 209, -1, 141, 217, -1, 114, 130, -1, - 130, -1, 130, 30, -1, -1, 130, 163, 130, 26, - -1, 130, 163, 130, -1, 209, 210, -1, 210, -1, - 109, 52, -1, 53, 173, -1, 211, 212, -1, 212, - -1, 130, -1, 214, 216, 215, -1, 214, 216, 130, - -1, 53, -1, 88, -1, 4, -1, 54, -1, 56, - -1, 67, -1, 50, -1, 32, -1, 217, 52, -1, - 52, -1, 218, 130, -1, 130, -1, 219, 172, -1, - 172, -1, 52, -1, 139, -1, 35, -1, 52, -1, - 30, -1, 223, 164, 224, 226, 165, -1, 153, -1, - 224, 225, 152, -1, 225, 152, -1, 154, 163, 221, - -1, 155, 163, 221, -1, 226, 227, -1, 227, -1, - 229, 164, 228, 230, 165, -1, 156, 163, 221, 152, - -1, 121, 163, 172, -1, 230, 231, -1, 231, -1, - 157, 163, 221, 164, 232, 165, -1, 232, 233, 152, - -1, 233, 152, -1, 158, 163, 221, -1, 159, 163, - 221, -1, 160, 163, 221, -1, 161, 163, 221, -1, - 162, 163, 221, -1 + 96, -1, 97, -1, 99, -1, 146, -1, 196, 197, + -1, 197, -1, 9, 52, -1, 81, 52, -1, 85, + 52, -1, 45, 173, 199, -1, 199, 200, -1, 200, + -1, 134, 222, -1, 135, 222, -1, 130, 52, -1, + 117, 131, -1, 38, 221, -1, 39, 221, -1, 40, + 221, -1, 41, 221, -1, 33, 202, -1, 27, 202, + -1, 202, 203, -1, 203, -1, 6, -1, 10, -1, + 17, -1, 58, -1, 85, -1, 98, -1, 126, -1, + 137, 205, -1, 205, 206, -1, 206, -1, 5, 222, + -1, 29, 222, -1, 44, 222, -1, 47, 222, -1, + 102, 222, -1, 128, 222, -1, 129, 222, -1, 214, + -1, 51, 131, 170, -1, 34, -1, 15, 222, -1, + 18, 52, -1, 133, 222, -1, 31, 208, -1, 64, + 131, -1, 107, 131, -1, 69, 131, -1, 68, 212, + -1, 105, 219, -1, 121, 131, -1, 123, 209, -1, + 139, 174, -1, 139, 174, 210, -1, 142, 218, -1, + 114, 131, -1, 131, -1, 131, 30, -1, -1, 131, + 164, 131, 26, -1, 131, 164, 131, -1, 210, 211, + -1, 211, -1, 109, 52, -1, 53, 174, -1, 212, + 213, -1, 213, -1, 131, -1, 215, 217, 216, -1, + 215, 217, 131, -1, 53, -1, 88, -1, 4, -1, + 54, -1, 56, -1, 67, -1, 50, -1, 32, -1, + 218, 52, -1, 52, -1, 219, 131, -1, 131, -1, + 220, 173, -1, 173, -1, 52, -1, 140, -1, 35, + -1, 52, -1, 30, -1, 224, 165, 225, 227, 166, + -1, 154, -1, 225, 226, 153, -1, 226, 153, -1, + 155, 164, 222, -1, 156, 164, 222, -1, 227, 228, + -1, 228, -1, 230, 165, 229, 231, 166, -1, 157, + 164, 222, 153, -1, 122, 164, 173, -1, 231, 232, + -1, 232, -1, 158, 164, 222, 165, 233, 166, -1, + 233, 234, 153, -1, 234, 153, -1, 159, 164, 222, + -1, 160, 164, 222, -1, 161, 164, 222, -1, 162, + 164, 222, -1, 163, 164, 222, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 295, 295, 299, 300, 301, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 335, - 341, 350, 351, 352, 353, 354, 358, 359, 360, 364, - 368, 369, 373, 374, 375, 376, 377, 378, 379, 380, - 381, 382, 383, 384, 385, 386, 387, 396, 404, 405, - 415, 417, 419, 430, 432, 434, 439, 441, 443, 445, - 447, 452, 454, 458, 459, 463, 465, 467, 469, 471, - 473, 483, 488, 489, 493, 495, 497, 499, 501, 503, - 505, 507, 509, 511, 513, 523, 525, 527, 535, 536, - 540, 542, 544, 546, 548, 550, 552, 554, 559, 560, - 564, 566, 568, 569, 570, 571, 575, 576, 577, 578, - 579, 580, 581, 590, 594, 599, 604, 617, 630, 638, - 639, 643, 644, 645, 646, 647, 648, 649, 650, 651, - 652, 653, 654, 655, 656, 660, 661, 665, 666, 667, - 675, 680, 681, 685, 687, 689, 691, 693, 695, 697, - 699, 708, 710, 715, 716, 720, 721, 722, 723, 724, - 725, 726, 734, 738, 739, 743, 744, 745, 746, 747, - 748, 749, 758, 759, 775, 781, 783, 785, 787, 789, - 792, 794, 797, 799, 801, 803, 805, 807, 809, 814, - 816, 820, 824, 826, 831, 833, 837, 838, 842, 843, - 847, 862, 867, 875, 876, 880, 881, 882, 886, 887, - 888, 898, 899, 903, 904, 908, 909, 913, 922, 923, - 927, 928, 937, 952, 956, 957, 961, 962, 966, 967, - 971, 976, 980, 984, 985, 989, 994, 995, 999, 1001, - 1003, 1005, 1007 + 0, 296, 296, 300, 301, 302, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 336, + 342, 351, 352, 353, 354, 355, 359, 360, 361, 365, + 369, 370, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 387, 388, 397, 405, 406, + 416, 418, 420, 431, 433, 435, 440, 442, 444, 446, + 448, 453, 455, 459, 460, 464, 466, 468, 470, 472, + 474, 484, 489, 490, 494, 496, 498, 500, 502, 504, + 506, 508, 510, 512, 514, 524, 526, 535, 543, 544, + 548, 550, 552, 554, 556, 558, 560, 562, 567, 574, + 584, 594, 603, 612, 621, 622, 626, 627, 628, 629, + 630, 631, 632, 641, 645, 650, 655, 668, 681, 689, + 690, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 711, 712, 716, 717, 718, + 726, 731, 732, 736, 738, 740, 742, 744, 746, 748, + 750, 759, 761, 766, 773, 783, 784, 785, 786, 787, + 788, 789, 805, 809, 810, 814, 815, 816, 817, 818, + 819, 820, 829, 830, 846, 852, 854, 856, 858, 860, + 863, 865, 876, 878, 880, 890, 892, 894, 896, 898, + 903, 905, 909, 913, 915, 920, 922, 926, 927, 931, + 932, 936, 951, 956, 964, 965, 969, 970, 971, 975, + 976, 977, 987, 988, 992, 993, 997, 998, 1002, 1011, + 1012, 1016, 1017, 1026, 1041, 1045, 1046, 1050, 1051, 1055, + 1056, 1060, 1065, 1069, 1073, 1074, 1078, 1083, 1084, 1088, + 1090, 1092, 1094, 1096 }; #endif @@ -934,8 +936,8 @@ static const char *const yytname[] = "T_Panic", "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Qos", "T_RandFile", "T_Rawstats", "T_Refid", "T_Requestkey", - "T_Restrict", "T_Revoke", "T_Server", "T_Setvar", "T_Sign", - "T_Statistics", "T_Stats", "T_Statsdir", "T_Step", "T_Stepout", + "T_Restrict", "T_Revoke", "T_Saveconfigdir", "T_Server", "T_Setvar", + "T_Sign", "T_Statistics", "T_Stats", "T_Statsdir", "T_Step", "T_Stepout", "T_Stratum", "T_String", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl", "T_Type", "T_Unconfig", "T_Unpeer", "T_Version", @@ -986,38 +988,38 @@ static const yytype_uint16 yytoknum[] = 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 61, 123, 125 + 415, 416, 417, 418, 61, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 166, 167, 168, 168, 168, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 170, - 170, 171, 171, 171, 171, 171, 172, 172, 172, 173, - 174, 174, 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 176, 177, 177, - 178, 178, 178, 179, 179, 179, 179, 179, 179, 179, - 179, 180, 180, 181, 181, 182, 182, 182, 182, 182, - 182, 183, 184, 184, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 186, 186, 186, 187, 187, - 188, 188, 188, 188, 188, 188, 188, 188, 189, 189, - 190, 190, 190, 190, 190, 190, 191, 191, 191, 191, - 191, 191, 191, 192, 192, 192, 192, 192, 192, 193, - 193, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 195, 195, 196, 196, 196, - 197, 198, 198, 199, 199, 199, 199, 199, 199, 199, - 199, 200, 200, 201, 201, 202, 202, 202, 202, 202, - 202, 202, 203, 204, 204, 205, 205, 205, 205, 205, - 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, - 207, 207, 208, 208, 209, 209, 210, 210, 211, 211, - 212, 213, 213, 214, 214, 215, 215, 215, 216, 216, - 216, 217, 217, 218, 218, 219, 219, 220, 220, 220, - 221, 221, 222, 223, 224, 224, 225, 225, 226, 226, - 227, 228, 229, 230, 230, 231, 232, 232, 233, 233, - 233, 233, 233 + 0, 167, 168, 169, 169, 169, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, 170, 171, + 171, 172, 172, 172, 172, 172, 173, 173, 173, 174, + 175, 175, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 177, 178, 178, + 179, 179, 179, 180, 180, 180, 180, 180, 180, 180, + 180, 181, 181, 182, 182, 183, 183, 183, 183, 183, + 183, 184, 185, 185, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 187, 187, 187, 188, 188, + 189, 189, 189, 189, 189, 189, 189, 189, 190, 190, + 191, 191, 191, 191, 191, 191, 192, 192, 192, 192, + 192, 192, 192, 193, 193, 193, 193, 193, 193, 194, + 194, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 196, 196, 197, 197, 197, + 198, 199, 199, 200, 200, 200, 200, 200, 200, 200, + 200, 201, 201, 202, 202, 203, 203, 203, 203, 203, + 203, 203, 204, 205, 205, 206, 206, 206, 206, 206, + 206, 206, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 208, 208, 208, 209, 209, 210, 210, 211, 211, 212, + 212, 213, 214, 214, 215, 215, 216, 216, 216, 217, + 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, + 221, 222, 222, 223, 224, 225, 225, 226, 226, 227, + 227, 228, 229, 230, 231, 231, 232, 233, 233, 234, + 234, 234, 234, 234 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1041,13 +1043,13 @@ static const yytype_uint8 yyr2[] = 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, - 2, 0, 4, 3, 2, 1, 2, 2, 2, 1, - 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, - 1, 1, 5, 1, 3, 2, 3, 3, 2, 1, - 5, 4, 3, 2, 1, 6, 3, 2, 3, 3, - 3, 3, 3 + 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, + 1, 2, 0, 4, 3, 2, 1, 2, 2, 2, + 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 5, 1, 3, 2, 3, 3, 2, + 1, 5, 4, 3, 2, 1, 6, 3, 2, 3, + 3, 3, 3, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1056,112 +1058,114 @@ static const yytype_uint8 yyr2[] = static const yytype_uint8 yydefact[] = { 0, 0, 0, 24, 50, 0, 0, 0, 62, 0, - 0, 191, 0, 174, 0, 0, 0, 203, 0, 0, - 0, 0, 0, 25, 0, 0, 204, 0, 23, 0, - 0, 22, 0, 0, 0, 21, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 48, 49, 223, 0, 2, - 0, 7, 0, 8, 0, 9, 10, 13, 11, 12, - 14, 15, 16, 17, 172, 0, 18, 0, 5, 53, - 221, 220, 175, 176, 54, 0, 0, 0, 0, 0, - 0, 55, 61, 64, 155, 156, 157, 158, 159, 160, - 161, 152, 154, 0, 0, 0, 113, 136, 189, 178, - 151, 90, 91, 92, 93, 97, 94, 95, 96, 0, - 0, 0, 29, 0, 26, 6, 56, 57, 179, 200, - 182, 199, 181, 216, 51, 52, 60, 214, 183, 180, - 188, 58, 119, 0, 0, 119, 26, 0, 184, 85, - 89, 86, 177, 0, 0, 0, 0, 0, 0, 0, - 162, 164, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 71, 73, 185, 212, 59, 187, 1, - 0, 4, 20, 47, 210, 209, 208, 0, 0, 65, - 66, 67, 68, 69, 70, 63, 153, 137, 138, 139, - 135, 190, 105, 104, 0, 102, 103, 0, 87, 99, - 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 140, 142, 173, 198, 215, 213, 115, 119, 119, 114, - 0, 0, 88, 165, 166, 167, 168, 169, 170, 171, - 163, 83, 74, 219, 217, 218, 76, 75, 81, 79, - 84, 80, 78, 82, 77, 72, 0, 0, 186, 195, - 211, 3, 32, 0, 34, 35, 0, 0, 0, 0, - 39, 40, 41, 42, 0, 0, 43, 19, 31, 205, - 206, 207, 202, 201, 0, 0, 0, 0, 100, 112, - 108, 110, 106, 107, 109, 111, 101, 98, 147, 148, - 149, 150, 146, 145, 143, 144, 141, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 120, 116, 117, 119, 193, 197, 196, 194, 33, - 36, 38, 37, 45, 44, 46, 30, 0, 0, 0, - 0, 0, 229, 0, 225, 118, 192, 226, 227, 0, - 224, 222, 228, 0, 232, 0, 0, 0, 0, 0, - 234, 0, 0, 230, 233, 231, 0, 0, 0, 0, + 0, 192, 0, 174, 0, 0, 0, 204, 0, 0, + 0, 0, 0, 25, 0, 0, 205, 0, 23, 0, + 0, 22, 0, 0, 0, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 48, 49, 224, 0, + 2, 0, 7, 0, 8, 0, 9, 10, 13, 11, + 12, 14, 15, 16, 17, 172, 0, 18, 0, 5, + 53, 222, 221, 175, 176, 54, 0, 0, 0, 0, + 0, 0, 55, 61, 64, 155, 156, 157, 158, 159, + 160, 161, 152, 154, 0, 0, 0, 113, 136, 190, + 178, 151, 90, 91, 92, 93, 97, 94, 95, 96, + 0, 0, 0, 29, 0, 26, 6, 56, 57, 179, + 201, 182, 200, 181, 217, 51, 52, 60, 215, 183, + 180, 189, 58, 119, 0, 0, 119, 26, 184, 0, + 185, 85, 89, 86, 177, 0, 0, 0, 0, 0, + 0, 0, 162, 164, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 71, 73, 186, 213, 59, + 188, 1, 0, 4, 20, 47, 211, 210, 209, 0, + 0, 65, 66, 67, 68, 69, 70, 63, 153, 137, + 138, 139, 135, 191, 105, 104, 0, 102, 103, 0, + 87, 99, 27, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 140, 142, 173, 199, 216, 214, 115, 119, + 119, 114, 0, 0, 88, 165, 166, 167, 168, 169, + 170, 171, 163, 83, 74, 220, 218, 219, 76, 75, + 81, 79, 84, 80, 78, 82, 77, 72, 0, 0, + 187, 196, 212, 3, 32, 0, 34, 35, 0, 0, + 0, 0, 39, 40, 41, 42, 0, 0, 43, 19, + 31, 206, 207, 208, 203, 202, 0, 0, 0, 0, + 100, 112, 108, 110, 106, 107, 109, 111, 101, 98, + 147, 148, 149, 150, 146, 145, 143, 144, 141, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 120, 116, 117, 119, 194, 198, 197, + 195, 33, 36, 38, 37, 45, 44, 46, 30, 0, + 0, 0, 0, 0, 230, 0, 226, 118, 193, 227, + 228, 0, 225, 223, 229, 0, 233, 0, 0, 0, + 0, 0, 235, 0, 0, 231, 234, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 235, 0, 237, 238, 239, 240, 241, 242, 236 + 0, 0, 236, 0, 238, 239, 240, 241, 242, 243, + 237 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 48, 49, 50, 51, 52, 123, 114, 267, 268, - 53, 54, 55, 56, 81, 82, 83, 57, 163, 164, - 58, 139, 109, 198, 199, 286, 59, 216, 311, 96, - 97, 60, 210, 211, 61, 91, 92, 62, 150, 151, - 63, 99, 138, 248, 249, 120, 121, 64, 65, 273, - 177, 167, 128, 124, 236, 72, 66, 67, 276, 277, - 331, 332, 346, 333, 349, 350, 363, 364 + -1, 49, 50, 51, 52, 53, 124, 115, 269, 270, + 54, 55, 56, 57, 82, 83, 84, 58, 165, 166, + 59, 141, 110, 200, 201, 288, 60, 218, 313, 97, + 98, 61, 212, 213, 62, 92, 93, 63, 152, 153, + 64, 100, 140, 250, 251, 121, 122, 65, 66, 275, + 179, 169, 129, 125, 238, 73, 67, 68, 278, 279, + 333, 334, 348, 335, 351, 352, 365, 366 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -134 +#define YYPACT_NINF -136 static const yytype_int16 yypact[] = { - 129, -110, -30, -134, -134, 7, -7, 2, -43, 4, - 6, -81, 4, -134, 24, -37, -79, -134, -72, -69, - -67, -65, -64, -134, -37, -37, -134, -59, -134, -57, - -56, -134, -54, 17, -19, -134, -52, 24, -49, 7, - -1, 291, -48, 31, 31, -134, -134, -134, 86, 272, - -60, -134, -37, -134, -37, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -3, -134, -76, -134, -134, - -134, -134, -134, -134, -134, -35, -17, -6, -5, 81, - 8, -134, -43, -134, -134, -134, -134, -134, -134, -134, - -134, 4, -134, 87, 89, 93, 6, -134, 116, -134, - 4, -134, -134, -134, -134, -134, -134, -134, -134, -10, - 18, 19, -134, 145, -134, 413, -134, -134, -134, -134, - -65, -134, -134, -134, -37, -37, -134, -134, 20, -134, - -134, -134, -134, -15, -14, -134, 79, -9, -134, 24, - -134, -134, -134, 7, 7, 7, 7, 7, 7, 7, - -1, -134, 106, 109, -27, 112, 7, 7, 113, 7, - 7, 115, 119, 291, -134, -34, -134, 120, 120, -134, - 21, -134, 464, -134, -134, -134, -134, 1, -114, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, 38, -134, -134, 28, -10, -134, - -134, -134, -27, -27, -27, -27, 46, 126, 7, 7, - 145, -134, -134, -134, -134, -134, 502, -134, -134, 502, - -48, 49, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -48, 136, -34, -134, - -134, -134, -134, 7, -134, -134, 139, 140, 142, 143, - -134, -134, -134, -134, 144, 147, -134, 464, -134, -134, - -134, -134, -134, -134, 37, 47, -87, 56, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, 502, 502, -134, 183, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, 7, 7, 48, - 60, -105, -134, 51, -134, 502, -134, -134, -134, -37, - -134, -134, -134, 66, -134, 61, 68, 7, 63, -130, - -134, 71, 7, -134, -134, -134, 64, 45, 67, 70, - 72, 75, 76, -62, 88, 7, 7, 7, 7, 7, - -134, 90, -134, -134, -134, -134, -134, -134, -134 + 123, -130, -22, -136, -136, -10, -21, -15, 49, 2, + 5, -91, 2, -136, 143, -8, -88, -136, -86, -79, + -73, -67, -58, -136, -8, -8, -136, -56, -136, -55, + -43, -136, -42, 4, -19, -35, -136, -34, 143, -17, + -10, 30, 292, 3, 31, 31, -136, -136, -136, 50, + 273, -54, -136, -8, -136, -8, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -16, -136, -26, -136, + -136, -136, -136, -136, -136, -136, 9, 11, 12, 13, + 81, 16, -136, 49, -136, -136, -136, -136, -136, -136, + -136, -136, 2, -136, 96, 97, 100, 5, -136, 125, + -136, 2, -136, -136, -136, -136, -136, -136, -136, -136, + -18, 22, 34, -136, 63, -136, 415, -136, -136, -136, + -136, -67, -136, -136, -136, -8, -8, -136, -136, 35, + -136, -136, -136, -136, -5, -2, -136, 87, -136, 8, + -136, 143, -136, -136, -136, -10, -10, -10, -10, -10, + -10, -10, 30, -136, 126, 130, -13, 133, -10, -10, + 134, -10, -10, 136, 137, 292, -136, -48, -136, 142, + 142, -136, 46, -136, 457, -136, -136, -136, -136, -1, + -128, -136, -136, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, 44, -136, -136, 29, + -18, -136, -136, -136, -13, -13, -13, -13, 69, 149, + -10, -10, 63, -136, -136, -136, -136, -136, 520, -136, + -136, 520, 3, 71, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, 3, 151, + -48, -136, -136, -136, -136, -10, -136, -136, 152, 153, + 154, 155, -136, -136, -136, -136, 156, 157, -136, 457, + -136, -136, -136, -136, -136, -136, 48, 53, -93, 61, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, + -136, -136, -136, -136, 520, 520, -136, 192, -136, -136, + -136, -136, -136, -136, -136, -136, -136, -136, -136, -10, + -10, 55, 67, -109, -136, 56, -136, 520, -136, -136, + -136, -8, -136, -136, -136, 65, -136, 60, 74, -10, + 70, -125, -136, 72, -10, -136, -136, -136, 62, -81, + 75, 76, 79, 85, 88, -94, 80, -10, -10, -10, + -10, -10, -136, 82, -136, -136, -136, -136, -136, -136, + -136 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -134, -134, -134, -25, -134, -134, -2, -33, -134, -40, - -134, -134, -134, -134, -134, -134, 149, -134, -134, 78, - -134, -134, -4, -134, 54, -134, -134, -133, -134, -134, - 148, -134, -134, 35, -134, 234, -61, -134, -134, 99, - -134, -134, -134, -134, 9, -134, 134, -134, -134, -134, - -134, 212, -134, 233, 16, -39, -134, -134, -134, -16, - -134, -68, -134, -134, -134, -90, -134, -99 + -136, -136, -136, -46, -136, -136, -9, -32, -136, -33, + -136, -136, -136, -136, -136, -136, 146, -136, -136, 73, + -136, -136, -28, -136, 51, -136, -136, -135, -136, -136, + 160, -136, -136, 41, -136, 242, -75, -136, -136, 106, + -136, -136, -136, -136, 19, -136, 145, -136, -136, -136, + -136, 218, -136, 245, -113, -40, -136, -136, -136, -7, + -136, -61, -136, -136, -136, -78, -136, -87 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1171,140 +1175,144 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -7 static const yytype_int16 yytable[] = { - 142, 136, 219, 75, 143, 269, 76, 132, 233, 165, - 84, 217, 218, 113, 85, 93, 329, 192, 110, 246, - 111, 86, 69, 193, 170, 234, 194, 348, 144, 174, - 186, 279, 135, 140, 329, 353, 133, 70, 134, 186, - 274, 275, 68, 145, 101, 73, 146, 175, 102, 98, - 172, 115, 173, 280, 74, 270, 195, 271, 116, 71, - 341, 117, 87, 118, 176, 119, 122, 274, 275, 131, - 77, 126, 78, 127, 129, 247, 130, 79, 137, 196, - 80, 141, 112, 166, 312, 313, 169, 94, 178, 88, - 212, 95, 171, 112, 103, 179, 358, 359, 360, 361, - 362, 147, 89, 370, 223, 224, 225, 226, 227, 228, - 229, 112, 235, 180, 281, 200, 201, 238, 239, 282, - 241, 242, 214, 214, 181, 182, 148, 149, 104, 90, - 1, 272, 197, 183, 283, 222, 105, 2, 184, 187, - 106, 188, 3, 4, 5, 189, 191, 6, 200, 201, - 215, 7, 8, 220, 221, 107, 9, 10, 231, 108, - 11, 232, 12, 13, 237, 240, 14, 243, 278, 294, - 295, 244, 250, 251, 15, 284, 292, 285, 293, 315, - 16, 335, 17, 202, 203, 204, 205, 314, 317, 18, - 19, 320, 321, 20, 322, 323, 324, 21, 22, 325, - 327, 23, 24, 358, 359, 360, 361, 362, 334, 336, - 328, 339, 340, 316, 319, 343, 25, 26, 288, 289, - 290, 291, 345, 355, 347, 348, 352, 326, 357, 27, - 365, 185, 28, 366, 29, 367, 30, 31, 368, 369, - 372, 245, 378, 32, 190, 296, 100, 33, 34, 230, - 35, 36, 287, 37, 213, 38, 168, 318, 125, 354, - 330, 39, 206, 342, 371, 40, 41, 42, 0, 43, - 44, 0, 45, 46, 207, 0, 0, 0, 208, 209, - 2, -6, 47, 0, 0, 3, 4, 5, 337, 338, - 6, 0, 0, 0, 7, 8, 0, 0, 0, 9, - 10, 0, 152, 11, 0, 12, 13, 0, 351, 14, - 153, 0, 154, 356, 0, 0, 0, 15, 0, 0, - 0, 0, 0, 16, 0, 17, 373, 374, 375, 376, - 377, 0, 18, 19, 155, 0, 20, 344, 0, 0, - 21, 22, 0, 0, 23, 24, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, - 26, 0, 0, 0, 0, 0, 156, 157, 158, 0, - 159, 160, 27, 0, 161, 28, 0, 29, 0, 30, - 31, 0, 0, 0, 0, 0, 32, 0, 0, 0, - 33, 34, 162, 35, 36, 0, 37, 0, 38, 0, - 0, 0, 0, 0, 39, 0, 0, 0, 40, 41, - 42, 0, 43, 44, 0, 45, 46, 0, 0, 0, - 0, 2, 0, 0, -6, 47, 3, 4, 5, 0, - 0, 6, 0, 0, 0, 7, 8, 0, 0, 0, - 9, 10, 0, 0, 11, 0, 12, 13, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 0, 0, 16, 0, 17, 0, 0, 0, - 0, 252, 0, 18, 19, 0, 253, 20, 0, 0, - 254, 21, 22, 0, 0, 23, 24, 0, 0, 0, + 144, 221, 137, 271, 172, 248, 114, 133, 85, 194, + 142, 167, 86, 331, 94, 195, 176, 188, 196, 87, + 71, 219, 235, 69, 220, 136, 188, 276, 277, 331, + 70, 74, 281, 350, 177, 145, 134, 75, 135, 236, + 99, 355, 72, 116, 174, 117, 175, 111, 197, 112, + 171, 178, 118, 272, 282, 273, 132, 343, 119, 146, + 88, 249, 276, 277, 120, 360, 361, 362, 363, 364, + 214, 198, 372, 123, 147, 127, 128, 148, 360, 361, + 362, 363, 364, 168, 314, 315, 95, 89, 130, 131, + 96, 290, 291, 292, 293, 76, 138, 139, 77, 173, + 90, 204, 205, 206, 207, 225, 226, 227, 228, 229, + 230, 231, 113, 224, 143, 283, 216, 216, 240, 241, + 284, 243, 244, 113, 1, 199, 202, 237, 91, 203, + 274, 2, 149, 185, 113, 285, 3, 4, 5, 180, + 181, 6, 182, 183, 184, 7, 8, 186, 189, 190, + 9, 10, 191, 202, 11, 193, 12, 13, 150, 151, + 14, 222, 78, 102, 79, 203, 217, 103, 15, 80, + 296, 297, 223, 81, 16, 280, 17, 286, 233, 287, + 208, 337, 234, 18, 19, 239, 242, 20, 245, 246, + 316, 21, 22, 209, 252, 23, 24, 210, 211, 253, + 294, 295, 317, 319, 322, 323, 324, 325, 326, 327, + 25, 26, 329, 104, 336, 321, 318, 330, 338, 341, + 342, 345, 347, 27, 349, 357, 28, 359, 29, 187, + 30, 31, 350, 374, 354, 380, 328, 32, 247, 367, + 368, 33, 34, 369, 35, 36, 37, 105, 38, 370, + 39, 289, 371, 298, 101, 106, 40, 192, 232, 107, + 41, 42, 43, 170, 44, 45, 215, 46, 47, 320, + 126, 332, 344, 356, 0, 108, -6, 48, 373, 109, + 0, 2, 0, 0, 0, 0, 3, 4, 5, 339, + 340, 6, 0, 0, 0, 7, 8, 0, 0, 0, + 9, 10, 0, 154, 11, 0, 12, 13, 0, 353, + 14, 155, 0, 156, 358, 0, 0, 0, 15, 0, + 0, 0, 0, 0, 16, 0, 17, 375, 376, 377, + 378, 379, 346, 18, 19, 157, 0, 20, 0, 0, + 0, 21, 22, 0, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 27, 0, 0, 28, 0, 29, 0, - 30, 31, 0, 256, 0, 0, 0, 32, 0, 0, - 0, 33, 34, 0, 35, 36, 0, 37, 0, 38, - 0, 0, 257, 0, 297, 39, 258, 0, 259, 40, - 41, 42, 298, 43, 44, 0, 45, 46, 260, 0, - 0, 0, 0, 0, 299, 300, 47, 301, 0, 0, - 0, 0, 0, 302, 261, 262, 0, 0, 0, 0, + 25, 26, 0, 0, 0, 0, 0, 158, 159, 160, + 0, 161, 162, 27, 0, 163, 28, 0, 29, 0, + 30, 31, 0, 0, 0, 0, 0, 32, 0, 0, + 0, 33, 34, 164, 35, 36, 37, 0, 38, 0, + 39, 0, 0, 0, 0, 0, 40, 0, 0, 0, + 41, 42, 43, 0, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 2, 0, 0, -6, 48, 3, 4, + 5, 0, 0, 6, 0, 0, 0, 7, 8, 0, + 0, 0, 9, 10, 0, 0, 11, 0, 12, 13, + 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 254, 0, 16, 0, 17, 255, + 0, 0, 0, 256, 0, 18, 19, 0, 0, 20, + 0, 0, 0, 21, 22, 0, 0, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 303, 0, 304, 305, 0, 306, 307, 308, - 0, 309, 0, 263, 0, 264, 0, 0, 0, 265, - 0, 0, 266, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 25, 26, 0, 257, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 27, 258, 0, 28, 0, + 29, 0, 30, 31, 0, 0, 0, 0, 0, 32, + 0, 0, 0, 33, 34, 259, 35, 36, 37, 260, + 38, 261, 39, 0, 0, 0, 0, 0, 40, 0, + 0, 262, 41, 42, 43, 0, 44, 45, 0, 46, + 47, 0, 299, 0, 0, 0, 0, 263, 264, 48, + 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 301, 302, 0, 303, 0, 0, 0, 0, + 0, 304, 0, 0, 0, 0, 0, 265, 0, 266, + 0, 0, 0, 267, 0, 0, 268, 0, 0, 0, + 305, 0, 306, 307, 0, 308, 309, 310, 0, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 310 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 312 }; static const yytype_int16 yycheck[] = { - 39, 34, 135, 46, 5, 4, 49, 26, 35, 42, - 6, 26, 26, 15, 10, 9, 121, 27, 55, 53, - 57, 17, 52, 33, 49, 52, 36, 157, 29, 32, - 91, 3, 34, 37, 121, 165, 55, 30, 57, 100, - 154, 155, 152, 44, 20, 52, 47, 50, 24, 130, - 52, 130, 54, 25, 52, 54, 66, 56, 130, 52, - 165, 130, 58, 130, 67, 130, 130, 154, 155, 52, - 113, 130, 115, 130, 130, 109, 130, 120, 130, 89, - 123, 130, 130, 52, 217, 218, 0, 81, 164, 85, - 115, 85, 152, 130, 70, 130, 158, 159, 160, 161, - 162, 102, 98, 165, 143, 144, 145, 146, 147, 148, - 149, 130, 139, 130, 86, 130, 130, 156, 157, 91, - 159, 160, 124, 125, 130, 130, 127, 128, 104, 125, - 1, 130, 142, 52, 106, 139, 112, 8, 130, 52, - 116, 52, 13, 14, 15, 52, 30, 18, 130, 130, - 130, 22, 23, 74, 163, 131, 27, 28, 52, 135, - 31, 52, 33, 34, 52, 52, 37, 52, 130, 208, - 209, 52, 52, 152, 45, 147, 130, 149, 52, 130, - 51, 314, 53, 38, 39, 40, 41, 220, 52, 60, - 61, 52, 52, 64, 52, 52, 52, 68, 69, 52, - 163, 72, 73, 158, 159, 160, 161, 162, 152, 26, - 163, 163, 152, 246, 253, 164, 87, 88, 202, 203, - 204, 205, 156, 152, 163, 157, 163, 267, 164, 100, - 163, 82, 103, 163, 105, 163, 107, 108, 163, 163, - 152, 163, 152, 114, 96, 210, 12, 118, 119, 150, - 121, 122, 198, 124, 120, 126, 44, 248, 25, 349, - 276, 132, 117, 331, 363, 136, 137, 138, -1, 140, - 141, -1, 143, 144, 129, -1, -1, -1, 133, 134, - 8, 152, 153, -1, -1, 13, 14, 15, 327, 328, - 18, -1, -1, -1, 22, 23, -1, -1, -1, 27, - 28, -1, 11, 31, -1, 33, 34, -1, 347, 37, - 19, -1, 21, 352, -1, -1, -1, 45, -1, -1, - -1, -1, -1, 51, -1, 53, 365, 366, 367, 368, - 369, -1, 60, 61, 43, -1, 64, 339, -1, -1, - 68, 69, -1, -1, 72, 73, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 87, - 88, -1, -1, -1, -1, -1, 75, 76, 77, -1, - 79, 80, 100, -1, 83, 103, -1, 105, -1, 107, - 108, -1, -1, -1, -1, -1, 114, -1, -1, -1, - 118, 119, 101, 121, 122, -1, 124, -1, 126, -1, - -1, -1, -1, -1, 132, -1, -1, -1, 136, 137, - 138, -1, 140, 141, -1, 143, 144, -1, -1, -1, - -1, 8, -1, -1, 152, 153, 13, 14, 15, -1, - -1, 18, -1, -1, -1, 22, 23, -1, -1, -1, - 27, 28, -1, -1, 31, -1, 33, 34, -1, -1, - 37, -1, -1, -1, -1, -1, -1, -1, 45, -1, - -1, -1, -1, -1, 51, -1, 53, -1, -1, -1, - -1, 7, -1, 60, 61, -1, 12, 64, -1, -1, - 16, 68, 69, -1, -1, 72, 73, -1, -1, -1, + 40, 136, 34, 4, 50, 53, 15, 26, 6, 27, + 38, 43, 10, 122, 9, 33, 32, 92, 36, 17, + 30, 26, 35, 153, 26, 34, 101, 155, 156, 122, + 52, 52, 3, 158, 50, 5, 55, 52, 57, 52, + 131, 166, 52, 131, 53, 131, 55, 55, 66, 57, + 0, 67, 131, 54, 25, 56, 52, 166, 131, 29, + 58, 109, 155, 156, 131, 159, 160, 161, 162, 163, + 116, 89, 166, 131, 44, 131, 131, 47, 159, 160, + 161, 162, 163, 52, 219, 220, 81, 85, 131, 131, + 85, 204, 205, 206, 207, 46, 131, 131, 49, 153, + 98, 38, 39, 40, 41, 145, 146, 147, 148, 149, + 150, 151, 131, 141, 131, 86, 125, 126, 158, 159, + 91, 161, 162, 131, 1, 143, 131, 140, 126, 131, + 131, 8, 102, 52, 131, 106, 13, 14, 15, 165, + 131, 18, 131, 131, 131, 22, 23, 131, 52, 52, + 27, 28, 52, 131, 31, 30, 33, 34, 128, 129, + 37, 74, 113, 20, 115, 131, 131, 24, 45, 120, + 210, 211, 164, 124, 51, 131, 53, 148, 52, 150, + 117, 316, 52, 60, 61, 52, 52, 64, 52, 52, + 222, 68, 69, 130, 52, 72, 73, 134, 135, 153, + 131, 52, 131, 52, 52, 52, 52, 52, 52, 52, + 87, 88, 164, 70, 153, 255, 248, 164, 26, 164, + 153, 165, 157, 100, 164, 153, 103, 165, 105, 83, + 107, 108, 158, 153, 164, 153, 269, 114, 165, 164, + 164, 118, 119, 164, 121, 122, 123, 104, 125, 164, + 127, 200, 164, 212, 12, 112, 133, 97, 152, 116, + 137, 138, 139, 45, 141, 142, 121, 144, 145, 250, + 25, 278, 333, 351, -1, 132, 153, 154, 365, 136, + -1, 8, -1, -1, -1, -1, 13, 14, 15, 329, + 330, 18, -1, -1, -1, 22, 23, -1, -1, -1, + 27, 28, -1, 11, 31, -1, 33, 34, -1, 349, + 37, 19, -1, 21, 354, -1, -1, -1, 45, -1, + -1, -1, -1, -1, 51, -1, 53, 367, 368, 369, + 370, 371, 341, 60, 61, 43, -1, 64, -1, -1, + -1, 68, 69, -1, -1, 72, 73, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 87, 88, -1, -1, -1, -1, -1, 75, 76, 77, + -1, 79, 80, 100, -1, 83, 103, -1, 105, -1, + 107, 108, -1, -1, -1, -1, -1, 114, -1, -1, + -1, 118, 119, 101, 121, 122, 123, -1, 125, -1, + 127, -1, -1, -1, -1, -1, 133, -1, -1, -1, + 137, 138, 139, -1, 141, 142, -1, 144, 145, -1, + -1, -1, -1, 8, -1, -1, 153, 154, 13, 14, + 15, -1, -1, 18, -1, -1, -1, 22, 23, -1, + -1, -1, 27, 28, -1, -1, 31, -1, 33, 34, + -1, -1, 37, -1, -1, -1, -1, -1, -1, -1, + 45, -1, -1, -1, 7, -1, 51, -1, 53, 12, + -1, -1, -1, 16, -1, 60, 61, -1, -1, 64, + -1, -1, -1, 68, 69, -1, -1, 72, 73, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 48, 100, -1, -1, 103, -1, 105, -1, - 107, 108, -1, 59, -1, -1, -1, 114, -1, -1, - -1, 118, 119, -1, 121, 122, -1, 124, -1, 126, - -1, -1, 78, -1, 42, 132, 82, -1, 84, 136, - 137, 138, 50, 140, 141, -1, 143, 144, 94, -1, - -1, -1, -1, -1, 62, 63, 153, 65, -1, -1, - -1, -1, -1, 71, 110, 111, -1, -1, -1, -1, + -1, -1, 87, 88, -1, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 100, 59, -1, 103, -1, + 105, -1, 107, 108, -1, -1, -1, -1, -1, 114, + -1, -1, -1, 118, 119, 78, 121, 122, 123, 82, + 125, 84, 127, -1, -1, -1, -1, -1, 133, -1, + -1, 94, 137, 138, 139, -1, 141, 142, -1, 144, + 145, -1, 42, -1, -1, -1, -1, 110, 111, 154, + 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 62, 63, -1, 65, -1, -1, -1, -1, + -1, 71, -1, -1, -1, -1, -1, 140, -1, 142, + -1, -1, -1, 146, -1, -1, 149, -1, -1, -1, + 90, -1, 92, 93, -1, 95, 96, 97, -1, 99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 90, -1, 92, 93, -1, 95, 96, 97, - -1, 99, -1, 139, -1, 141, -1, -1, -1, 145, - -1, -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 145 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 146 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1314,41 +1322,42 @@ static const yytype_uint8 yystos[] = 0, 1, 8, 13, 14, 15, 18, 22, 23, 27, 28, 31, 33, 34, 37, 45, 51, 53, 60, 61, 64, 68, 69, 72, 73, 87, 88, 100, 103, 105, - 107, 108, 114, 118, 119, 121, 122, 124, 126, 132, - 136, 137, 138, 140, 141, 143, 144, 153, 167, 168, - 169, 170, 171, 176, 177, 178, 179, 183, 186, 192, - 197, 200, 203, 206, 213, 214, 222, 223, 152, 52, - 30, 52, 221, 52, 52, 46, 49, 113, 115, 120, - 123, 180, 181, 182, 6, 10, 17, 58, 85, 98, - 125, 201, 202, 9, 81, 85, 195, 196, 130, 207, - 201, 20, 24, 70, 104, 112, 116, 131, 135, 188, - 55, 57, 130, 172, 173, 130, 130, 130, 130, 130, - 211, 212, 130, 172, 219, 219, 130, 130, 218, 130, - 130, 52, 26, 55, 57, 172, 173, 130, 208, 187, - 188, 130, 221, 5, 29, 44, 47, 102, 127, 128, - 204, 205, 11, 19, 21, 43, 75, 76, 77, 79, - 80, 83, 101, 184, 185, 173, 52, 217, 217, 0, - 169, 152, 172, 172, 32, 50, 67, 216, 164, 130, - 130, 130, 130, 52, 130, 182, 202, 52, 52, 52, - 196, 30, 27, 33, 36, 66, 89, 142, 189, 190, - 130, 130, 38, 39, 40, 41, 117, 129, 133, 134, - 198, 199, 169, 212, 172, 130, 193, 26, 26, 193, - 74, 163, 188, 221, 221, 221, 221, 221, 221, 221, - 205, 52, 52, 35, 52, 139, 220, 52, 221, 221, - 52, 221, 221, 52, 52, 185, 53, 109, 209, 210, - 52, 152, 7, 12, 16, 48, 59, 78, 82, 84, - 94, 110, 111, 139, 141, 145, 148, 174, 175, 4, - 54, 56, 130, 215, 154, 155, 224, 225, 130, 3, - 25, 86, 91, 106, 147, 149, 191, 190, 220, 220, - 220, 220, 130, 52, 221, 221, 199, 42, 50, 62, - 63, 65, 71, 90, 92, 93, 95, 96, 97, 99, - 145, 194, 193, 193, 173, 130, 173, 52, 210, 221, - 52, 52, 52, 52, 52, 52, 175, 163, 163, 121, - 225, 226, 227, 229, 152, 193, 26, 221, 221, 163, - 152, 165, 227, 164, 172, 156, 228, 163, 157, 230, - 231, 221, 163, 165, 231, 152, 221, 164, 158, 159, - 160, 161, 162, 232, 233, 163, 163, 163, 163, 163, - 165, 233, 152, 221, 221, 221, 221, 221, 152 + 107, 108, 114, 118, 119, 121, 122, 123, 125, 127, + 133, 137, 138, 139, 141, 142, 144, 145, 154, 168, + 169, 170, 171, 172, 177, 178, 179, 180, 184, 187, + 193, 198, 201, 204, 207, 214, 215, 223, 224, 153, + 52, 30, 52, 222, 52, 52, 46, 49, 113, 115, + 120, 124, 181, 182, 183, 6, 10, 17, 58, 85, + 98, 126, 202, 203, 9, 81, 85, 196, 197, 131, + 208, 202, 20, 24, 70, 104, 112, 116, 132, 136, + 189, 55, 57, 131, 173, 174, 131, 131, 131, 131, + 131, 212, 213, 131, 173, 220, 220, 131, 131, 219, + 131, 131, 52, 26, 55, 57, 173, 174, 131, 131, + 209, 188, 189, 131, 222, 5, 29, 44, 47, 102, + 128, 129, 205, 206, 11, 19, 21, 43, 75, 76, + 77, 79, 80, 83, 101, 185, 186, 174, 52, 218, + 218, 0, 170, 153, 173, 173, 32, 50, 67, 217, + 165, 131, 131, 131, 131, 52, 131, 183, 203, 52, + 52, 52, 197, 30, 27, 33, 36, 66, 89, 143, + 190, 191, 131, 131, 38, 39, 40, 41, 117, 130, + 134, 135, 199, 200, 170, 213, 173, 131, 194, 26, + 26, 194, 74, 164, 189, 222, 222, 222, 222, 222, + 222, 222, 206, 52, 52, 35, 52, 140, 221, 52, + 222, 222, 52, 222, 222, 52, 52, 186, 53, 109, + 210, 211, 52, 153, 7, 12, 16, 48, 59, 78, + 82, 84, 94, 110, 111, 140, 142, 146, 149, 175, + 176, 4, 54, 56, 131, 216, 155, 156, 225, 226, + 131, 3, 25, 86, 91, 106, 148, 150, 192, 191, + 221, 221, 221, 221, 131, 52, 222, 222, 200, 42, + 50, 62, 63, 65, 71, 90, 92, 93, 95, 96, + 97, 99, 146, 195, 194, 194, 174, 131, 174, 52, + 211, 222, 52, 52, 52, 52, 52, 52, 176, 164, + 164, 122, 226, 227, 228, 230, 153, 194, 26, 222, + 222, 164, 153, 166, 228, 165, 173, 157, 229, 164, + 158, 231, 232, 222, 164, 166, 232, 153, 222, 165, + 159, 160, 161, 162, 163, 233, 234, 164, 164, 164, + 164, 164, 166, 234, 153, 222, 222, 222, 222, 222, + 153 }; #define yyerrok (yyerrstatus = 0) @@ -2162,24 +2171,24 @@ yyreduce: case 5: /* Line 1455 of yacc.c */ -#line 302 "ntp_parser.y" +#line 303 "ntp_parser.y" { /* I will need to incorporate much more fine grained * error messages. The following should suffice for * the time being. */ - msyslog(LOG_ERR, - "syntax error in %s line %d, column %d", - ip_file->fname, - ip_file->err_line_no, - ip_file->err_col_no); - } + msyslog(LOG_ERR, + "syntax error in %s line %d, column %d", + ip_file->fname, + ip_file->err_line_no, + ip_file->err_col_no); + } break; case 19: /* Line 1455 of yacc.c */ -#line 336 "ntp_parser.y" +#line 337 "ntp_parser.y" { struct peer_node *my_node = create_peer_node((yyvsp[(1) - (3)].Integer), (yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue)); if (my_node) @@ -2190,7 +2199,7 @@ yyreduce: case 20: /* Line 1455 of yacc.c */ -#line 342 "ntp_parser.y" +#line 343 "ntp_parser.y" { struct peer_node *my_node = create_peer_node((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Address_node), NULL); if (my_node) @@ -2201,147 +2210,147 @@ yyreduce: case 27: /* Line 1455 of yacc.c */ -#line 359 "ntp_parser.y" +#line 360 "ntp_parser.y" { (yyval.Address_node) = create_address_node((yyvsp[(2) - (2)].String), AF_INET); } break; case 28: /* Line 1455 of yacc.c */ -#line 360 "ntp_parser.y" +#line 361 "ntp_parser.y" { (yyval.Address_node) = create_address_node((yyvsp[(2) - (2)].String), AF_INET6); } break; case 29: /* Line 1455 of yacc.c */ -#line 364 "ntp_parser.y" +#line 365 "ntp_parser.y" { (yyval.Address_node) = create_address_node((yyvsp[(1) - (1)].String), 0); } break; case 30: /* Line 1455 of yacc.c */ -#line 368 "ntp_parser.y" +#line 369 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 31: /* Line 1455 of yacc.c */ -#line 369 "ntp_parser.y" +#line 370 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 32: /* Line 1455 of yacc.c */ -#line 373 "ntp_parser.y" +#line 374 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_SKEY); } break; case 33: /* Line 1455 of yacc.c */ -#line 374 "ntp_parser.y" +#line 375 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); } break; case 34: /* Line 1455 of yacc.c */ -#line 375 "ntp_parser.y" +#line 376 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_BURST); } break; case 35: /* Line 1455 of yacc.c */ -#line 376 "ntp_parser.y" +#line 377 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_IBURST); } break; case 36: /* Line 1455 of yacc.c */ -#line 377 "ntp_parser.y" +#line 378 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 37: /* Line 1455 of yacc.c */ -#line 378 "ntp_parser.y" +#line 379 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 38: /* Line 1455 of yacc.c */ -#line 379 "ntp_parser.y" +#line 380 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 39: /* Line 1455 of yacc.c */ -#line 380 "ntp_parser.y" +#line 381 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_NOSELECT); } break; case 40: /* Line 1455 of yacc.c */ -#line 381 "ntp_parser.y" +#line 382 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_PREEMPT); } break; case 41: /* Line 1455 of yacc.c */ -#line 382 "ntp_parser.y" +#line 383 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_PREFER); } break; case 42: /* Line 1455 of yacc.c */ -#line 383 "ntp_parser.y" +#line 384 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_TRUE); } break; case 43: /* Line 1455 of yacc.c */ -#line 384 "ntp_parser.y" +#line 385 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, FLAG_XLEAVE); } break; case 44: /* Line 1455 of yacc.c */ -#line 385 "ntp_parser.y" +#line 386 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 45: /* Line 1455 of yacc.c */ -#line 386 "ntp_parser.y" +#line 387 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 46: /* Line 1455 of yacc.c */ -#line 387 "ntp_parser.y" +#line 388 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 47: /* Line 1455 of yacc.c */ -#line 397 "ntp_parser.y" +#line 398 "ntp_parser.y" { struct unpeer_node *my_node = create_unpeer_node((yyvsp[(2) - (2)].Address_node)); if (my_node) @@ -2352,42 +2361,42 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 416 "ntp_parser.y" +#line 417 "ntp_parser.y" { cfgt.broadcastclient = 1; } break; case 51: /* Line 1455 of yacc.c */ -#line 418 "ntp_parser.y" +#line 419 "ntp_parser.y" { append_queue(cfgt.manycastserver, (yyvsp[(2) - (2)].Queue)); } break; case 52: /* Line 1455 of yacc.c */ -#line 420 "ntp_parser.y" +#line 421 "ntp_parser.y" { append_queue(cfgt.multicastclient, (yyvsp[(2) - (2)].Queue)); } break; case 53: /* Line 1455 of yacc.c */ -#line 431 "ntp_parser.y" +#line 432 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer))); } break; case 54: /* Line 1455 of yacc.c */ -#line 433 "ntp_parser.y" +#line 434 "ntp_parser.y" { cfgt.auth.control_key = (yyvsp[(2) - (2)].Integer); } break; case 55: /* Line 1455 of yacc.c */ -#line 435 "ntp_parser.y" +#line 436 "ntp_parser.y" { cryptosw++; append_queue(cfgt.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Queue)); @@ -2397,217 +2406,224 @@ yyreduce: case 56: /* Line 1455 of yacc.c */ -#line 440 "ntp_parser.y" +#line 441 "ntp_parser.y" { cfgt.auth.keys = (yyvsp[(2) - (2)].String); } break; case 57: /* Line 1455 of yacc.c */ -#line 442 "ntp_parser.y" +#line 443 "ntp_parser.y" { cfgt.auth.keysdir = (yyvsp[(2) - (2)].String); } break; case 58: /* Line 1455 of yacc.c */ -#line 444 "ntp_parser.y" +#line 445 "ntp_parser.y" { cfgt.auth.request_key = (yyvsp[(2) - (2)].Integer); } break; case 59: /* Line 1455 of yacc.c */ -#line 446 "ntp_parser.y" +#line 447 "ntp_parser.y" { cfgt.auth.trusted_key_list = (yyvsp[(2) - (2)].Queue); } break; case 60: /* Line 1455 of yacc.c */ -#line 448 "ntp_parser.y" +#line 449 "ntp_parser.y" { cfgt.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); } break; case 62: /* Line 1455 of yacc.c */ -#line 454 "ntp_parser.y" +#line 455 "ntp_parser.y" { (yyval.Queue) = create_queue(); } break; case 63: /* Line 1455 of yacc.c */ -#line 458 "ntp_parser.y" +#line 459 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 64: /* Line 1455 of yacc.c */ -#line 459 "ntp_parser.y" +#line 460 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 65: /* Line 1455 of yacc.c */ -#line 464 "ntp_parser.y" +#line 465 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CRYPTO_CONF_PRIV, (yyvsp[(2) - (2)].String)); } break; case 66: /* Line 1455 of yacc.c */ -#line 466 "ntp_parser.y" +#line 467 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CRYPTO_CONF_IDENT, (yyvsp[(2) - (2)].String)); } break; case 67: /* Line 1455 of yacc.c */ -#line 468 "ntp_parser.y" +#line 469 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CRYPTO_CONF_PW, (yyvsp[(2) - (2)].String)); } break; case 68: /* Line 1455 of yacc.c */ -#line 470 "ntp_parser.y" +#line 471 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CRYPTO_CONF_RAND, (yyvsp[(2) - (2)].String)); } break; case 69: /* Line 1455 of yacc.c */ -#line 472 "ntp_parser.y" +#line 473 "ntp_parser.y" { cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer); } break; case 70: /* Line 1455 of yacc.c */ -#line 474 "ntp_parser.y" +#line 475 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CRYPTO_CONF_SIGN, (yyvsp[(2) - (2)].String)); } break; case 71: /* Line 1455 of yacc.c */ -#line 484 "ntp_parser.y" +#line 485 "ntp_parser.y" { append_queue(cfgt.orphan_cmds,(yyvsp[(2) - (2)].Queue)); } break; case 72: /* Line 1455 of yacc.c */ -#line 488 "ntp_parser.y" +#line 489 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 73: /* Line 1455 of yacc.c */ -#line 489 "ntp_parser.y" +#line 490 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 74: /* Line 1455 of yacc.c */ -#line 494 "ntp_parser.y" +#line 495 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_CEILING, (double)(yyvsp[(2) - (2)].Integer)); } break; case 75: /* Line 1455 of yacc.c */ -#line 496 "ntp_parser.y" +#line 497 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_FLOOR, (double)(yyvsp[(2) - (2)].Integer)); } break; case 76: /* Line 1455 of yacc.c */ -#line 498 "ntp_parser.y" +#line 499 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_COHORT, (double)(yyvsp[(2) - (2)].Integer)); } break; case 77: /* Line 1455 of yacc.c */ -#line 500 "ntp_parser.y" +#line 501 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_ORPHAN, (double)(yyvsp[(2) - (2)].Integer)); } break; case 78: /* Line 1455 of yacc.c */ -#line 502 "ntp_parser.y" +#line 503 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MINDISP, (yyvsp[(2) - (2)].Double)); } break; case 79: /* Line 1455 of yacc.c */ -#line 504 "ntp_parser.y" +#line 505 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MAXDIST, (yyvsp[(2) - (2)].Double)); } break; case 80: /* Line 1455 of yacc.c */ -#line 506 "ntp_parser.y" +#line 507 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MINCLOCK, (yyvsp[(2) - (2)].Double)); } break; case 81: /* Line 1455 of yacc.c */ -#line 508 "ntp_parser.y" +#line 509 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MAXCLOCK, (yyvsp[(2) - (2)].Double)); } break; case 82: /* Line 1455 of yacc.c */ -#line 510 "ntp_parser.y" +#line 511 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MINSANE, (double)(yyvsp[(2) - (2)].Integer)); } break; case 83: /* Line 1455 of yacc.c */ -#line 512 "ntp_parser.y" +#line 513 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_BEACON, (double)(yyvsp[(2) - (2)].Integer)); } break; case 84: /* Line 1455 of yacc.c */ -#line 514 "ntp_parser.y" +#line 515 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(PROTO_MAXHOP, (double)(yyvsp[(2) - (2)].Integer)); } break; case 85: /* Line 1455 of yacc.c */ -#line 524 "ntp_parser.y" +#line 525 "ntp_parser.y" { append_queue(cfgt.stats_list, (yyvsp[(2) - (2)].Queue)); } break; case 86: /* Line 1455 of yacc.c */ -#line 526 "ntp_parser.y" - { cfgt.stats_dir = (yyvsp[(2) - (2)].String); } +#line 527 "ntp_parser.y" + { + if (input_from_file) + cfgt.stats_dir = (yyvsp[(2) - (2)].String); + else { + free((yyvsp[(2) - (2)].String)); + yyerror("statsdir remote configuration ignored"); + } + } break; case 87: /* Line 1455 of yacc.c */ -#line 528 "ntp_parser.y" +#line 536 "ntp_parser.y" { enqueue(cfgt.filegen_opts, create_filegen_node((yyvsp[(2) - (3)].VoidPtr), (yyvsp[(3) - (3)].Queue))); @@ -2617,182 +2633,221 @@ yyreduce: case 88: /* Line 1455 of yacc.c */ -#line 535 "ntp_parser.y" +#line 543 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].VoidPtr)); } break; case 89: /* Line 1455 of yacc.c */ -#line 536 "ntp_parser.y" +#line 544 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].VoidPtr)); } break; case 90: /* Line 1455 of yacc.c */ -#line 541 "ntp_parser.y" +#line 549 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("clockstats"); } break; case 91: /* Line 1455 of yacc.c */ -#line 543 "ntp_parser.y" +#line 551 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("cryptostats"); } break; case 92: /* Line 1455 of yacc.c */ -#line 545 "ntp_parser.y" +#line 553 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("loopstats"); } break; case 93: /* Line 1455 of yacc.c */ -#line 547 "ntp_parser.y" +#line 555 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("peerstats"); } break; case 94: /* Line 1455 of yacc.c */ -#line 549 "ntp_parser.y" +#line 557 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("rawstats"); } break; case 95: /* Line 1455 of yacc.c */ -#line 551 "ntp_parser.y" +#line 559 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("sysstats"); } break; case 96: /* Line 1455 of yacc.c */ -#line 553 "ntp_parser.y" +#line 561 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("timingstats"); } break; case 97: /* Line 1455 of yacc.c */ -#line 555 "ntp_parser.y" +#line 563 "ntp_parser.y" { (yyval.VoidPtr) = create_pval("protostats"); } break; case 98: /* Line 1455 of yacc.c */ -#line 559 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } +#line 568 "ntp_parser.y" + { + if ((yyvsp[(2) - (2)].Attr_val) != NULL) + (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); + else + (yyval.Queue) = (yyvsp[(1) - (2)].Queue); + } break; case 99: /* Line 1455 of yacc.c */ -#line 560 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } +#line 575 "ntp_parser.y" + { + if ((yyvsp[(1) - (1)].Attr_val) != NULL) + (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); + else + (yyval.Queue) = create_queue(); + } break; case 100: /* Line 1455 of yacc.c */ -#line 565 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_sval(T_File, (yyvsp[(2) - (2)].String)); } +#line 585 "ntp_parser.y" + { + if (input_from_file) + (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); + else { + (yyval.Attr_val) = NULL; + free((yyvsp[(2) - (2)].String)); + yyerror("filegen file remote configuration ignored"); + } + } break; case 101: /* Line 1455 of yacc.c */ -#line 567 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_ival(T_Type, (yyvsp[(2) - (2)].Integer)); } +#line 595 "ntp_parser.y" + { + if (input_from_file) + (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); + else { + (yyval.Attr_val) = NULL; + yyerror("filegen type remote configuration ignored"); + } + } break; case 102: /* Line 1455 of yacc.c */ -#line 568 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } +#line 604 "ntp_parser.y" + { + if (input_from_file) + (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); + else { + (yyval.Attr_val) = NULL; + yyerror("filegen link remote configuration ignored"); + } + } break; case 103: /* Line 1455 of yacc.c */ -#line 569 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } +#line 613 "ntp_parser.y" + { + if (input_from_file) + (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); + else { + (yyval.Attr_val) = NULL; + yyerror("filegen nolink remote configuration ignored"); + } + } break; case 104: /* Line 1455 of yacc.c */ -#line 570 "ntp_parser.y" +#line 621 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 105: /* Line 1455 of yacc.c */ -#line 571 "ntp_parser.y" +#line 622 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 106: /* Line 1455 of yacc.c */ -#line 575 "ntp_parser.y" +#line 626 "ntp_parser.y" { (yyval.Integer) = FILEGEN_NONE; } break; case 107: /* Line 1455 of yacc.c */ -#line 576 "ntp_parser.y" +#line 627 "ntp_parser.y" { (yyval.Integer) = FILEGEN_PID; } break; case 108: /* Line 1455 of yacc.c */ -#line 577 "ntp_parser.y" +#line 628 "ntp_parser.y" { (yyval.Integer) = FILEGEN_DAY; } break; case 109: /* Line 1455 of yacc.c */ -#line 578 "ntp_parser.y" +#line 629 "ntp_parser.y" { (yyval.Integer) = FILEGEN_WEEK; } break; case 110: /* Line 1455 of yacc.c */ -#line 579 "ntp_parser.y" +#line 630 "ntp_parser.y" { (yyval.Integer) = FILEGEN_MONTH; } break; case 111: /* Line 1455 of yacc.c */ -#line 580 "ntp_parser.y" +#line 631 "ntp_parser.y" { (yyval.Integer) = FILEGEN_YEAR; } break; case 112: /* Line 1455 of yacc.c */ -#line 581 "ntp_parser.y" +#line 632 "ntp_parser.y" { (yyval.Integer) = FILEGEN_AGE; } break; case 113: /* Line 1455 of yacc.c */ -#line 591 "ntp_parser.y" +#line 642 "ntp_parser.y" { append_queue(cfgt.discard_opts, (yyvsp[(2) - (2)].Queue)); } @@ -2801,7 +2856,7 @@ yyreduce: case 114: /* Line 1455 of yacc.c */ -#line 595 "ntp_parser.y" +#line 646 "ntp_parser.y" { enqueue(cfgt.restrict_opts, create_restrict_node((yyvsp[(2) - (3)].Address_node), NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no)); @@ -2811,7 +2866,7 @@ yyreduce: case 115: /* Line 1455 of yacc.c */ -#line 600 "ntp_parser.y" +#line 651 "ntp_parser.y" { enqueue(cfgt.restrict_opts, create_restrict_node(NULL, NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no)); @@ -2821,7 +2876,7 @@ yyreduce: case 116: /* Line 1455 of yacc.c */ -#line 605 "ntp_parser.y" +#line 656 "ntp_parser.y" { enqueue(cfgt.restrict_opts, create_restrict_node( @@ -2839,7 +2894,7 @@ yyreduce: case 117: /* Line 1455 of yacc.c */ -#line 618 "ntp_parser.y" +#line 669 "ntp_parser.y" { enqueue(cfgt.restrict_opts, create_restrict_node( @@ -2857,7 +2912,7 @@ yyreduce: case 118: /* Line 1455 of yacc.c */ -#line 631 "ntp_parser.y" +#line 682 "ntp_parser.y" { enqueue(cfgt.restrict_opts, create_restrict_node((yyvsp[(2) - (5)].Address_node), (yyvsp[(4) - (5)].Address_node), (yyvsp[(5) - (5)].Queue), ip_file->line_no)); @@ -2867,378 +2922,395 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 638 "ntp_parser.y" +#line 689 "ntp_parser.y" { (yyval.Queue) = create_queue(); } break; case 120: /* Line 1455 of yacc.c */ -#line 639 "ntp_parser.y" +#line 690 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].VoidPtr)); } break; case 121: /* Line 1455 of yacc.c */ -#line 643 "ntp_parser.y" +#line 694 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_TIMEOUT); } break; case 122: /* Line 1455 of yacc.c */ -#line 644 "ntp_parser.y" +#line 695 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_IGNORE); } break; case 123: /* Line 1455 of yacc.c */ -#line 645 "ntp_parser.y" +#line 696 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_KOD); } break; case 124: /* Line 1455 of yacc.c */ -#line 646 "ntp_parser.y" +#line 697 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_MSSNTP); } break; case 125: /* Line 1455 of yacc.c */ -#line 647 "ntp_parser.y" +#line 698 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_LIMITED); } break; case 126: /* Line 1455 of yacc.c */ -#line 648 "ntp_parser.y" +#line 699 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_LPTRAP); } break; case 127: /* Line 1455 of yacc.c */ -#line 649 "ntp_parser.y" +#line 700 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_NOMODIFY); } break; case 128: /* Line 1455 of yacc.c */ -#line 650 "ntp_parser.y" +#line 701 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_NOPEER); } break; case 129: /* Line 1455 of yacc.c */ -#line 651 "ntp_parser.y" +#line 702 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_NOQUERY); } break; case 130: /* Line 1455 of yacc.c */ -#line 652 "ntp_parser.y" +#line 703 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_DONTSERVE); } break; case 131: /* Line 1455 of yacc.c */ -#line 653 "ntp_parser.y" +#line 704 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_NOTRAP); } break; case 132: /* Line 1455 of yacc.c */ -#line 654 "ntp_parser.y" +#line 705 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_DONTTRUST); } break; case 133: /* Line 1455 of yacc.c */ -#line 655 "ntp_parser.y" +#line 706 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RESM_NTPONLY); } break; case 134: /* Line 1455 of yacc.c */ -#line 656 "ntp_parser.y" +#line 707 "ntp_parser.y" { (yyval.VoidPtr) = create_ival(RES_VERSION); } break; case 135: /* Line 1455 of yacc.c */ -#line 660 "ntp_parser.y" +#line 711 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 136: /* Line 1455 of yacc.c */ -#line 661 "ntp_parser.y" +#line 712 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 137: /* Line 1455 of yacc.c */ -#line 665 "ntp_parser.y" +#line 716 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 138: /* Line 1455 of yacc.c */ -#line 666 "ntp_parser.y" +#line 717 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 139: /* Line 1455 of yacc.c */ -#line 667 "ntp_parser.y" +#line 718 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; case 140: /* Line 1455 of yacc.c */ -#line 676 "ntp_parser.y" +#line 727 "ntp_parser.y" { enqueue(cfgt.fudge, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); } break; case 141: /* Line 1455 of yacc.c */ -#line 680 "ntp_parser.y" +#line 731 "ntp_parser.y" { enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 142: /* Line 1455 of yacc.c */ -#line 681 "ntp_parser.y" +#line 732 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 143: /* Line 1455 of yacc.c */ -#line 686 "ntp_parser.y" +#line 737 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(CLK_HAVETIME1, (yyvsp[(2) - (2)].Double)); } break; case 144: /* Line 1455 of yacc.c */ -#line 688 "ntp_parser.y" +#line 739 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(CLK_HAVETIME2, (yyvsp[(2) - (2)].Double)); } break; case 145: /* Line 1455 of yacc.c */ -#line 690 "ntp_parser.y" +#line 741 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(CLK_HAVEVAL1, (yyvsp[(2) - (2)].Integer)); } break; case 146: /* Line 1455 of yacc.c */ -#line 692 "ntp_parser.y" +#line 743 "ntp_parser.y" { (yyval.Attr_val) = create_attr_sval(CLK_HAVEVAL2, (yyvsp[(2) - (2)].String)); } break; case 147: /* Line 1455 of yacc.c */ -#line 694 "ntp_parser.y" +#line 745 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(CLK_HAVEFLAG1, (yyvsp[(2) - (2)].Integer)); } break; case 148: /* Line 1455 of yacc.c */ -#line 696 "ntp_parser.y" +#line 747 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(CLK_HAVEFLAG2, (yyvsp[(2) - (2)].Integer)); } break; case 149: /* Line 1455 of yacc.c */ -#line 698 "ntp_parser.y" +#line 749 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(CLK_HAVEFLAG3, (yyvsp[(2) - (2)].Integer)); } break; case 150: /* Line 1455 of yacc.c */ -#line 700 "ntp_parser.y" +#line 751 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(CLK_HAVEFLAG4, (yyvsp[(2) - (2)].Integer)); } break; case 151: /* Line 1455 of yacc.c */ -#line 709 "ntp_parser.y" +#line 760 "ntp_parser.y" { append_queue(cfgt.enable_opts, (yyvsp[(2) - (2)].Queue)); } break; case 152: /* Line 1455 of yacc.c */ -#line 711 "ntp_parser.y" +#line 762 "ntp_parser.y" { append_queue(cfgt.disable_opts, (yyvsp[(2) - (2)].Queue)); } break; case 153: /* Line 1455 of yacc.c */ -#line 715 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } +#line 767 "ntp_parser.y" + { + if ((yyvsp[(2) - (2)].Attr_val) != NULL) + (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); + else + (yyval.Queue) = (yyvsp[(1) - (2)].Queue); + } break; case 154: /* Line 1455 of yacc.c */ -#line 716 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } +#line 774 "ntp_parser.y" + { + if ((yyvsp[(1) - (1)].Attr_val) != NULL) + (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); + else + (yyval.Queue) = create_queue(); + } break; case 155: /* Line 1455 of yacc.c */ -#line 720 "ntp_parser.y" +#line 783 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 156: /* Line 1455 of yacc.c */ -#line 721 "ntp_parser.y" +#line 784 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 157: /* Line 1455 of yacc.c */ -#line 722 "ntp_parser.y" +#line 785 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 158: /* Line 1455 of yacc.c */ -#line 723 "ntp_parser.y" +#line 786 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 159: /* Line 1455 of yacc.c */ -#line 724 "ntp_parser.y" +#line 787 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 160: /* Line 1455 of yacc.c */ -#line 725 "ntp_parser.y" +#line 788 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } break; case 161: /* Line 1455 of yacc.c */ -#line 726 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); } +#line 790 "ntp_parser.y" + { + if (input_from_file) + (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); + else { + (yyval.Attr_val) = NULL; + yyerror("enable/disable stats remote configuration ignored"); + } + } break; case 162: /* Line 1455 of yacc.c */ -#line 734 "ntp_parser.y" +#line 805 "ntp_parser.y" { append_queue(cfgt.tinker, (yyvsp[(2) - (2)].Queue)); } break; case 163: /* Line 1455 of yacc.c */ -#line 738 "ntp_parser.y" +#line 809 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; case 164: /* Line 1455 of yacc.c */ -#line 739 "ntp_parser.y" +#line 810 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; case 165: /* Line 1455 of yacc.c */ -#line 743 "ntp_parser.y" +#line 814 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_ALLAN, (yyvsp[(2) - (2)].Double)); } break; case 166: /* Line 1455 of yacc.c */ -#line 744 "ntp_parser.y" +#line 815 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_PHI, (yyvsp[(2) - (2)].Double)); } break; case 167: /* Line 1455 of yacc.c */ -#line 745 "ntp_parser.y" +#line 816 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_FREQ, (yyvsp[(2) - (2)].Double)); } break; case 168: /* Line 1455 of yacc.c */ -#line 746 "ntp_parser.y" +#line 817 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_HUFFPUFF, (yyvsp[(2) - (2)].Double)); } break; case 169: /* Line 1455 of yacc.c */ -#line 747 "ntp_parser.y" +#line 818 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_PANIC, (yyvsp[(2) - (2)].Double)); } break; case 170: /* Line 1455 of yacc.c */ -#line 748 "ntp_parser.y" +#line 819 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_MAX, (yyvsp[(2) - (2)].Double)); } break; case 171: /* Line 1455 of yacc.c */ -#line 749 "ntp_parser.y" +#line 820 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval(LOOP_MINSTEP, (yyvsp[(2) - (2)].Double)); } break; case 173: /* Line 1455 of yacc.c */ -#line 760 "ntp_parser.y" +#line 831 "ntp_parser.y" { if (curr_include_level >= MAXINCLUDELEVEL) { fprintf(stderr, "getconfig: Maximum include file level exceeded.\n"); @@ -3259,7 +3331,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 776 "ntp_parser.y" +#line 847 "ntp_parser.y" { while (curr_include_level != -1) FCLOSE(fp[curr_include_level--]); @@ -3269,183 +3341,206 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 782 "ntp_parser.y" +#line 853 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double))); } break; case 176: /* Line 1455 of yacc.c */ -#line 784 "ntp_parser.y" +#line 855 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer))); } break; case 177: /* Line 1455 of yacc.c */ -#line 786 "ntp_parser.y" +#line 857 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double))); } break; case 178: /* Line 1455 of yacc.c */ -#line 788 "ntp_parser.y" +#line 859 "ntp_parser.y" { /* Null action, possibly all null parms */ } break; case 179: /* Line 1455 of yacc.c */ -#line 790 "ntp_parser.y" +#line 861 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); } break; case 180: /* Line 1455 of yacc.c */ -#line 793 "ntp_parser.y" +#line 864 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); } break; case 181: /* Line 1455 of yacc.c */ -#line 795 "ntp_parser.y" - { enqueue(cfgt.vars, create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); } +#line 866 "ntp_parser.y" + { + if (input_from_file) + enqueue(cfgt.vars, + create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); + else { + free((yyvsp[(2) - (2)].String)); + yyerror("logfile remote configuration ignored"); + } + } break; case 182: /* Line 1455 of yacc.c */ -#line 798 "ntp_parser.y" +#line 877 "ntp_parser.y" { append_queue(cfgt.logconfig, (yyvsp[(2) - (2)].Queue)); } break; case 183: /* Line 1455 of yacc.c */ -#line 800 "ntp_parser.y" +#line 879 "ntp_parser.y" { append_queue(cfgt.phone, (yyvsp[(2) - (2)].Queue)); } break; case 184: /* Line 1455 of yacc.c */ -#line 802 "ntp_parser.y" - { enqueue(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); } +#line 881 "ntp_parser.y" + { + if (input_from_file) + enqueue(cfgt.vars, + create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); + else { + free((yyvsp[(2) - (2)].String)); + yyerror("saveconfigdir remote configuration ignored"); + } + } break; case 185: /* Line 1455 of yacc.c */ -#line 804 "ntp_parser.y" - { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (2)].Address_node), NULL)); } +#line 891 "ntp_parser.y" + { enqueue(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); } break; case 186: /* Line 1455 of yacc.c */ -#line 806 "ntp_parser.y" - { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); } +#line 893 "ntp_parser.y" + { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (2)].Address_node), NULL)); } break; case 187: /* Line 1455 of yacc.c */ -#line 808 "ntp_parser.y" - { append_queue(cfgt.ttl, (yyvsp[(2) - (2)].Queue)); } +#line 895 "ntp_parser.y" + { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); } break; case 188: /* Line 1455 of yacc.c */ -#line 810 "ntp_parser.y" - { enqueue(cfgt.qos, create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); } +#line 897 "ntp_parser.y" + { append_queue(cfgt.ttl, (yyvsp[(2) - (2)].Queue)); } break; case 189: /* Line 1455 of yacc.c */ -#line 815 "ntp_parser.y" - { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); } +#line 899 "ntp_parser.y" + { enqueue(cfgt.qos, create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String))); } break; case 190: /* Line 1455 of yacc.c */ -#line 817 "ntp_parser.y" +#line 904 "ntp_parser.y" + { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); } + break; + + case 191: + +/* Line 1455 of yacc.c */ +#line 906 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double))); enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String))); } break; - case 191: + case 192: /* Line 1455 of yacc.c */ -#line 820 "ntp_parser.y" +#line 909 "ntp_parser.y" { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, "\0")); } break; - case 192: + case 193: /* Line 1455 of yacc.c */ -#line 825 "ntp_parser.y" +#line 914 "ntp_parser.y" { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (4)].String), (yyvsp[(3) - (4)].String), DEF); } break; - case 193: + case 194: /* Line 1455 of yacc.c */ -#line 827 "ntp_parser.y" +#line 916 "ntp_parser.y" { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (3)].String), (yyvsp[(3) - (3)].String), 0); } break; - case 194: + case 195: /* Line 1455 of yacc.c */ -#line 832 "ntp_parser.y" +#line 921 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; - case 195: + case 196: /* Line 1455 of yacc.c */ -#line 833 "ntp_parser.y" +#line 922 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; - case 196: + case 197: /* Line 1455 of yacc.c */ -#line 837 "ntp_parser.y" +#line 926 "ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); } break; - case 197: + case 198: /* Line 1455 of yacc.c */ -#line 838 "ntp_parser.y" +#line 927 "ntp_parser.y" { (yyval.Attr_val) = create_attr_pval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Address_node)); } break; - case 198: + case 199: /* Line 1455 of yacc.c */ -#line 842 "ntp_parser.y" +#line 931 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); } break; - case 199: + case 200: /* Line 1455 of yacc.c */ -#line 843 "ntp_parser.y" +#line 932 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); } break; - case 200: + case 201: /* Line 1455 of yacc.c */ -#line 848 "ntp_parser.y" +#line 937 "ntp_parser.y" { char prefix = (yyvsp[(1) - (1)].String)[0]; char *type = (yyvsp[(1) - (1)].String) + 1; @@ -3459,72 +3554,72 @@ yyreduce: } break; - case 201: + case 202: /* Line 1455 of yacc.c */ -#line 863 "ntp_parser.y" +#line 952 "ntp_parser.y" { enqueue(cfgt.nic_rules, create_nic_rule_node((yyvsp[(3) - (3)].Integer), NULL, (yyvsp[(2) - (3)].Integer))); } break; - case 202: + case 203: /* Line 1455 of yacc.c */ -#line 868 "ntp_parser.y" +#line 957 "ntp_parser.y" { enqueue(cfgt.nic_rules, create_nic_rule_node(0, (yyvsp[(3) - (3)].String), (yyvsp[(2) - (3)].Integer))); } break; - case 211: + case 212: /* Line 1455 of yacc.c */ -#line 898 "ntp_parser.y" +#line 987 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_ival((yyvsp[(2) - (2)].Integer))); } break; - case 212: + case 213: /* Line 1455 of yacc.c */ -#line 899 "ntp_parser.y" +#line 988 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue(create_ival((yyvsp[(1) - (1)].Integer))); } break; - case 213: + case 214: /* Line 1455 of yacc.c */ -#line 903 "ntp_parser.y" +#line 992 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_pval((yyvsp[(2) - (2)].String))); } break; - case 214: + case 215: /* Line 1455 of yacc.c */ -#line 904 "ntp_parser.y" +#line 993 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue(create_pval((yyvsp[(1) - (1)].String))); } break; - case 215: + case 216: /* Line 1455 of yacc.c */ -#line 908 "ntp_parser.y" +#line 997 "ntp_parser.y" { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Address_node)); } break; - case 216: + case 217: /* Line 1455 of yacc.c */ -#line 909 "ntp_parser.y" +#line 998 "ntp_parser.y" { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Address_node)); } break; - case 217: + case 218: /* Line 1455 of yacc.c */ -#line 914 "ntp_parser.y" +#line 1003 "ntp_parser.y" { if ((yyvsp[(1) - (1)].Integer) != 0 && (yyvsp[(1) - (1)].Integer) != 1) { yyerror("Integer value is not boolean (0 or 1). Assuming 1"); @@ -3535,31 +3630,31 @@ yyreduce: } break; - case 218: + case 219: /* Line 1455 of yacc.c */ -#line 922 "ntp_parser.y" +#line 1011 "ntp_parser.y" { (yyval.Integer) = 1; } break; - case 219: + case 220: /* Line 1455 of yacc.c */ -#line 923 "ntp_parser.y" +#line 1012 "ntp_parser.y" { (yyval.Integer) = 0; } break; - case 220: + case 221: /* Line 1455 of yacc.c */ -#line 927 "ntp_parser.y" +#line 1016 "ntp_parser.y" { (yyval.Double) = (double)(yyvsp[(1) - (1)].Integer); } break; - case 222: + case 223: /* Line 1455 of yacc.c */ -#line 938 "ntp_parser.y" +#line 1027 "ntp_parser.y" { cfgt.sim_details = create_sim_node((yyvsp[(3) - (5)].Queue), (yyvsp[(4) - (5)].Queue)); @@ -3568,150 +3663,150 @@ yyreduce: } break; - case 223: - -/* Line 1455 of yacc.c */ -#line 952 "ntp_parser.y" - { old_config_style = 0; } - break; - case 224: /* Line 1455 of yacc.c */ -#line 956 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); } +#line 1041 "ntp_parser.y" + { old_config_style = 0; } break; case 225: /* Line 1455 of yacc.c */ -#line 957 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); } +#line 1045 "ntp_parser.y" + { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); } break; case 226: /* Line 1455 of yacc.c */ -#line 961 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } +#line 1046 "ntp_parser.y" + { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); } break; case 227: /* Line 1455 of yacc.c */ -#line 962 "ntp_parser.y" +#line 1050 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; case 228: /* Line 1455 of yacc.c */ -#line 966 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_server)); } +#line 1051 "ntp_parser.y" + { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; case 229: /* Line 1455 of yacc.c */ -#line 967 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_server)); } +#line 1055 "ntp_parser.y" + { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_server)); } break; case 230: /* Line 1455 of yacc.c */ -#line 972 "ntp_parser.y" - { (yyval.Sim_server) = create_sim_server((yyvsp[(1) - (5)].Address_node), (yyvsp[(3) - (5)].Double), (yyvsp[(4) - (5)].Queue)); } +#line 1056 "ntp_parser.y" + { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_server)); } break; case 231: /* Line 1455 of yacc.c */ -#line 976 "ntp_parser.y" - { (yyval.Double) = (yyvsp[(3) - (4)].Double); } +#line 1061 "ntp_parser.y" + { (yyval.Sim_server) = create_sim_server((yyvsp[(1) - (5)].Address_node), (yyvsp[(3) - (5)].Double), (yyvsp[(4) - (5)].Queue)); } break; case 232: /* Line 1455 of yacc.c */ -#line 980 "ntp_parser.y" - { (yyval.Address_node) = (yyvsp[(3) - (3)].Address_node); } +#line 1065 "ntp_parser.y" + { (yyval.Double) = (yyvsp[(3) - (4)].Double); } break; case 233: /* Line 1455 of yacc.c */ -#line 984 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_script)); } +#line 1069 "ntp_parser.y" + { (yyval.Address_node) = (yyvsp[(3) - (3)].Address_node); } break; case 234: /* Line 1455 of yacc.c */ -#line 985 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_script)); } +#line 1073 "ntp_parser.y" + { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_script)); } break; case 235: /* Line 1455 of yacc.c */ -#line 990 "ntp_parser.y" - { (yyval.Sim_script) = create_sim_script_info((yyvsp[(3) - (6)].Double), (yyvsp[(5) - (6)].Queue)); } +#line 1074 "ntp_parser.y" + { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_script)); } break; case 236: /* Line 1455 of yacc.c */ -#line 994 "ntp_parser.y" - { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); } +#line 1079 "ntp_parser.y" + { (yyval.Sim_script) = create_sim_script_info((yyvsp[(3) - (6)].Double), (yyvsp[(5) - (6)].Queue)); } break; case 237: /* Line 1455 of yacc.c */ -#line 995 "ntp_parser.y" - { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); } +#line 1083 "ntp_parser.y" + { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); } break; case 238: /* Line 1455 of yacc.c */ -#line 1000 "ntp_parser.y" - { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } +#line 1084 "ntp_parser.y" + { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); } break; case 239: /* Line 1455 of yacc.c */ -#line 1002 "ntp_parser.y" +#line 1089 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; case 240: /* Line 1455 of yacc.c */ -#line 1004 "ntp_parser.y" +#line 1091 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; case 241: /* Line 1455 of yacc.c */ -#line 1006 "ntp_parser.y" +#line 1093 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; case 242: /* Line 1455 of yacc.c */ -#line 1008 "ntp_parser.y" +#line 1095 "ntp_parser.y" + { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } + break; + + case 243: + +/* Line 1455 of yacc.c */ +#line 1097 "ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); } break; /* Line 1455 of yacc.c */ -#line 3715 "ntp_parser.c" +#line 3810 "ntp_parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3923,7 +4018,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1012 "ntp_parser.y" +#line 1101 "ntp_parser.y" void yyerror (char *msg) diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h index c9b8221c1..2e6cc0aa2 100644 --- a/ntpd/ntp_parser.h +++ b/ntpd/ntp_parser.h @@ -157,48 +157,49 @@ T_Requestkey = 373, T_Restrict = 374, T_Revoke = 375, - T_Server = 376, - T_Setvar = 377, - T_Sign = 378, - T_Statistics = 379, - T_Stats = 380, - T_Statsdir = 381, - T_Step = 382, - T_Stepout = 383, - T_Stratum = 384, - T_String = 385, - T_Sysstats = 386, - T_Tick = 387, - T_Time1 = 388, - T_Time2 = 389, - T_Timingstats = 390, - T_Tinker = 391, - T_Tos = 392, - T_Trap = 393, - T_True = 394, - T_Trustedkey = 395, - T_Ttl = 396, - T_Type = 397, - T_Unconfig = 398, - T_Unpeer = 399, - T_Version = 400, - T_WanderThreshold = 401, - T_Week = 402, - T_Xleave = 403, - T_Year = 404, - T_Flag = 405, - T_Void = 406, - T_EOC = 407, - T_Simulate = 408, - T_Beep_Delay = 409, - T_Sim_Duration = 410, - T_Server_Offset = 411, - T_Duration = 412, - T_Freq_Offset = 413, - T_Wander = 414, - T_Jitter = 415, - T_Prop_Delay = 416, - T_Proc_Delay = 417 + T_Saveconfigdir = 376, + T_Server = 377, + T_Setvar = 378, + T_Sign = 379, + T_Statistics = 380, + T_Stats = 381, + T_Statsdir = 382, + T_Step = 383, + T_Stepout = 384, + T_Stratum = 385, + T_String = 386, + T_Sysstats = 387, + T_Tick = 388, + T_Time1 = 389, + T_Time2 = 390, + T_Timingstats = 391, + T_Tinker = 392, + T_Tos = 393, + T_Trap = 394, + T_True = 395, + T_Trustedkey = 396, + T_Ttl = 397, + T_Type = 398, + T_Unconfig = 399, + T_Unpeer = 400, + T_Version = 401, + T_WanderThreshold = 402, + T_Week = 403, + T_Xleave = 404, + T_Year = 405, + T_Flag = 406, + T_Void = 407, + T_EOC = 408, + T_Simulate = 409, + T_Beep_Delay = 410, + T_Sim_Duration = 411, + T_Server_Offset = 412, + T_Duration = 413, + T_Freq_Offset = 414, + T_Wander = 415, + T_Jitter = 416, + T_Prop_Delay = 417, + T_Proc_Delay = 418 }; #endif /* Tokens. */ @@ -320,48 +321,49 @@ #define T_Requestkey 373 #define T_Restrict 374 #define T_Revoke 375 -#define T_Server 376 -#define T_Setvar 377 -#define T_Sign 378 -#define T_Statistics 379 -#define T_Stats 380 -#define T_Statsdir 381 -#define T_Step 382 -#define T_Stepout 383 -#define T_Stratum 384 -#define T_String 385 -#define T_Sysstats 386 -#define T_Tick 387 -#define T_Time1 388 -#define T_Time2 389 -#define T_Timingstats 390 -#define T_Tinker 391 -#define T_Tos 392 -#define T_Trap 393 -#define T_True 394 -#define T_Trustedkey 395 -#define T_Ttl 396 -#define T_Type 397 -#define T_Unconfig 398 -#define T_Unpeer 399 -#define T_Version 400 -#define T_WanderThreshold 401 -#define T_Week 402 -#define T_Xleave 403 -#define T_Year 404 -#define T_Flag 405 -#define T_Void 406 -#define T_EOC 407 -#define T_Simulate 408 -#define T_Beep_Delay 409 -#define T_Sim_Duration 410 -#define T_Server_Offset 411 -#define T_Duration 412 -#define T_Freq_Offset 413 -#define T_Wander 414 -#define T_Jitter 415 -#define T_Prop_Delay 416 -#define T_Proc_Delay 417 +#define T_Saveconfigdir 376 +#define T_Server 377 +#define T_Setvar 378 +#define T_Sign 379 +#define T_Statistics 380 +#define T_Stats 381 +#define T_Statsdir 382 +#define T_Step 383 +#define T_Stepout 384 +#define T_Stratum 385 +#define T_String 386 +#define T_Sysstats 387 +#define T_Tick 388 +#define T_Time1 389 +#define T_Time2 390 +#define T_Timingstats 391 +#define T_Tinker 392 +#define T_Tos 393 +#define T_Trap 394 +#define T_True 395 +#define T_Trustedkey 396 +#define T_Ttl 397 +#define T_Type 398 +#define T_Unconfig 399 +#define T_Unpeer 400 +#define T_Version 401 +#define T_WanderThreshold 402 +#define T_Week 403 +#define T_Xleave 404 +#define T_Year 405 +#define T_Flag 406 +#define T_Void 407 +#define T_EOC 408 +#define T_Simulate 409 +#define T_Beep_Delay 410 +#define T_Sim_Duration 411 +#define T_Server_Offset 412 +#define T_Duration 413 +#define T_Freq_Offset 414 +#define T_Wander 415 +#define T_Jitter 416 +#define T_Prop_Delay 417 +#define T_Proc_Delay 418 @@ -389,7 +391,7 @@ typedef union YYSTYPE /* Line 1676 of yacc.c */ -#line 393 "ntp_parser.h" +#line 395 "ntp_parser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y index bf40529ee..ff7a3d9a0 100644 --- a/ntpd/ntp_parser.y +++ b/ntpd/ntp_parser.y @@ -182,6 +182,7 @@ %token T_Requestkey %token T_Restrict %token T_Revoke +%token T_Saveconfigdir %token T_Server %token T_Setvar %token T_Sign @@ -304,12 +305,12 @@ command_list * error messages. The following should suffice for * the time being. */ - msyslog(LOG_ERR, - "syntax error in %s line %d, column %d", - ip_file->fname, - ip_file->err_line_no, - ip_file->err_col_no); - } + msyslog(LOG_ERR, + "syntax error in %s line %d, column %d", + ip_file->fname, + ip_file->err_line_no, + ip_file->err_col_no); + } ; command : /* NULL STATEMENT */ @@ -523,7 +524,14 @@ monitoring_command : T_Statistics stats_list { append_queue(cfgt.stats_list, $2); } | T_Statsdir T_String - { cfgt.stats_dir = $2; } + { + if (input_from_file) + cfgt.stats_dir = $2; + else { + free($2); + yyerror("statsdir remote configuration ignored"); + } + } | T_Filegen stat filegen_option_list { enqueue(cfgt.filegen_opts, @@ -556,17 +564,60 @@ stat ; filegen_option_list - : filegen_option_list filegen_option { $$ = enqueue($1, $2); } - | filegen_option { $$ = enqueue_in_new_queue($1); } + : filegen_option_list filegen_option + { + if ($2 != NULL) + $$ = enqueue($1, $2); + else + $$ = $1; + } + | filegen_option + { + if ($1 != NULL) + $$ = enqueue_in_new_queue($1); + else + $$ = create_queue(); + } ; filegen_option : T_File T_String - { $$ = create_attr_sval(T_File, $2); } + { + if (input_from_file) + $$ = create_attr_sval($1, $2); + else { + $$ = NULL; + free($2); + yyerror("filegen file remote configuration ignored"); + } + } | T_Type filegen_type - { $$ = create_attr_ival(T_Type, $2); } - | T_Link { $$ = create_attr_ival(T_Flag, $1); } - | T_Nolink { $$ = create_attr_ival(T_Flag, $1); } + { + if (input_from_file) + $$ = create_attr_ival($1, $2); + else { + $$ = NULL; + yyerror("filegen type remote configuration ignored"); + } + } + | T_Link + { + if (input_from_file) + $$ = create_attr_ival(T_Flag, $1); + else { + $$ = NULL; + yyerror("filegen link remote configuration ignored"); + } + } + | T_Nolink + { + if (input_from_file) + $$ = create_attr_ival(T_Flag, $1); + else { + $$ = NULL; + yyerror("filegen nolink remote configuration ignored"); + } + } | T_Enable { $$ = create_attr_ival(T_Flag, $1); } | T_Disable { $$ = create_attr_ival(T_Flag, $1); } ; @@ -712,8 +763,20 @@ system_option_command ; system_option_list - : system_option_list system_option { $$ = enqueue($1, $2); } - | system_option { $$ = enqueue_in_new_queue($1); } + : system_option_list system_option + { + if ($2 != NULL) + $$ = enqueue($1, $2); + else + $$ = $1; + } + | system_option + { + if ($1 != NULL) + $$ = enqueue_in_new_queue($1); + else + $$ = create_queue(); + } ; system_option @@ -723,7 +786,15 @@ system_option | T_Kernel { $$ = create_attr_ival(T_Flag, $1); } | T_Monitor { $$ = create_attr_ival(T_Flag, $1); } | T_Ntp { $$ = create_attr_ival(T_Flag, $1); } - | T_Stats { $$ = create_attr_ival(T_Flag, $1); } + | T_Stats + { + if (input_from_file) + $$ = create_attr_ival(T_Flag, $1); + else { + $$ = NULL; + yyerror("enable/disable stats remote configuration ignored"); + } + } ; /* Tinker Commands @@ -792,12 +863,30 @@ miscellaneous_command | T_Pidfile T_String { enqueue(cfgt.vars, create_attr_sval($1, $2)); } | T_Logfile T_String - { enqueue(cfgt.vars, create_attr_sval($1, $2)); } + { + if (input_from_file) + enqueue(cfgt.vars, + create_attr_sval($1, $2)); + else { + free($2); + yyerror("logfile remote configuration ignored"); + } + } | T_Logconfig log_config_list { append_queue(cfgt.logconfig, $2); } | T_Phone string_list { append_queue(cfgt.phone, $2); } + | T_Saveconfigdir T_String + { + if (input_from_file) + enqueue(cfgt.vars, + create_attr_sval($1, $2)); + else { + free($2); + yyerror("saveconfigdir remote configuration ignored"); + } + } | T_Setvar variable_assign { enqueue(cfgt.setvar, $2); } | T_Trap ip_address diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c index a50cc1ff8..ff7ab8bad 100644 --- a/ntpd/refclock_palisade.c +++ b/ntpd/refclock_palisade.c @@ -271,13 +271,10 @@ palisade_start ( struct refclockproc *pp; int fd; char gpsdev[20]; - struct termios tio; -#ifdef SYS_WINNT - (void) sprintf(gpsdev, "COM%d:", unit); -#else + (void) sprintf(gpsdev, DEVICE, unit); -#endif + /* * Open serial port. */ diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index d50353616..132a649e3 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -1833,25 +1833,29 @@ config ( FILE *fp ) { - u_short rstatus; - int rsize; - char *rdata; - int res; + char *rcmd; + u_short rstatus; + int rsize; + char *rdata; + int res; - if (debug > 2) { - printf("In Config\n"); - printf("Keyword = %s\n", pcmd->keyword); - printf("Command = %s\n", pcmd->argval[0].string); - } - - res = doquery(CTL_OP_CONFIGURE, 0, 1, strlen(pcmd->argval[0].string), - pcmd->argval[0].string, &rstatus, - &rsize, &rdata); - rdata[rsize] = '\0'; - printf("%s\n", rdata); + rcmd = pcmd->argval[0].string; + if (debug > 2) { + printf("In Config\n"); + printf("Keyword = %s\n", pcmd->keyword); + printf("Command = %s\n", rcmd); + } + + res = doquery(CTL_OP_CONFIGURE, 0, 1, strlen(rcmd), rcmd, + &rstatus, &rsize, &rdata); + if (rsize > 0 && '\n' == rdata[rsize - 1]) + rsize--; + rdata[rsize] = '\0'; + printf("%s\n", rdata); } + /* * config_from_file - remotely configure an ntpd daemon using the * specified configuration file