#include #define yy_create_buffer sudoers_create_buffer #define yy_delete_buffer sudoers_delete_buffer #define yy_scan_buffer sudoers_scan_buffer #define yy_scan_string sudoers_scan_string #define yy_scan_bytes sudoers_scan_bytes #define yy_flex_debug sudoers_flex_debug #define yy_init_buffer sudoers_init_buffer #define yy_flush_buffer sudoers_flush_buffer #define yy_load_buffer_state sudoers_load_buffer_state #define yy_switch_to_buffer sudoers_switch_to_buffer #define yyin sudoersin #define yyleng sudoersleng #define yylex sudoerslex #define yyout sudoersout #define yyrestart sudoersrestart #define yytext sudoerstext /* $OpenBSD: flex.skl,v 1.12 2013/11/04 17:03:32 millert Exp $ */ /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.12 2013/11/04 17:03:32 millert Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 72 #define YY_END_OF_BUFFER 73 static yyconst short int yy_accept[868] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 60, 68, 67, 66, 59, 70, 38, 61, 62, 38, 63, 60, 60, 60, 60, 65, 64, 71, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 71, 60, 60, 68, 70, 51, 51, 51, 51, 51, 2, 71, 1, 60, 51, 51, 60, 17, 16, 17, 16, 16, 71, 70, 71, 3, 9, 8, 9, 4, 9, 5, 71, 13, 13, 13, 11, 12, 71, 19, 19, 18, 18, 18, 19, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 18, 19, 19, 60, 0, 68, 66, 70, 70, 0, 60, 40, 0, 38, 0, 39, 0, 58, 58, 0, 60, 60, 0, 60, 60, 60, 60, 0, 43, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 60, 69, 60, 60, 68, 0, 0, 0, 0, 0, 70, 60, 60, 60, 60, 60, 2, 1, 0, 1, 52, 52, 0, 60, 17, 17, 15, 14, 15, 0, 0, 3, 9, 0, 6, 7, 9, 9, 13, 0, 13, 13, 0, 10, 40, 0, 0, 39, 19, 19, 0, 19, 0, 0, 18, 18, 18, 18, 18, 18, 19, 19, 51, 19, 19, 19, 19, 19, 19, 19, 19, 19, 70, 70, 0, 40, 60, 60, 60, 60, 60, 0, 0, 43, 43, 51, 45, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 60, 60, 0, 0, 0, 0, 0, 70, 60, 60, 60, 60, 60, 0, 60, 10, 0, 0, 0, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 70, 60, 60, 60, 60, 60, 60, 0, 44, 44, 44, 0, 0, 43, 43, 43, 43, 43, 43, 43, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 47, 51, 51, 48, 60, 60, 60, 60, 0, 0, 0, 0, 0, 70, 60, 60, 60, 60, 0, 0, 0, 0, 0, 18, 18, 19, 19, 51, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 60, 60, 60, 0, 0, 44, 44, 44, 0, 43, 43, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 27, 51, 51, 51, 51, 0, 34, 51, 51, 51, 51, 51, 51, 51, 49, 51, 51, 60, 60, 60, 60, 60, 0, 0, 0, 70, 60, 60, 60, 0, 0, 0, 18, 18, 19, 51, 51, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 60, 60, 60, 60, 60, 0, 44, 0, 43, 43, 43, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 53, 54, 55, 56, 60, 0, 0, 70, 60, 60, 60, 0, 0, 0, 0, 0, 19, 51, 51, 19, 19, 51, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 41, 41, 41, 0, 0, 43, 43, 43, 43, 43, 43, 43, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 36, 51, 51, 51, 0, 26, 51, 51, 51, 0, 35, 51, 51, 0, 25, 0, 28, 46, 60, 0, 0, 70, 60, 60, 60, 41, 41, 41, 51, 51, 19, 51, 51, 19, 19, 19, 60, 41, 41, 41, 41, 0, 43, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 51, 51, 51, 51, 51, 51, 51, 51, 57, 0, 0, 70, 60, 22, 52, 0, 41, 41, 41, 41, 51, 51, 19, 51, 51, 19, 19, 19, 42, 42, 42, 42, 43, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 51, 51, 51, 0, 37, 51, 51, 0, 24, 0, 29, 0, 22, 70, 70, 60, 0, 60, 42, 42, 42, 42, 51, 51, 51, 51, 60, 60, 42, 42, 42, 42, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 50, 0, 32, 51, 51, 51, 0, 70, 70, 20, 70, 23, 22, 0, 0, 0, 0, 0, 22, 0, 0, 0, 42, 42, 42, 42, 51, 51, 51, 60, 60, 60, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 30, 51, 51, 23, 70, 0, 22, 0, 0, 0, 51, 51, 60, 60, 60, 60, 60, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 0, 33, 51, 70, 0, 0, 0, 0, 0, 51, 60, 60, 60, 43, 43, 43, 43, 43, 43, 0, 31, 70, 70, 21, 0, 0, 0, 60, 60, 60, 60, 60, 43, 43, 43, 43, 43, 0, 0, 0, 0, 0, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 1, 7, 1, 1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1, 1, 27, 28, 10, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 39, 40, 41, 42, 43, 44, 39, 45, 46, 47, 48, 49, 50, 51, 52, 39, 10, 53, 10, 1, 54, 1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 61, 61, 64, 65, 66, 67, 61, 61, 68, 69, 70, 71, 61, 61, 61, 61, 61, 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, 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, 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, 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 } ; static yyconst int yy_meta[72] = { 0, 1, 2, 3, 4, 5, 6, 1, 7, 7, 1, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 7, 1, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21 } ; static yyconst short int yy_base[985] = { 0, 0, 70, 72, 80, 87, 126, 178, 248, 156, 200, 132, 140, 319, 0, 4881, 4827, 4873, 5615, 4868, 5615, 388, 95, 5615, 5615, 4816, 5615, 142, 400, 198, 155, 4842, 5615, 5615, 460, 4825, 37, 40, 516, 62, 4834, 4820, 49, 4818, 4822, 58, 575, 590, 125, 223, 613, 33, 45, 4788, 38, 4785, 121, 4839, 4846, 434, 4804, 4816, 136, 0, 5615, 4840, 5615, 0, 615, 674, 152, 0, 4782, 5615, 104, 5615, 112, 5615, 161, 4781, 73, 173, 5615, 189, 204, 651, 705, 749, 256, 245, 807, 857, 4789, 57, 157, 913, 4783, 4793, 4779, 4772, 4737, 960, 0, 128, 4713, 645, 4761, 4756, 4756, 5615, 266, 541, 614, 4737, 617, 718, 4692, 843, 947, 4690, 984, 997, 1035, 4716, 4727, 572, 719, 276, 4714, 96, 1080, 1125, 4699, 4704, 4690, 4683, 4686, 4682, 406, 4673, 4680, 4677, 4652, 4656, 4623, 391, 5615, 133, 171, 992, 4596, 4599, 4590, 4584, 4585, 397, 349, 385, 395, 383, 339, 154, 4647, 731, 4643, 1034, 4587, 1160, 547, 0, 4633, 256, 5615, 5615, 941, 267, 0, 4581, 654, 5615, 5615, 4580, 672, 4572, 4619, 401, 595, 296, 4617, 663, 676, 1187, 4563, 1193, 0, 1222, 1250, 1021, 1055, 1289, 4599, 1100, 1219, 840, 1339, 1395, 4572, 0, 4575, 4568, 4571, 4567, 963, 4550, 4548, 4535, 4529, 4581, 4580, 1249, 1264, 1442, 1274, 1065, 1482, 4561, 4548, 1527, 528, 1573, 1618, 1663, 4537, 4527, 4528, 4511, 4524, 4512, 4519, 4511, 4518, 4516, 4510, 4497, 4493, 4507, 4478, 4477, 4472, 1108, 384, 4438, 4443, 4433, 4435, 4441, 541, 586, 4444, 499, 342, 500, 1206, 633, 4410, 4397, 4396, 1710, 1720, 4395, 1765, 0, 4376, 4367, 4352, 4365, 4353, 4360, 4359, 4371, 4370, 4365, 4352, 4363, 447, 4329, 4392, 1810, 214, 0, 0, 1108, 529, 4368, 4367, 1848, 411, 4366, 4365, 702, 1309, 1861, 1415, 1157, 1907, 1954, 4364, 620, 4346, 4341, 641, 681, 4353, 4346, 4338, 4335, 4326, 4324, 4320, 4323, 0, 4326, 4324, 0, 832, 975, 668, 942, 4308, 4310, 4294, 4308, 4294, 564, 532, 1081, 419, 949, 1452, 4347, 4346, 4345, 1321, 1964, 2009, 776, 4315, 665, 820, 4323, 4316, 4318, 4315, 4306, 4303, 4299, 4294, 1013, 4311, 4317, 4274, 2056, 2068, 2080, 4306, 4305, 2090, 4305, 4272, 4195, 4183, 828, 1462, 1183, 1502, 1187, 2103, 0, 1549, 2150, 1593, 1425, 2196, 2243, 884, 5615, 4147, 4141, 4121, 4103, 965, 5615, 4107, 4087, 4061, 4063, 4033, 4033, 4020, 0, 4003, 4003, 635, 709, 704, 988, 896, 3980, 3962, 3963, 1150, 996, 982, 1152, 4017, 4006, 2255, 2265, 3981, 3945, 3941, 3923, 3904, 3888, 3867, 3863, 3856, 3867, 3867, 3834, 3856, 3836, 3837, 3838, 3786, 2310, 610, 2350, 2362, 1605, 3805, 3802, 3784, 3777, 2372, 1164, 3777, 3774, 2419, 1178, 1631, 1640, 1683, 1645, 2431, 0, 1742, 2478, 1785, 1472, 2524, 2571, 2596, 1509, 1274, 1062, 1227, 1529, 1810, 1341, 1506, 1723, 1366, 1421, 1665, 3728, 3720, 3688, 3664, 648, 3679, 3644, 947, 1192, 592, 781, 1821, 3669, 3649, 3624, 1560, 1422, 3581, 3565, 1507, 3557, 1173, 1508, 3541, 3548, 1666, 1688, 0, 0, 0, 0, 3519, 2653, 1881, 1753, 3534, 3514, 3490, 1927, 2693, 1984, 1797, 2738, 2785, 2029, 3501, 3486, 3477, 1838, 1646, 1834, 1836, 1943, 2123, 2045, 2797, 0, 2172, 2844, 2216, 1891, 2890, 2937, 1765, 5615, 2962, 1214, 992, 1887, 5615, 994, 1125, 2156, 1888, 5615, 1631, 2209, 1933, 5615, 1934, 5615, 3382, 1101, 3343, 3303, 1216, 2238, 708, 1283, 3357, 3334, 3019, 3297, 3291, 3034, 3238, 3207, 1714, 786, 3184, 3090, 1208, 3129, 0, 1931, 3210, 3158, 2286, 2069, 2320, 2332, 3169, 0, 2333, 3182, 2392, 1994, 3227, 3274, 3166, 3160, 3286, 2408, 2443, 2445, 2453, 3124, 2458, 3298, 0, 2500, 3345, 2544, 2133, 3392, 3417, 893, 1253, 2129, 1621, 1014, 2130, 2175, 3079, 2999, 2978, 1598, 1262, 2547, 2993, 2663, 2952, 2951, 2902, 2297, 2869, 2825, 3487, 2828, 2797, 1990, 1991, 0, 3545, 2673, 2713, 1512, 2766, 2774, 2770, 3585, 2739, 2334, 2351, 2758, 2456, 3597, 0, 2819, 3610, 2864, 2511, 3655, 3702, 2910, 2726, 2686, 2610, 2725, 2459, 2774, 2926, 1337, 1648, 3714, 0, 2876, 1448, 2197, 1524, 2035, 5615, 1661, 1667, 2036, 5615, 2223, 5615, 2553, 2396, 1790, 2358, 2453, 2845, 3114, 2587, 2538, 3726, 2685, 2268, 2576, 2551, 2479, 3736, 1075, 3776, 0, 2033, 2143, 3105, 2466, 2412, 2406, 3117, 2373, 2331, 2560, 2694, 3139, 2820, 3816, 0, 3152, 3829, 3202, 3212, 3874, 3921, 2304, 2235, 3932, 3150, 2228, 1976, 2014, 2481, 5615, 2822, 1666, 1987, 1949, 1958, 2200, 5615, 2127, 1881, 3272, 3332, 3337, 3342, 1902, 2962, 1835, 3417, 3247, 1847, 1833, 1805, 3476, 1797, 2764, 2917, 3208, 3944, 3956, 3968, 1780, 1752, 3980, 1722, 1691, 3034, 3183, 3555, 3275, 3992, 0, 3567, 4005, 3630, 3640, 4052, 1632, 1612, 1605, 3676, 1587, 2765, 5615, 2916, 2195, 5615, 2290, 3682, 3746, 1522, 1443, 4064, 2942, 3324, 4076, 2348, 4088, 4100, 3758, 3796, 1435, 1408, 1302, 3766, 1199, 1191, 3326, 1156, 1094, 4112, 0, 2453, 3061, 5615, 3325, 2353, 3849, 1031, 973, 927, 3788, 3115, 4124, 4136, 4148, 3894, 4025, 4158, 777, 0, 556, 3209, 5615, 542, 2416, 5615, 455, 382, 4170, 4182, 2733, 4194, 4206, 3906, 5615, 4216, 4226, 3806, 5615, 4236, 286, 194, 187, 3861, 4246, 4284, 4322, 4256, 4266, 4294, 53, 4360, 4038, 5615, 4304, 4276, 5615, 4413, 4434, 4455, 4476, 4497, 4518, 4539, 4560, 4581, 4590, 2187, 4610, 4631, 2551, 4652, 4673, 4694, 4715, 4736, 4757, 4778, 4799, 2235, 4820, 4829, 4837, 4846, 4866, 4887, 4908, 2822, 4929, 4950, 4971, 4992, 5013, 5022, 5041, 5050, 5059, 2774, 2925, 5067, 5075, 5083, 5092, 5100, 5107, 5115, 5123, 5132, 5142, 2926, 3129, 5150, 5158, 5166, 3164, 3168, 5175, 5185, 5205, 3262, 5214, 5222, 3268, 5231, 5241, 5261, 2512, 2592, 5270, 5282, 5291, 5301, 3370, 3371, 5310, 5320, 5329, 5349, 2692, 5358, 5370, 3375, 3376, 5379, 5389, 3380, 5398, 5408, 5428, 5449, 5470, 3381, 3385, 5490, 3386, 5497, 5507, 2709, 2813, 5516, 3579, 5536, 3488, 3583, 5545, 5555, 3584, 3626, 5563, 5573, 5593, 4335, 3651, 3671 } ; static yyconst short int yy_def[985] = { 0, 867, 1, 1, 1, 868, 868, 869, 869, 870, 870, 871, 871, 867, 13, 867, 872, 867, 867, 867, 867, 873, 874, 867, 867, 875, 867, 876, 872, 28, 28, 877, 867, 867, 867, 34, 34, 34, 34, 38, 38, 38, 38, 38, 38, 38, 872, 28, 872, 867, 873, 34, 34, 38, 38, 38, 867, 878, 867, 879, 38, 38, 872, 880, 867, 880, 867, 880, 867, 873, 867, 881, 882, 867, 882, 867, 882, 867, 883, 884, 884, 884, 867, 867, 885, 886, 887, 867, 87, 87, 87, 867, 91, 91, 91, 91, 95, 95, 95, 95, 95, 87, 90, 90, 872, 872, 867, 867, 888, 867, 889, 867, 874, 890, 885, 874, 875, 875, 876, 891, 872, 872, 28, 892, 122, 122, 122, 122, 893, 894, 38, 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 872, 867, 872, 872, 867, 867, 867, 867, 867, 867, 888, 872, 122, 872, 872, 872, 867, 867, 867, 867, 895, 896, 872, 872, 897, 897, 867, 867, 867, 889, 867, 898, 899, 899, 867, 867, 899, 899, 900, 867, 900, 900, 867, 867, 885, 885, 885, 901, 902, 90, 901, 903, 867, 867, 87, 199, 199, 199, 199, 867, 204, 205, 904, 205, 205, 205, 205, 205, 205, 205, 90, 90, 888, 905, 867, 867, 872, 221, 221, 122, 224, 906, 867, 907, 867, 131, 230, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 872, 872, 867, 867, 867, 867, 867, 888, 872, 224, 872, 872, 872, 867, 872, 867, 908, 909, 867, 90, 268, 204, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 90, 90, 905, 872, 872, 221, 221, 221, 872, 910, 911, 911, 295, 912, 911, 913, 229, 867, 301, 301, 867, 301, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 872, 872, 872, 872, 867, 867, 867, 867, 867, 888, 872, 872, 872, 872, 867, 867, 908, 908, 867, 268, 204, 205, 205, 914, 205, 205, 205, 205, 205, 205, 205, 205, 205, 90, 90, 90, 90, 221, 221, 221, 867, 915, 915, 366, 915, 916, 917, 918, 867, 919, 304, 919, 867, 376, 919, 867, 379, 379, 867, 379, 867, 867, 231, 231, 231, 231, 867, 867, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 872, 872, 872, 872, 872, 867, 867, 867, 888, 872, 872, 872, 920, 921, 867, 90, 344, 205, 914, 914, 205, 205, 205, 205, 205, 205, 205, 205, 90, 90, 90, 90, 90, 872, 872, 221, 221, 872, 922, 922, 923, 924, 867, 867, 925, 926, 867, 927, 927, 928, 382, 928, 867, 454, 928, 867, 457, 457, 867, 457, 867, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 872, 872, 872, 872, 872, 867, 867, 929, 872, 872, 872, 867, 867, 930, 930, 867, 205, 914, 914, 205, 205, 914, 205, 205, 205, 205, 205, 90, 90, 90, 90, 90, 872, 507, 507, 867, 931, 932, 444, 867, 514, 514, 867, 514, 867, 867, 933, 933, 867, 867, 934, 934, 935, 460, 935, 867, 530, 935, 867, 533, 533, 867, 533, 867, 867, 867, 540, 540, 867, 867, 540, 540, 540, 867, 867, 540, 540, 867, 867, 867, 867, 540, 872, 867, 867, 936, 872, 872, 872, 937, 938, 867, 939, 939, 867, 939, 939, 569, 569, 940, 872, 872, 872, 577, 577, 867, 941, 867, 942, 517, 942, 942, 586, 942, 867, 589, 589, 867, 589, 943, 944, 867, 867, 945, 945, 946, 947, 946, 867, 603, 946, 867, 606, 606, 606, 867, 610, 610, 610, 610, 610, 610, 610, 872, 867, 867, 948, 872, 872, 872, 867, 867, 949, 949, 867, 950, 950, 867, 950, 950, 632, 632, 951, 872, 638, 638, 638, 867, 952, 953, 867, 954, 954, 955, 592, 955, 955, 651, 955, 867, 654, 654, 867, 654, 867, 867, 956, 956, 867, 867, 957, 957, 958, 958, 958, 669, 958, 610, 610, 610, 867, 867, 610, 610, 867, 867, 867, 867, 867, 867, 959, 948, 872, 960, 961, 962, 963, 867, 962, 964, 964, 964, 964, 872, 872, 872, 700, 700, 872, 867, 867, 965, 965, 867, 867, 966, 966, 967, 657, 967, 967, 715, 967, 867, 718, 718, 867, 718, 968, 969, 867, 867, 970, 970, 610, 867, 867, 610, 610, 610, 867, 959, 959, 867, 948, 872, 960, 960, 960, 960, 971, 960, 972, 972, 867, 867, 962, 962, 867, 867, 964, 964, 964, 700, 700, 700, 973, 974, 867, 867, 975, 975, 976, 721, 976, 976, 770, 976, 867, 773, 773, 773, 867, 968, 968, 867, 867, 867, 867, 610, 610, 867, 948, 867, 867, 977, 978, 867, 964, 964, 700, 872, 700, 700, 872, 867, 867, 973, 973, 867, 867, 979, 979, 980, 980, 980, 810, 810, 867, 867, 610, 981, 867, 867, 977, 977, 867, 964, 700, 700, 700, 867, 867, 867, 867, 982, 982, 867, 867, 981, 981, 867, 983, 984, 867, 700, 872, 700, 700, 872, 867, 867, 867, 867, 867, 867, 867, 983, 983, 867, 872, 872, 872, 867, 867, 867, 872, 872, 872, 867, 867, 867, 0, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867 } ; static yyconst short int yy_nxt[5687] = { 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 16, 25, 26, 16, 16, 27, 28, 29, 30, 28, 28, 28, 28, 28, 28, 28, 31, 32, 33, 16, 34, 35, 35, 35, 36, 37, 38, 38, 38, 38, 39, 40, 41, 38, 42, 43, 44, 45, 38, 38, 38, 38, 38, 46, 16, 47, 47, 47, 47, 47, 47, 16, 16, 16, 16, 16, 16, 16, 16, 48, 16, 16, 49, 131, 56, 185, 50, 131, 57, 139, 131, 141, 56, 134, 58, 131, 57, 59, 133, 17, 64, 65, 58, 66, 140, 59, 143, 205, 156, 66, 135, 113, 51, 52, 157, 136, 105, 53, 208, 159, 144, 227, 60, 66, 67, 54, 61, 38, 55, 38, 60, 114, 229, 161, 61, 38, 184, 38, 17, 64, 65, 179, 66, 162, 80, 18, 81, 82, 66, 180, 68, 62, 80, 18, 81, 82, 119, 119, 115, 62, 119, 119, 66, 67, 175, 146, 161, 178, 17, 18, 19, 73, 69, 182, 146, 178, 162, 74, 75, 76, 119, 126, 126, 126, 126, 126, 127, 186, 105, 68, 17, 18, 19, 77, 69, 83, 105, 147, 249, 105, 215, 187, 188, 83, 183, 120, 148, 205, 147, 216, 209, 850, 17, 18, 19, 73, 69, 168, 850, 78, 113, 74, 75, 76, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 105, 149, 184, 77, 287, 250, 190, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 17, 18, 19, 78, 69, 150, 151, 191, 175, 146, 152, 202, 202, 202, 202, 202, 203, 105, 153, 175, 146, 154, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 225, 225, 225, 225, 225, 225, 187, 188, 850, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 33, 17, 18, 19, 33, 33, 84, 23, 24, 33, 85, 26, 33, 33, 86, 87, 88, 89, 87, 87, 87, 87, 87, 87, 87, 31, 90, 33, 33, 91, 92, 92, 92, 93, 94, 95, 95, 95, 95, 96, 97, 98, 95, 99, 95, 100, 95, 95, 95, 95, 95, 95, 70, 33, 101, 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 102, 102, 103, 102, 102, 109, 105, 175, 146, 105, 850, 336, 261, 104, 109, 110, 105, 185, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 121, 257, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 368, 368, 368, 124, 124, 124, 124, 124, 124, 105, 105, 166, 166, 237, 238, 166, 166, 105, 258, 239, 240, 105, 260, 241, 327, 242, 105, 184, 124, 124, 124, 124, 124, 124, 104, 166, 256, 259, 357, 358, 104, 359, 850, 104, 104, 105, 104, 104, 104, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 123, 167, 334, 104, 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 105, 131, 124, 124, 124, 124, 124, 124, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 867, 227, 109, 836, 131, 131, 131, 131, 131, 131, 105, 105, 300, 123, 131, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 109, 334, 334, 582, 104, 104, 104, 104, 104, 104, 145, 146, 104, 104, 104, 105, 104, 104, 105, 411, 104, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 333, 186, 105, 104, 104, 104, 104, 263, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 109, 171, 146, 172, 867, 173, 384, 113, 435, 172, 110, 173, 410, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 105, 867, 173, 173, 867, 334, 105, 385, 104, 184, 104, 104, 104, 192, 104, 104, 475, 177, 104, 192, 177, 177, 192, 562, 105, 192, 192, 177, 115, 173, 867, 191, 104, 104, 104, 175, 146, 155, 109, 194, 388, 192, 177, 113, 390, 389, 405, 105, 174, 105, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 337, 105, 867, 420, 195, 192, 119, 391, 421, 119, 119, 557, 119, 119, 119, 119, 191, 227, 119, 119, 112, 105, 112, 112, 477, 178, 112, 112, 300, 191, 112, 476, 194, 119, 119, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 112, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 105, 197, 119, 194, 105, 105, 198, 194, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 123, 194, 623, 384, 200, 200, 200, 200, 200, 200, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 385, 768, 200, 200, 200, 200, 200, 200, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 867, 390, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 867, 105, 636, 205, 194, 194, 194, 194, 194, 194, 227, 563, 116, 391, 116, 116, 116, 402, 116, 116, 403, 300, 116, 269, 269, 269, 269, 269, 269, 194, 194, 194, 194, 194, 194, 194, 116, 116, 116, 194, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 123, 194, 105, 384, 204, 204, 204, 204, 204, 204, 205, 205, 205, 205, 206, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 385, 207, 200, 200, 200, 200, 200, 200, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 867, 673, 817, 131, 205, 205, 205, 205, 205, 205, 105, 109, 119, 119, 205, 479, 119, 119, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 390, 194, 194, 194, 194, 194, 194, 867, 119, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 118, 817, 104, 104, 118, 391, 104, 104, 149, 105, 118, 276, 277, 404, 120, 406, 105, 278, 279, 560, 478, 280, 413, 281, 118, 118, 104, 221, 222, 223, 221, 221, 221, 221, 221, 221, 221, 119, 150, 151, 483, 119, 105, 152, 131, 430, 131, 119, 431, 105, 612, 153, 166, 166, 154, 105, 166, 166, 613, 817, 484, 119, 119, 105, 105, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 678, 166, 131, 867, 224, 224, 224, 224, 224, 224, 265, 266, 267, 265, 265, 265, 265, 265, 265, 265, 290, 290, 290, 290, 290, 291, 167, 867, 698, 224, 224, 224, 224, 224, 224, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 123, 123, 867, 542, 230, 230, 230, 230, 230, 230, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 324, 325, 105, 326, 104, 104, 104, 104, 105, 224, 224, 224, 224, 224, 224, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 867, 412, 109, 105, 131, 131, 131, 131, 131, 131, 105, 165, 131, 104, 104, 165, 614, 104, 104, 582, 618, 165, 377, 377, 377, 377, 377, 378, 227, 104, 104, 104, 104, 104, 104, 165, 165, 104, 189, 300, 189, 189, 227, 192, 189, 189, 372, 227, 189, 192, 867, 227, 192, 374, 105, 192, 192, 166, 374, 485, 570, 166, 374, 189, 189, 571, 768, 166, 109, 194, 482, 192, 575, 192, 713, 192, 192, 192, 543, 192, 192, 166, 166, 192, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 105, 195, 192, 192, 192, 192, 119, 131, 544, 119, 119, 561, 119, 119, 119, 119, 105, 611, 119, 119, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 621, 867, 194, 119, 119, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 867, 674, 131, 197, 119, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 105, 800, 687, 541, 268, 268, 268, 268, 268, 268, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 338, 105, 339, 339, 339, 339, 339, 339, 548, 268, 268, 268, 268, 268, 268, 194, 372, 227, 624, 194, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 123, 194, 549, 552, 270, 270, 270, 270, 270, 270, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 553, 207, 268, 268, 268, 268, 268, 268, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 867, 800, 554, 538, 205, 205, 205, 205, 205, 205, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 455, 455, 455, 455, 455, 456, 555, 539, 800, 194, 194, 194, 194, 194, 194, 287, 817, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 414, 415, 416, 414, 414, 414, 414, 414, 414, 414, 446, 447, 448, 446, 446, 446, 446, 446, 446, 446, 531, 531, 531, 531, 531, 532, 729, 105, 104, 131, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 867, 543, 548, 867, 292, 292, 292, 292, 292, 292, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 703, 703, 703, 867, 867, 544, 549, 867, 817, 292, 292, 292, 292, 292, 292, 294, 295, 296, 296, 296, 296, 296, 296, 296, 296, 297, 540, 867, 550, 298, 298, 298, 298, 298, 298, 372, 227, 450, 450, 450, 450, 450, 450, 732, 545, 131, 486, 374, 487, 487, 487, 487, 487, 487, 298, 298, 298, 298, 298, 298, 227, 301, 302, 303, 301, 301, 301, 301, 301, 301, 301, 304, 685, 109, 227, 305, 305, 305, 305, 305, 305, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 435, 227, 436, 436, 436, 436, 436, 436, 227, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 123, 372, 227, 227, 306, 306, 306, 306, 306, 306, 372, 227, 686, 374, 105, 867, 227, 227, 867, 227, 616, 677, 452, 867, 552, 131, 131, 452, 374, 292, 292, 292, 292, 292, 292, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 867, 554, 867, 553, 131, 131, 131, 131, 131, 131, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 733, 131, 734, 556, 784, 555, 131, 131, 713, 104, 104, 104, 104, 104, 104, 338, 867, 341, 341, 341, 341, 341, 342, 339, 339, 339, 339, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 123, 635, 649, 867, 343, 343, 343, 343, 343, 343, 372, 227, 526, 526, 526, 526, 526, 526, 205, 551, 800, 538, 452, 578, 578, 578, 578, 578, 579, 343, 343, 343, 343, 343, 343, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 539, 737, 738, 800, 344, 344, 344, 344, 344, 344, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 749, 867, 587, 587, 587, 587, 587, 588, 749, 343, 343, 343, 343, 343, 343, 361, 362, 363, 361, 361, 361, 361, 361, 361, 361, 867, 564, 565, 566, 564, 564, 564, 564, 564, 564, 564, 749, 546, 227, 372, 227, 519, 547, 520, 520, 520, 520, 520, 520, 452, 749, 452, 105, 366, 366, 367, 368, 368, 368, 368, 368, 368, 368, 297, 372, 227, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 374, 748, 543, 548, 375, 375, 375, 375, 375, 375, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 604, 604, 604, 604, 604, 605, 544, 549, 788, 375, 375, 375, 375, 375, 375, 227, 379, 380, 381, 379, 379, 379, 379, 379, 379, 379, 382, 105, 552, 554, 383, 383, 383, 383, 383, 383, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 104, 104, 104, 104, 372, 227, 553, 555, 738, 383, 383, 383, 383, 383, 383, 867, 528, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 372, 227, 679, 681, 417, 417, 417, 417, 417, 417, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 652, 652, 652, 652, 652, 653, 680, 682, 786, 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 785, 131, 675, 679, 418, 418, 418, 418, 418, 418, 594, 595, 596, 594, 594, 594, 594, 594, 594, 594, 104, 104, 104, 104, 867, 227, 676, 680, 131, 417, 417, 417, 417, 417, 417, 435, 528, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 435, 582, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 435, 584, 438, 438, 438, 438, 438, 439, 436, 436, 436, 436, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 297, 372, 227, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 374, 109, 675, 679, 449, 449, 449, 449, 449, 449, 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, 670, 670, 670, 670, 670, 671, 676, 680, 698, 449, 449, 449, 449, 449, 449, 372, 227, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 452, 681, 131, 131, 453, 453, 453, 453, 453, 453, 372, 227, 599, 599, 599, 599, 599, 599, 131, 787, 105, 111, 528, 730, 111, 682, 737, 738, 615, 453, 453, 453, 453, 453, 453, 227, 457, 458, 459, 457, 457, 457, 457, 457, 457, 457, 460, 731, 131, 681, 461, 461, 461, 461, 461, 461, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 815, 227, 131, 220, 131, 131, 220, 682, 227, 461, 461, 461, 461, 461, 461, 867, 617, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 486, 730, 489, 489, 489, 489, 489, 490, 487, 487, 487, 487, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 105, 816, 109, 731, 417, 417, 417, 417, 417, 417, 622, 643, 644, 645, 643, 643, 643, 643, 643, 643, 643, 625, 626, 626, 626, 626, 626, 626, 227, 417, 417, 417, 417, 417, 417, 507, 508, 509, 507, 507, 507, 507, 507, 507, 507, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 867, 582, 582, 647, 647, 647, 647, 647, 647, 835, 836, 649, 584, 584, 584, 109, 795, 105, 435, 582, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 435, 649, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 514, 515, 516, 514, 514, 514, 514, 514, 514, 514, 517, 584, 688, 105, 518, 518, 518, 518, 518, 518, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 835, 836, 704, 739, 688, 227, 688, 688, 704, 518, 518, 518, 518, 518, 518, 519, 452, 522, 522, 522, 522, 522, 523, 520, 520, 520, 520, 372, 227, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 452, 227, 372, 227, 525, 525, 525, 525, 525, 525, 372, 227, 528, 867, 528, 867, 227, 227, 830, 830, 830, 830, 601, 704, 867, 649, 730, 601, 528, 525, 525, 525, 525, 525, 525, 372, 227, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 528, 867, 105, 731, 529, 529, 529, 529, 529, 529, 372, 227, 666, 666, 666, 666, 666, 666, 740, 757, 626, 626, 601, 716, 716, 716, 716, 716, 717, 529, 529, 529, 529, 529, 529, 227, 533, 534, 535, 533, 533, 533, 533, 533, 533, 533, 536, 688, 749, 867, 537, 537, 537, 537, 537, 537, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 176, 176, 176, 688, 582, 688, 689, 867, 867, 537, 537, 537, 537, 537, 537, 867, 649, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 104, 538, 756, 105, 749, 867, 104, 627, 627, 104, 104, 735, 104, 104, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 539, 755, 659, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 105, 131, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 575, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 690, 691, 692, 693, 690, 690, 690, 690, 690, 690, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 749, 659, 754, 754, 754, 626, 626, 105, 582, 582, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 584, 713, 777, 777, 585, 585, 585, 585, 585, 585, 701, 701, 701, 701, 701, 702, 703, 703, 703, 703, 659, 659, 660, 660, 660, 660, 660, 660, 840, 585, 585, 585, 585, 585, 585, 589, 590, 591, 589, 589, 589, 589, 589, 589, 589, 592, 584, 782, 782, 593, 593, 593, 593, 593, 593, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 704, 339, 105, 339, 704, 227, 783, 783, 513, 593, 593, 593, 593, 593, 593, 867, 601, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 372, 227, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 528, 782, 778, 778, 598, 598, 598, 598, 598, 598, 582, 867, 711, 711, 711, 711, 711, 711, 176, 176, 176, 697, 649, 713, 742, 783, 743, 744, 745, 598, 598, 598, 598, 598, 598, 372, 227, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 601, 131, 696, 695, 602, 602, 602, 602, 602, 602, 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, 372, 227, 728, 728, 728, 728, 728, 728, 746, 602, 602, 602, 602, 602, 602, 227, 606, 607, 608, 606, 606, 606, 606, 606, 606, 606, 694, 625, 813, 867, 609, 609, 609, 609, 609, 609, 723, 724, 725, 723, 723, 723, 723, 723, 723, 723, 340, 487, 340, 487, 372, 227, 814, 867, 813, 609, 609, 609, 609, 609, 609, 867, 601, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 104, 793, 131, 625, 625, 814, 104, 741, 741, 104, 104, 741, 104, 104, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 741, 741, 741, 104, 131, 131, 131, 131, 131, 131, 131, 131, 610, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 105, 131, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 625, 628, 628, 628, 628, 628, 629, 626, 626, 626, 626, 194, 105, 684, 582, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 713, 194, 683, 813, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 632, 205, 205, 814, 207, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 638, 639, 640, 641, 638, 638, 638, 638, 638, 638, 742, 832, 743, 744, 745, 761, 762, 763, 761, 761, 761, 761, 761, 761, 761, 704, 105, 705, 705, 705, 705, 705, 705, 227, 488, 833, 488, 105, 575, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 227, 582, 748, 766, 766, 766, 766, 766, 766, 659, 520, 601, 520, 713, 521, 659, 521, 105, 582, 513, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 584, 582, 582, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 649, 768, 867, 832, 650, 650, 650, 650, 650, 650, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 771, 771, 771, 771, 771, 772, 867, 833, 370, 650, 650, 650, 650, 650, 650, 654, 655, 656, 654, 654, 654, 654, 654, 654, 654, 657, 637, 634, 794, 658, 658, 658, 658, 658, 658, 790, 791, 792, 790, 790, 790, 790, 790, 790, 790, 487, 867, 487, 867, 867, 867, 520, 633, 520, 658, 658, 658, 658, 658, 658, 867, 867, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 659, 768, 662, 662, 662, 662, 662, 663, 660, 660, 660, 660, 372, 227, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 601, 746, 867, 832, 665, 665, 665, 665, 665, 665, 742, 631, 743, 744, 745, 867, 582, 743, 744, 745, 867, 630, 867, 867, 745, 625, 867, 833, 768, 665, 665, 665, 665, 665, 665, 372, 227, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 822, 625, 620, 131, 668, 668, 668, 668, 668, 668, 660, 661, 660, 661, 746, 705, 706, 705, 706, 746, 660, 750, 660, 750, 746, 751, 705, 751, 705, 668, 668, 668, 668, 668, 668, 867, 619, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 104, 747, 131, 747, 747, 747, 104, 747, 747, 104, 104, 747, 104, 104, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 747, 747, 747, 104, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 672, 131, 131, 131, 105, 131, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 675, 749, 519, 750, 750, 750, 750, 750, 750, 194, 801, 519, 801, 194, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 676, 194, 519, 513, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 370, 207, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 698, 297, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 582, 574, 807, 807, 807, 807, 807, 807, 789, 573, 572, 789, 768, 802, 818, 802, 818, 105, 704, 569, 707, 707, 707, 707, 707, 708, 705, 705, 705, 705, 582, 568, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 649, 582, 567, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 713, 819, 486, 819, 714, 714, 714, 714, 714, 714, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 811, 811, 811, 811, 811, 812, 851, 486, 851, 714, 714, 714, 714, 714, 714, 718, 719, 720, 718, 718, 718, 718, 718, 718, 718, 721, 852, 486, 852, 722, 722, 722, 722, 722, 722, 227, 777, 777, 777, 777, 777, 777, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 559, 558, 722, 722, 722, 722, 722, 722, 867, 105, 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, 372, 227, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 749, 105, 752, 752, 752, 752, 752, 753, 754, 754, 754, 754, 758, 759, 760, 758, 758, 758, 758, 758, 758, 758, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 795, 105, 796, 796, 796, 796, 796, 796, 800, 105, 801, 801, 801, 801, 801, 801, 519, 105, 698, 519, 699, 699, 699, 699, 699, 699, 699, 699, 699, 699, 817, 513, 818, 818, 818, 818, 818, 818, 370, 105, 826, 827, 828, 826, 826, 826, 826, 826, 826, 826, 845, 845, 845, 845, 845, 845, 297, 105, 582, 297, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 713, 582, 506, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 768, 505, 504, 503, 769, 769, 769, 769, 769, 769, 837, 838, 839, 837, 837, 837, 837, 837, 837, 837, 850, 502, 851, 851, 851, 851, 851, 851, 501, 769, 769, 769, 769, 769, 769, 773, 774, 775, 773, 773, 773, 773, 773, 773, 773, 500, 499, 498, 497, 776, 776, 776, 776, 776, 776, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 840, 496, 841, 841, 841, 841, 841, 841, 495, 776, 776, 776, 776, 776, 776, 867, 494, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 227, 779, 779, 779, 779, 779, 780, 777, 777, 777, 777, 795, 105, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 795, 493, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 795, 492, 798, 798, 798, 798, 798, 799, 796, 796, 796, 796, 800, 491, 803, 803, 803, 803, 803, 804, 801, 801, 801, 801, 582, 867, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 768, 582, 486, 808, 808, 808, 808, 808, 808, 808, 808, 808, 808, 486, 407, 481, 480, 809, 809, 809, 809, 809, 809, 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, 474, 473, 472, 861, 861, 861, 861, 861, 861, 809, 809, 809, 809, 809, 809, 867, 471, 809, 809, 809, 809, 809, 809, 809, 809, 809, 809, 817, 470, 820, 820, 820, 820, 820, 821, 818, 818, 818, 818, 104, 105, 823, 824, 825, 823, 823, 823, 823, 823, 823, 823, 795, 469, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 795, 468, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 582, 467, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 840, 466, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 840, 465, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 840, 464, 843, 843, 843, 843, 843, 844, 841, 841, 841, 841, 847, 847, 847, 847, 847, 848, 845, 845, 845, 845, 850, 463, 853, 853, 853, 853, 853, 854, 851, 851, 851, 851, 104, 462, 855, 856, 857, 855, 855, 855, 855, 855, 855, 855, 840, 444, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 840, 370, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 845, 858, 859, 860, 858, 858, 858, 858, 858, 858, 858, 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 864, 864, 864, 864, 864, 864, 297, 105, 855, 855, 855, 855, 855, 855, 855, 855, 855, 855, 865, 865, 865, 865, 865, 866, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 440, 297, 129, 434, 433, 432, 429, 105, 862, 862, 862, 862, 862, 863, 861, 861, 861, 861, 849, 428, 427, 849, 426, 425, 424, 849, 423, 422, 419, 338, 338, 338, 407, 409, 407, 408, 407, 401, 400, 399, 398, 397, 396, 395, 394, 105, 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, 393, 392, 387, 386, 123, 297, 370, 297, 129, 109, 360, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 198, 338, 338, 264, 105, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 104, 335, 332, 331, 330, 329, 328, 104, 323, 104, 104, 104, 104, 322, 321, 104, 104, 104, 104, 104, 104, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 112, 320, 319, 318, 317, 112, 316, 112, 315, 112, 112, 112, 112, 112, 314, 112, 112, 112, 112, 112, 112, 116, 313, 312, 311, 310, 309, 308, 116, 307, 116, 116, 116, 116, 129, 121, 116, 116, 116, 116, 116, 116, 118, 109, 109, 118, 118, 285, 118, 118, 284, 118, 118, 118, 118, 283, 282, 118, 118, 118, 118, 118, 118, 128, 128, 275, 128, 274, 273, 272, 128, 165, 271, 867, 165, 165, 195, 165, 165, 264, 165, 165, 165, 165, 183, 184, 165, 165, 165, 165, 165, 165, 169, 178, 178, 169, 169, 170, 169, 169, 262, 169, 169, 169, 169, 164, 169, 169, 169, 164, 169, 169, 169, 177, 255, 254, 177, 253, 252, 177, 177, 251, 177, 177, 177, 177, 177, 248, 177, 177, 177, 177, 177, 177, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 183, 183, 247, 183, 246, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 189, 245, 244, 243, 236, 189, 235, 189, 234, 189, 189, 189, 189, 189, 233, 189, 189, 189, 189, 189, 189, 193, 232, 231, 129, 104, 129, 197, 193, 117, 193, 193, 193, 193, 219, 193, 193, 193, 193, 193, 193, 193, 196, 109, 107, 196, 196, 106, 196, 196, 105, 196, 196, 196, 196, 214, 196, 196, 196, 196, 196, 196, 196, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 218, 218, 213, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 119, 212, 211, 119, 119, 210, 119, 119, 205, 119, 119, 119, 119, 184, 178, 119, 119, 119, 119, 119, 119, 128, 128, 170, 128, 139, 136, 164, 128, 226, 226, 163, 226, 160, 158, 142, 226, 228, 228, 228, 141, 228, 138, 137, 131, 228, 165, 129, 117, 165, 165, 107, 165, 165, 106, 165, 165, 165, 165, 105, 867, 165, 165, 165, 165, 165, 165, 166, 867, 867, 166, 166, 867, 166, 166, 867, 166, 166, 166, 166, 867, 867, 166, 166, 166, 166, 166, 166, 169, 867, 867, 169, 169, 867, 169, 169, 867, 169, 169, 169, 169, 867, 169, 169, 169, 867, 169, 169, 169, 177, 867, 867, 177, 867, 867, 177, 177, 867, 177, 177, 177, 177, 177, 867, 177, 177, 177, 177, 177, 177, 183, 183, 867, 183, 867, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 192, 867, 867, 867, 867, 867, 867, 192, 867, 192, 192, 192, 192, 867, 867, 192, 192, 192, 192, 192, 192, 193, 867, 867, 867, 867, 867, 867, 193, 867, 193, 193, 193, 193, 867, 193, 193, 193, 193, 193, 193, 193, 196, 867, 867, 196, 196, 867, 196, 196, 867, 196, 196, 196, 196, 867, 196, 196, 196, 196, 196, 196, 196, 207, 867, 867, 207, 207, 867, 207, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 293, 293, 867, 293, 867, 867, 867, 293, 299, 299, 299, 867, 299, 867, 867, 867, 299, 364, 364, 867, 364, 867, 867, 867, 364, 365, 365, 867, 365, 867, 867, 867, 365, 369, 369, 867, 369, 867, 867, 867, 369, 371, 371, 371, 867, 371, 867, 867, 867, 371, 207, 867, 867, 207, 207, 867, 207, 440, 440, 867, 440, 867, 867, 867, 440, 442, 442, 867, 442, 867, 867, 867, 442, 443, 443, 867, 443, 867, 867, 867, 443, 445, 445, 445, 867, 445, 867, 867, 867, 445, 449, 449, 449, 449, 867, 449, 867, 867, 867, 449, 510, 510, 867, 510, 867, 867, 867, 510, 511, 511, 867, 511, 867, 867, 867, 511, 512, 512, 867, 512, 867, 867, 867, 512, 524, 524, 524, 867, 524, 867, 867, 867, 524, 525, 525, 525, 525, 867, 525, 867, 867, 867, 525, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 580, 580, 867, 580, 867, 867, 867, 580, 581, 581, 867, 581, 867, 867, 867, 581, 597, 597, 597, 867, 597, 867, 867, 867, 597, 598, 598, 598, 598, 867, 598, 867, 867, 867, 598, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 207, 867, 867, 207, 207, 867, 207, 194, 867, 867, 867, 194, 194, 867, 194, 194, 194, 867, 867, 194, 194, 642, 642, 867, 642, 867, 867, 867, 642, 646, 867, 646, 646, 867, 646, 867, 867, 867, 646, 664, 664, 664, 867, 664, 867, 867, 867, 664, 665, 665, 665, 665, 867, 665, 867, 867, 867, 665, 609, 609, 867, 867, 609, 867, 867, 867, 609, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 207, 867, 867, 207, 207, 867, 207, 194, 867, 867, 867, 194, 194, 867, 194, 194, 194, 867, 867, 194, 194, 709, 709, 867, 709, 867, 867, 867, 709, 710, 867, 710, 710, 867, 710, 867, 867, 867, 710, 726, 726, 726, 867, 726, 867, 867, 867, 726, 727, 727, 727, 867, 867, 727, 867, 867, 867, 727, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 741, 741, 867, 741, 741, 741, 867, 741, 867, 741, 741, 741, 741, 867, 867, 741, 741, 741, 741, 741, 741, 747, 747, 867, 747, 747, 747, 867, 747, 867, 747, 747, 747, 747, 867, 867, 747, 747, 747, 747, 747, 747, 207, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 207, 207, 867, 207, 207, 867, 207, 764, 764, 867, 764, 867, 867, 867, 764, 765, 867, 765, 765, 867, 765, 867, 867, 867, 765, 781, 781, 867, 867, 781, 867, 867, 867, 781, 747, 867, 867, 867, 867, 867, 867, 747, 867, 747, 747, 747, 747, 867, 867, 747, 747, 747, 747, 747, 747, 805, 805, 867, 805, 867, 867, 867, 805, 806, 867, 806, 806, 867, 806, 867, 867, 867, 806, 829, 829, 867, 829, 867, 867, 867, 829, 830, 867, 830, 867, 867, 830, 867, 867, 867, 830, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 834, 15, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867 } ; static yyconst short int yy_chk[5687] = { 0, 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, 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, 1, 1, 1, 2, 51, 3, 80, 2, 36, 3, 42, 37, 54, 4, 37, 3, 52, 4, 3, 36, 5, 5, 5, 4, 5, 42, 4, 45, 93, 51, 5, 39, 22, 2, 2, 52, 39, 861, 2, 93, 54, 45, 129, 3, 5, 5, 2, 3, 3, 2, 3, 4, 22, 129, 56, 4, 4, 80, 4, 6, 6, 6, 74, 6, 56, 11, 11, 11, 11, 6, 76, 5, 3, 12, 12, 12, 12, 27, 27, 22, 4, 27, 27, 6, 6, 70, 70, 161, 74, 9, 9, 9, 9, 9, 78, 78, 76, 161, 9, 9, 9, 27, 30, 30, 30, 30, 30, 30, 81, 48, 6, 7, 7, 7, 9, 7, 11, 147, 48, 147, 62, 103, 83, 83, 12, 83, 27, 48, 94, 62, 103, 94, 853, 10, 10, 10, 10, 10, 62, 852, 9, 84, 10, 10, 10, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 148, 49, 81, 10, 288, 148, 84, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 10, 8, 49, 49, 84, 171, 171, 49, 89, 89, 89, 89, 89, 89, 288, 49, 175, 175, 49, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 127, 127, 127, 127, 127, 127, 187, 187, 851, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 160, 145, 145, 260, 838, 260, 160, 157, 155, 21, 156, 185, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 156, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 296, 296, 296, 28, 28, 28, 28, 28, 28, 159, 250, 59, 59, 138, 138, 59, 59, 145, 157, 138, 138, 158, 159, 138, 250, 138, 28, 185, 28, 28, 28, 28, 28, 28, 34, 59, 155, 158, 284, 284, 34, 284, 837, 34, 34, 336, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 59, 336, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 228, 256, 834, 38, 38, 38, 38, 38, 38, 259, 261, 228, 292, 38, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 333, 261, 259, 831, 38, 38, 38, 38, 38, 38, 46, 46, 46, 46, 46, 292, 46, 46, 334, 334, 46, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 256, 186, 168, 46, 46, 46, 47, 168, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 50, 68, 68, 68, 112, 68, 307, 114, 436, 68, 50, 68, 333, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 257, 112, 68, 68, 114, 257, 484, 307, 105, 186, 105, 105, 105, 85, 105, 105, 402, 178, 105, 85, 178, 178, 85, 484, 436, 85, 85, 178, 112, 68, 189, 114, 105, 105, 105, 182, 182, 50, 69, 85, 310, 85, 178, 190, 311, 310, 326, 263, 69, 402, 189, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 263, 479, 190, 347, 85, 85, 86, 311, 347, 86, 86, 479, 86, 86, 86, 86, 189, 299, 86, 86, 115, 326, 115, 115, 404, 182, 115, 115, 299, 190, 115, 403, 86, 86, 86, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 115, 115, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 404, 86, 86, 87, 562, 403, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 562, 345, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 345, 829, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 90, 348, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 485, 573, 573, 90, 90, 90, 90, 90, 90, 371, 485, 117, 348, 117, 117, 117, 324, 117, 117, 324, 371, 117, 203, 203, 203, 203, 203, 203, 90, 90, 90, 90, 90, 90, 91, 117, 117, 117, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 324, 384, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 384, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 611, 820, 611, 95, 95, 95, 95, 95, 95, 406, 482, 118, 118, 95, 406, 118, 118, 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, 390, 95, 95, 95, 95, 95, 95, 101, 118, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 120, 819, 120, 120, 120, 390, 120, 120, 149, 327, 120, 212, 212, 325, 118, 327, 337, 212, 212, 482, 405, 212, 337, 212, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 197, 149, 149, 411, 197, 325, 149, 542, 357, 545, 197, 357, 412, 542, 149, 165, 165, 149, 405, 165, 165, 545, 818, 412, 197, 197, 411, 121, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 615, 165, 615, 465, 122, 122, 122, 122, 122, 122, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 223, 223, 223, 223, 223, 223, 165, 465, 699, 122, 122, 122, 122, 122, 122, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 335, 809, 465, 130, 130, 130, 130, 130, 130, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 249, 249, 699, 249, 291, 291, 291, 291, 335, 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 335, 410, 557, 131, 131, 131, 131, 131, 131, 249, 167, 546, 167, 167, 167, 546, 167, 167, 808, 557, 167, 303, 303, 303, 303, 303, 303, 445, 131, 131, 131, 131, 131, 131, 167, 167, 167, 191, 445, 191, 191, 449, 193, 191, 191, 373, 373, 191, 193, 375, 375, 193, 449, 413, 193, 193, 262, 373, 413, 496, 262, 375, 191, 191, 496, 806, 262, 560, 193, 410, 193, 576, 195, 805, 195, 195, 195, 466, 195, 195, 262, 262, 195, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 483, 193, 193, 195, 195, 195, 196, 541, 466, 196, 196, 483, 196, 196, 196, 196, 576, 541, 196, 196, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 560, 464, 196, 196, 196, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 464, 612, 612, 196, 196, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 622, 803, 622, 464, 199, 199, 199, 199, 199, 199, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 342, 563, 342, 342, 342, 342, 342, 342, 469, 199, 199, 199, 199, 199, 199, 204, 667, 667, 563, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 469, 472, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 472, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 802, 473, 491, 205, 205, 205, 205, 205, 205, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 381, 381, 381, 381, 381, 381, 473, 491, 801, 205, 205, 205, 205, 205, 205, 221, 791, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 459, 459, 459, 459, 459, 459, 672, 221, 224, 672, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 470, 494, 497, 463, 224, 224, 224, 224, 224, 224, 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, 641, 641, 641, 467, 470, 494, 497, 463, 790, 224, 224, 224, 224, 224, 224, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 463, 467, 470, 227, 227, 227, 227, 227, 227, 378, 378, 378, 378, 378, 378, 378, 378, 674, 467, 674, 490, 378, 490, 490, 490, 490, 490, 490, 227, 227, 227, 227, 227, 227, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 621, 621, 781, 229, 229, 229, 229, 229, 229, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 439, 779, 439, 439, 439, 439, 439, 439, 778, 229, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 450, 450, 777, 230, 230, 230, 230, 230, 230, 451, 451, 621, 450, 439, 453, 453, 524, 668, 668, 550, 614, 451, 474, 500, 550, 614, 453, 524, 230, 230, 230, 230, 230, 230, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 501, 474, 500, 231, 231, 231, 231, 231, 231, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 677, 677, 678, 474, 733, 501, 733, 678, 765, 231, 231, 231, 231, 231, 231, 267, 471, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 572, 764, 471, 268, 268, 268, 268, 268, 268, 456, 456, 456, 456, 456, 456, 456, 456, 572, 471, 762, 538, 456, 509, 509, 509, 509, 509, 509, 268, 268, 268, 268, 268, 268, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 538, 685, 685, 761, 270, 270, 270, 270, 270, 270, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 754, 468, 516, 516, 516, 516, 516, 516, 752, 270, 270, 270, 270, 270, 270, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 468, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 751, 468, 525, 526, 526, 523, 468, 523, 523, 523, 523, 523, 523, 525, 750, 526, 287, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 747, 543, 548, 301, 301, 301, 301, 301, 301, 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, 535, 535, 535, 535, 535, 535, 543, 548, 745, 301, 301, 301, 301, 301, 301, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 740, 552, 554, 304, 304, 304, 304, 304, 304, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 579, 579, 579, 579, 527, 527, 552, 554, 736, 304, 304, 304, 304, 304, 304, 305, 527, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 728, 728, 635, 636, 343, 343, 343, 343, 343, 343, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 591, 591, 591, 591, 591, 591, 635, 636, 735, 343, 343, 343, 343, 343, 343, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 734, 734, 675, 679, 344, 344, 344, 344, 344, 344, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 702, 702, 702, 702, 529, 529, 675, 679, 729, 344, 344, 344, 344, 344, 344, 361, 529, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 362, 583, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 363, 583, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 739, 613, 616, 376, 376, 376, 376, 376, 376, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 608, 608, 608, 608, 608, 608, 613, 616, 703, 376, 376, 376, 376, 376, 376, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 617, 613, 616, 379, 379, 379, 379, 379, 379, 532, 532, 532, 532, 532, 532, 532, 532, 547, 739, 703, 878, 532, 673, 878, 617, 737, 737, 547, 379, 379, 379, 379, 379, 379, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 673, 617, 681, 382, 382, 382, 382, 382, 382, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 785, 727, 785, 890, 673, 551, 890, 681, 724, 382, 382, 382, 382, 382, 382, 383, 551, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 416, 694, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 561, 787, 787, 694, 417, 417, 417, 417, 417, 417, 561, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 629, 629, 629, 629, 629, 629, 629, 723, 417, 417, 417, 417, 417, 417, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 585, 588, 647, 588, 588, 588, 588, 588, 588, 816, 816, 710, 585, 588, 647, 686, 796, 435, 437, 648, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 438, 648, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 709, 684, 796, 444, 444, 444, 444, 444, 444, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 835, 835, 707, 686, 684, 597, 684, 684, 706, 444, 444, 444, 444, 444, 444, 448, 597, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 598, 599, 599, 454, 454, 454, 454, 454, 454, 600, 600, 598, 650, 599, 602, 602, 664, 812, 812, 812, 812, 600, 705, 697, 650, 730, 602, 664, 454, 454, 454, 454, 454, 454, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 697, 687, 730, 457, 457, 457, 457, 457, 457, 605, 605, 605, 605, 605, 605, 605, 605, 687, 697, 937, 937, 605, 656, 656, 656, 656, 656, 656, 457, 457, 457, 457, 457, 457, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 623, 691, 696, 460, 460, 460, 460, 460, 460, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 881, 881, 881, 623, 711, 623, 623, 696, 695, 460, 460, 460, 460, 460, 460, 461, 711, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 696, 623, 690, 695, 462, 938, 938, 462, 462, 683, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 695, 662, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 693, 661, 693, 693, 693, 949, 949, 507, 514, 712, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 712, 968, 968, 514, 514, 514, 514, 514, 514, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 663, 660, 663, 663, 663, 663, 663, 663, 841, 514, 514, 514, 514, 514, 514, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 646, 755, 782, 517, 517, 517, 517, 517, 517, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 644, 908, 841, 908, 643, 665, 755, 782, 642, 517, 517, 517, 517, 517, 517, 518, 665, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 732, 969, 969, 530, 530, 530, 530, 530, 530, 653, 714, 653, 653, 653, 653, 653, 653, 898, 898, 898, 634, 653, 714, 688, 732, 688, 688, 688, 530, 530, 530, 530, 530, 530, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 732, 633, 631, 533, 533, 533, 533, 533, 533, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 671, 671, 671, 671, 671, 671, 671, 671, 688, 533, 533, 533, 533, 533, 533, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, 630, 628, 784, 756, 536, 536, 536, 536, 536, 536, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 909, 920, 909, 920, 666, 666, 784, 756, 793, 536, 536, 536, 536, 536, 536, 537, 666, 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, 540, 756, 784, 627, 626, 793, 540, 746, 746, 540, 540, 746, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 746, 746, 746, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 569, 624, 620, 766, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 766, 569, 619, 813, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 813, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 689, 822, 689, 689, 689, 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, 708, 618, 708, 708, 708, 708, 708, 708, 601, 921, 822, 921, 575, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 726, 717, 689, 717, 717, 717, 717, 717, 717, 595, 925, 726, 925, 717, 926, 594, 926, 577, 586, 581, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 589, 767, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 767, 757, 832, 589, 589, 589, 589, 589, 589, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 720, 720, 720, 720, 720, 720, 757, 832, 580, 589, 589, 589, 589, 589, 589, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 574, 571, 757, 592, 592, 592, 592, 592, 592, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 930, 741, 930, 741, 741, 741, 933, 570, 933, 592, 592, 592, 592, 592, 592, 593, 769, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 596, 769, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 741, 794, 815, 603, 603, 603, 603, 603, 603, 742, 568, 742, 742, 742, 743, 807, 743, 743, 743, 744, 567, 744, 744, 744, 565, 794, 815, 807, 603, 603, 603, 603, 603, 603, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 794, 564, 559, 815, 606, 606, 606, 606, 606, 606, 943, 944, 943, 944, 742, 952, 953, 952, 953, 743, 956, 962, 956, 962, 744, 963, 965, 963, 965, 606, 606, 606, 606, 606, 606, 609, 558, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 610, 748, 556, 748, 748, 748, 610, 748, 748, 610, 610, 748, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 748, 748, 748, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 632, 753, 522, 753, 753, 753, 753, 753, 753, 632, 973, 521, 973, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 520, 512, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 511, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 638, 510, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 772, 506, 772, 772, 772, 772, 772, 772, 971, 499, 498, 971, 772, 974, 977, 974, 977, 638, 645, 495, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 651, 493, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 654, 492, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 978, 489, 978, 654, 654, 654, 654, 654, 654, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 775, 775, 775, 775, 775, 775, 983, 488, 983, 654, 654, 654, 654, 654, 654, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 984, 487, 984, 657, 657, 657, 657, 657, 657, 780, 780, 780, 780, 780, 780, 780, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 481, 480, 657, 657, 657, 657, 657, 657, 658, 478, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 692, 477, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 799, 476, 799, 799, 799, 799, 799, 799, 804, 475, 804, 804, 804, 804, 804, 804, 447, 698, 700, 446, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 821, 443, 821, 821, 821, 821, 821, 821, 442, 799, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 848, 848, 848, 848, 848, 848, 441, 700, 715, 440, 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, 718, 434, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 433, 432, 431, 718, 718, 718, 718, 718, 718, 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, 854, 430, 854, 854, 854, 854, 854, 854, 429, 718, 718, 718, 718, 718, 718, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 428, 427, 426, 425, 721, 721, 721, 721, 721, 721, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 844, 424, 844, 844, 844, 844, 844, 844, 423, 721, 721, 721, 721, 721, 721, 722, 422, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 758, 844, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 759, 421, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 760, 420, 760, 760, 760, 760, 760, 760, 760, 760, 760, 760, 763, 419, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 770, 418, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 773, 415, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 414, 409, 408, 407, 773, 773, 773, 773, 773, 773, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 401, 400, 398, 863, 863, 863, 863, 863, 863, 773, 773, 773, 773, 773, 773, 776, 397, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 792, 396, 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, 795, 863, 795, 795, 795, 795, 795, 795, 795, 795, 795, 795, 797, 395, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, 798, 394, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 810, 393, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 823, 392, 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, 824, 389, 824, 824, 824, 824, 824, 824, 824, 824, 824, 824, 825, 388, 825, 825, 825, 825, 825, 825, 825, 825, 825, 825, 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, 839, 387, 839, 839, 839, 839, 839, 839, 839, 839, 839, 839, 840, 386, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 842, 370, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 843, 369, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, 847, 847, 847, 847, 847, 847, 847, 847, 847, 847, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 855, 855, 855, 855, 855, 855, 855, 855, 855, 855, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, 866, 866, 866, 866, 866, 866, 368, 855, 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 367, 365, 364, 360, 359, 358, 356, 856, 857, 857, 857, 857, 857, 857, 857, 857, 857, 857, 982, 355, 354, 982, 353, 352, 351, 982, 350, 349, 346, 341, 340, 339, 332, 331, 330, 329, 328, 322, 321, 319, 318, 317, 316, 315, 314, 857, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 313, 312, 309, 308, 306, 298, 297, 294, 293, 286, 285, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 269, 266, 265, 264, 862, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 868, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 869, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 871, 872, 258, 255, 254, 253, 252, 251, 872, 248, 872, 872, 872, 872, 247, 246, 872, 872, 872, 872, 872, 872, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 874, 245, 244, 243, 242, 874, 241, 874, 240, 874, 874, 874, 874, 874, 239, 874, 874, 874, 874, 874, 874, 875, 238, 237, 236, 235, 234, 233, 875, 232, 875, 875, 875, 875, 226, 225, 875, 875, 875, 875, 875, 875, 876, 218, 217, 876, 876, 216, 876, 876, 215, 876, 876, 876, 876, 214, 213, 876, 876, 876, 876, 876, 876, 877, 877, 211, 877, 210, 209, 208, 877, 879, 206, 200, 879, 879, 192, 879, 879, 188, 879, 879, 879, 879, 184, 183, 879, 879, 879, 879, 879, 879, 880, 181, 177, 880, 880, 170, 880, 880, 166, 880, 880, 880, 880, 164, 880, 880, 880, 162, 880, 880, 880, 882, 154, 153, 882, 152, 151, 882, 882, 150, 882, 882, 882, 882, 882, 144, 882, 882, 882, 882, 882, 882, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, 884, 884, 143, 884, 142, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 885, 141, 140, 139, 137, 885, 136, 885, 135, 885, 885, 885, 885, 885, 134, 885, 885, 885, 885, 885, 885, 886, 133, 132, 128, 124, 123, 119, 886, 116, 886, 886, 886, 886, 113, 886, 886, 886, 886, 886, 886, 886, 887, 108, 107, 887, 887, 106, 887, 887, 104, 887, 887, 887, 887, 100, 887, 887, 887, 887, 887, 887, 887, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 889, 889, 99, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 889, 891, 98, 97, 891, 891, 96, 891, 891, 92, 891, 891, 891, 891, 79, 72, 891, 891, 891, 891, 891, 891, 892, 892, 65, 892, 61, 60, 58, 892, 893, 893, 57, 893, 55, 53, 44, 893, 894, 894, 894, 43, 894, 41, 40, 35, 894, 895, 31, 25, 895, 895, 19, 895, 895, 17, 895, 895, 895, 895, 16, 15, 895, 895, 895, 895, 895, 895, 896, 0, 0, 896, 896, 0, 896, 896, 0, 896, 896, 896, 896, 0, 0, 896, 896, 896, 896, 896, 896, 897, 0, 0, 897, 897, 0, 897, 897, 0, 897, 897, 897, 897, 0, 897, 897, 897, 0, 897, 897, 897, 899, 0, 0, 899, 0, 0, 899, 899, 0, 899, 899, 899, 899, 899, 0, 899, 899, 899, 899, 899, 899, 900, 900, 0, 900, 0, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 901, 0, 0, 0, 0, 0, 0, 901, 0, 901, 901, 901, 901, 0, 0, 901, 901, 901, 901, 901, 901, 902, 0, 0, 0, 0, 0, 0, 902, 0, 902, 902, 902, 902, 0, 902, 902, 902, 902, 902, 902, 902, 903, 0, 0, 903, 903, 0, 903, 903, 0, 903, 903, 903, 903, 0, 903, 903, 903, 903, 903, 903, 903, 904, 0, 0, 904, 904, 0, 904, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 905, 906, 906, 0, 906, 0, 0, 0, 906, 907, 907, 907, 0, 907, 0, 0, 0, 907, 910, 910, 0, 910, 0, 0, 0, 910, 911, 911, 0, 911, 0, 0, 0, 911, 912, 912, 0, 912, 0, 0, 0, 912, 913, 913, 913, 0, 913, 0, 0, 0, 913, 914, 0, 0, 914, 914, 0, 914, 915, 915, 0, 915, 0, 0, 0, 915, 916, 916, 0, 916, 0, 0, 0, 916, 917, 917, 0, 917, 0, 0, 0, 917, 918, 918, 918, 0, 918, 0, 0, 0, 918, 919, 919, 919, 919, 0, 919, 0, 0, 0, 919, 922, 922, 0, 922, 0, 0, 0, 922, 923, 923, 0, 923, 0, 0, 0, 923, 924, 924, 0, 924, 0, 0, 0, 924, 927, 927, 927, 0, 927, 0, 0, 0, 927, 928, 928, 928, 928, 0, 928, 0, 0, 0, 928, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, 931, 931, 0, 931, 0, 0, 0, 931, 932, 932, 0, 932, 0, 0, 0, 932, 934, 934, 934, 0, 934, 0, 0, 0, 934, 935, 935, 935, 935, 0, 935, 0, 0, 0, 935, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 939, 0, 0, 939, 939, 0, 939, 940, 0, 0, 0, 940, 940, 0, 940, 940, 940, 0, 0, 940, 940, 941, 941, 0, 941, 0, 0, 0, 941, 942, 0, 942, 942, 0, 942, 0, 0, 0, 942, 945, 945, 945, 0, 945, 0, 0, 0, 945, 946, 946, 946, 946, 0, 946, 0, 0, 0, 946, 947, 947, 0, 0, 947, 0, 0, 0, 947, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 948, 950, 0, 0, 950, 950, 0, 950, 951, 0, 0, 0, 951, 951, 0, 951, 951, 951, 0, 0, 951, 951, 954, 954, 0, 954, 0, 0, 0, 954, 955, 0, 955, 955, 0, 955, 0, 0, 0, 955, 957, 957, 957, 0, 957, 0, 0, 0, 957, 958, 958, 958, 0, 0, 958, 0, 0, 0, 958, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, 960, 960, 0, 960, 960, 960, 0, 960, 0, 960, 960, 960, 960, 0, 0, 960, 960, 960, 960, 960, 960, 961, 961, 0, 961, 961, 961, 0, 961, 0, 961, 961, 961, 961, 0, 0, 961, 961, 961, 961, 961, 961, 964, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 964, 964, 0, 964, 964, 0, 964, 966, 966, 0, 966, 0, 0, 0, 966, 967, 0, 967, 967, 0, 967, 0, 0, 0, 967, 970, 970, 0, 0, 970, 0, 0, 0, 970, 972, 0, 0, 0, 0, 0, 0, 972, 0, 972, 972, 972, 972, 0, 0, 972, 972, 972, 972, 972, 972, 975, 975, 0, 975, 0, 0, 0, 975, 976, 0, 976, 976, 0, 976, 0, 0, 0, 976, 979, 979, 0, 979, 0, 0, 0, 979, 980, 0, 980, 0, 0, 980, 0, 0, 0, 980, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 981, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "toke.l" #define INITIAL 0 #line 2 "toke.l" /* * Copyright (c) 1996, 1998-2005, 2007-2016 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ #include #include #include #include #include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ #if defined(HAVE_STDINT_H) # include #elif defined(HAVE_INTTYPES_H) # include #endif #include #include #include #include #include "sudoers.h" #include "parse.h" #include "toke.h" #include #include "sudo_lbuf.h" #ifdef HAVE_SHA224UPDATE # include #else # include "compat/sha2.h" #endif #if defined(HAVE_STRUCT_DIRENT_D_NAMLEN) && HAVE_STRUCT_DIRENT_D_NAMLEN # define NAMLEN(dirent) (dirent)->d_namlen #else # define NAMLEN(dirent) strlen((dirent)->d_name) #endif int sudolineno; /* current sudoers line number. */ int last_token; /* last token that was parsed. */ char *sudoers; /* sudoers file being parsed. */ /* Default sudoers path, mode and owner (may be set via sudo.conf) */ const char *sudoers_file = _PATH_SUDOERS; mode_t sudoers_mode = SUDOERS_MODE; uid_t sudoers_uid = SUDOERS_UID; gid_t sudoers_gid = SUDOERS_GID; static bool continued, sawspace; static int prev_state; static yy_size_t digest_len; static bool push_include_int(char *, bool); static bool pop_include(void); static char *parse_include_int(const char *, bool); int (*trace_print)(const char *msg) = sudoers_trace_print; #define LEXRETURN(n) do { \ last_token = (n); \ return (n); \ } while (0) #define ECHO ignore_result(fwrite(sudoerstext, sudoersleng, 1, sudoersout)) #define parse_include(_p) (parse_include_int((_p), false)) #define parse_includedir(_p) (parse_include_int((_p), true)) #define push_include(_p) (push_include_int((_p), false)) #define push_includedir(_p) (push_include_int((_p), true)) #define YY_NO_INPUT 1 #define YY_NO_UNPUT 1 #define GOTDEFS 1 #define GOTCMND 2 #define STARTDEFS 3 #define INDEFS 4 #define INSTR 5 #define WANTDIGEST 6 #line 2058 "lex.sudoers.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if defined(YY_STACK_USED) && YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #ifdef __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ yy_current_buffer->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 122 "toke.l" #line 2214 "lex.sudoers.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 868 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 5615 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 123 "toke.l" { LEXTRACE(", "); LEXRETURN(','); } /* return ',' */ YY_BREAK case 2: YY_RULE_SETUP #line 128 "toke.l" BEGIN STARTDEFS; YY_BREAK case 3: YY_RULE_SETUP #line 130 "toke.l" { BEGIN INDEFS; LEXTRACE("DEFVAR "); if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXRETURN(DEFVAR); } YY_BREAK case 4: YY_RULE_SETUP #line 139 "toke.l" { BEGIN STARTDEFS; LEXTRACE(", "); LEXRETURN(','); } /* return ',' */ YY_BREAK case 5: YY_RULE_SETUP #line 145 "toke.l" { LEXTRACE("= "); LEXRETURN('='); } /* return '=' */ YY_BREAK case 6: YY_RULE_SETUP #line 150 "toke.l" { LEXTRACE("+= "); LEXRETURN('+'); } /* return '+' */ YY_BREAK case 7: YY_RULE_SETUP #line 155 "toke.l" { LEXTRACE("-= "); LEXRETURN('-'); } /* return '-' */ YY_BREAK case 8: YY_RULE_SETUP #line 160 "toke.l" { LEXTRACE("BEGINSTR "); sudoerslval.string = NULL; prev_state = YY_START; BEGIN INSTR; } YY_BREAK case 9: YY_RULE_SETUP #line 167 "toke.l" { LEXTRACE("WORD(2) "); if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXRETURN(WORD); } YY_BREAK case 10: YY_RULE_SETUP #line 176 "toke.l" { /* Line continuation char followed by newline. */ sudolineno++; continued = true; } YY_BREAK case 11: YY_RULE_SETUP #line 182 "toke.l" { LEXTRACE("ENDSTR "); BEGIN prev_state; if (sudoerslval.string == NULL) { LEXTRACE("ERROR "); /* empty string */ LEXRETURN(ERROR); } if (prev_state == INITIAL) { switch (sudoerslval.string[0]) { case '%': if (sudoerslval.string[1] == '\0' || (sudoerslval.string[1] == ':' && sudoerslval.string[2] == '\0')) { LEXTRACE("ERROR "); /* empty group */ LEXRETURN(ERROR); } LEXTRACE("USERGROUP "); LEXRETURN(USERGROUP); case '+': if (sudoerslval.string[1] == '\0') { LEXTRACE("ERROR "); /* empty netgroup */ LEXRETURN(ERROR); } LEXTRACE("NETGROUP "); LEXRETURN(NETGROUP); } } LEXTRACE("WORD(4) "); LEXRETURN(WORD); } YY_BREAK case 12: YY_RULE_SETUP #line 214 "toke.l" { LEXTRACE("BACKSLASH "); if (!append(sudoerstext, sudoersleng)) yyterminate(); } YY_BREAK case 13: YY_RULE_SETUP #line 220 "toke.l" { LEXTRACE("STRBODY "); if (!append(sudoerstext, sudoersleng)) yyterminate(); } YY_BREAK case 14: YY_RULE_SETUP #line 228 "toke.l" { /* quoted fnmatch glob char, pass verbatim */ LEXTRACE("QUOTEDCHAR "); if (!fill_args(sudoerstext, 2, sawspace)) yyterminate(); sawspace = false; } YY_BREAK case 15: YY_RULE_SETUP #line 236 "toke.l" { /* quoted sudoers special char, strip backslash */ LEXTRACE("QUOTEDCHAR "); if (!fill_args(sudoerstext + 1, 1, sawspace)) yyterminate(); sawspace = false; } YY_BREAK case 16: YY_RULE_SETUP #line 244 "toke.l" { BEGIN INITIAL; yyless(0); LEXRETURN(COMMAND); } /* end of command line args */ YY_BREAK case 17: YY_RULE_SETUP #line 250 "toke.l" { LEXTRACE("ARG "); if (!fill_args(sudoerstext, sudoersleng, sawspace)) yyterminate(); sawspace = false; } /* a command line arg */ YY_BREAK case 18: YY_RULE_SETUP #line 258 "toke.l" { /* Only return DIGEST if the length is correct. */ if ((yy_size_t)sudoersleng == digest_len * 2) { if (!fill(sudoerstext, sudoersleng)) yyterminate(); BEGIN INITIAL; LEXTRACE("DIGEST "); LEXRETURN(DIGEST); } BEGIN INITIAL; yyless(sudoersleng); } /* hex digest */ YY_BREAK case 19: YY_RULE_SETUP #line 271 "toke.l" { /* Only return DIGEST if the length is correct. */ yy_size_t len; if (sudoerstext[sudoersleng - 1] == '=') { /* use padding */ len = 4 * ((digest_len + 2) / 3); } else { /* no padding */ len = (4 * digest_len + 2) / 3; } if ((yy_size_t)sudoersleng == len) { if (!fill(sudoerstext, sudoersleng)) yyterminate(); BEGIN INITIAL; LEXTRACE("DIGEST "); LEXRETURN(DIGEST); } BEGIN INITIAL; yyless(sudoersleng); } /* base64 digest */ YY_BREAK case 20: YY_RULE_SETUP #line 292 "toke.l" { char *path; if (continued) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } if ((path = parse_include(sudoerstext)) == NULL) yyterminate(); LEXTRACE("INCLUDE\n"); /* Push current buffer and switch to include file */ if (!push_include(path)) yyterminate(); } YY_BREAK case 21: YY_RULE_SETUP #line 310 "toke.l" { char *path; if (continued) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } if ((path = parse_includedir(sudoerstext)) == NULL) yyterminate(); LEXTRACE("INCLUDEDIR\n"); /* * Push current buffer and switch to include file, * ignoring missing or empty directories. */ if (!push_includedir(path)) yyterminate(); } YY_BREAK case 22: YY_RULE_SETUP #line 331 "toke.l" { char deftype; int n; if (continued) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } for (n = 0; isblank((unsigned char)sudoerstext[n]); n++) continue; n += sizeof("Defaults") - 1; if ((deftype = sudoerstext[n++]) != '\0') { while (isblank((unsigned char)sudoerstext[n])) n++; } BEGIN GOTDEFS; switch (deftype) { case ':': yyless(n); LEXTRACE("DEFAULTS_USER "); LEXRETURN(DEFAULTS_USER); case '>': yyless(n); LEXTRACE("DEFAULTS_RUNAS "); LEXRETURN(DEFAULTS_RUNAS); case '@': yyless(n); LEXTRACE("DEFAULTS_HOST "); LEXRETURN(DEFAULTS_HOST); case '!': yyless(n); LEXTRACE("DEFAULTS_CMND "); LEXRETURN(DEFAULTS_CMND); default: LEXTRACE("DEFAULTS "); LEXRETURN(DEFAULTS); } } YY_BREAK case 23: YY_RULE_SETUP #line 371 "toke.l" { int n; if (continued) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } for (n = 0; isblank((unsigned char)sudoerstext[n]); n++) continue; switch (sudoerstext[n]) { case 'H': LEXTRACE("HOSTALIAS "); LEXRETURN(HOSTALIAS); case 'C': LEXTRACE("CMNDALIAS "); LEXRETURN(CMNDALIAS); case 'U': LEXTRACE("USERALIAS "); LEXRETURN(USERALIAS); case 'R': LEXTRACE("RUNASALIAS "); LEXRETURN(RUNASALIAS); } } YY_BREAK case 24: YY_RULE_SETUP #line 397 "toke.l" { /* cmnd does not require passwd for this user */ LEXTRACE("NOPASSWD "); LEXRETURN(NOPASSWD); } YY_BREAK case 25: YY_RULE_SETUP #line 403 "toke.l" { /* cmnd requires passwd for this user */ LEXTRACE("PASSWD "); LEXRETURN(PASSWD); } YY_BREAK case 26: YY_RULE_SETUP #line 409 "toke.l" { LEXTRACE("NOEXEC "); LEXRETURN(NOEXEC); } YY_BREAK case 27: YY_RULE_SETUP #line 414 "toke.l" { LEXTRACE("EXEC "); LEXRETURN(EXEC); } YY_BREAK case 28: YY_RULE_SETUP #line 419 "toke.l" { LEXTRACE("SETENV "); LEXRETURN(SETENV); } YY_BREAK case 29: YY_RULE_SETUP #line 424 "toke.l" { LEXTRACE("NOSETENV "); LEXRETURN(NOSETENV); } YY_BREAK case 30: YY_RULE_SETUP #line 429 "toke.l" { LEXTRACE("LOG_OUTPUT "); LEXRETURN(LOG_OUTPUT); } YY_BREAK case 31: YY_RULE_SETUP #line 434 "toke.l" { LEXTRACE("NOLOG_OUTPUT "); LEXRETURN(NOLOG_OUTPUT); } YY_BREAK case 32: YY_RULE_SETUP #line 439 "toke.l" { LEXTRACE("LOG_INPUT "); LEXRETURN(LOG_INPUT); } YY_BREAK case 33: YY_RULE_SETUP #line 444 "toke.l" { LEXTRACE("NOLOG_INPUT "); LEXRETURN(NOLOG_INPUT); } YY_BREAK case 34: YY_RULE_SETUP #line 449 "toke.l" { LEXTRACE("MAIL "); LEXRETURN(MAIL); } YY_BREAK case 35: YY_RULE_SETUP #line 454 "toke.l" { LEXTRACE("NOMAIL "); LEXRETURN(NOMAIL); } YY_BREAK case 36: YY_RULE_SETUP #line 459 "toke.l" { LEXTRACE("FOLLOW "); LEXRETURN(FOLLOW); } YY_BREAK case 37: YY_RULE_SETUP #line 464 "toke.l" { LEXTRACE("NOFOLLOW "); LEXRETURN(NOFOLLOW); } YY_BREAK case 38: YY_RULE_SETUP #line 469 "toke.l" { /* empty group or netgroup */ LEXTRACE("ERROR "); LEXRETURN(ERROR); } YY_BREAK case 39: YY_RULE_SETUP #line 475 "toke.l" { /* netgroup */ if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("NETGROUP "); LEXRETURN(NETGROUP); } YY_BREAK case 40: YY_RULE_SETUP #line 483 "toke.l" { /* group */ if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("USERGROUP "); LEXRETURN(USERGROUP); } YY_BREAK case 41: YY_RULE_SETUP #line 491 "toke.l" { if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("NTWKADDR "); LEXRETURN(NTWKADDR); } YY_BREAK case 42: YY_RULE_SETUP #line 498 "toke.l" { if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("NTWKADDR "); LEXRETURN(NTWKADDR); } YY_BREAK case 43: YY_RULE_SETUP #line 505 "toke.l" { if (!ipv6_valid(sudoerstext)) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("NTWKADDR "); LEXRETURN(NTWKADDR); } YY_BREAK case 44: YY_RULE_SETUP #line 516 "toke.l" { if (!ipv6_valid(sudoerstext)) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("NTWKADDR "); LEXRETURN(NTWKADDR); } YY_BREAK case 45: YY_RULE_SETUP #line 527 "toke.l" { LEXTRACE("ALL "); LEXRETURN(ALL); } YY_BREAK case 46: YY_RULE_SETUP #line 533 "toke.l" { LEXTRACE("CMND_TIMEOUT "); LEXRETURN(CMND_TIMEOUT); } YY_BREAK case 47: YY_RULE_SETUP #line 538 "toke.l" { #ifdef HAVE_SELINUX LEXTRACE("ROLE "); LEXRETURN(ROLE); #else goto got_alias; #endif } YY_BREAK case 48: YY_RULE_SETUP #line 547 "toke.l" { #ifdef HAVE_SELINUX LEXTRACE("TYPE "); LEXRETURN(TYPE); #else goto got_alias; #endif } YY_BREAK case 49: YY_RULE_SETUP #line 555 "toke.l" { #ifdef HAVE_PRIV_SET LEXTRACE("PRIVS "); LEXRETURN(PRIVS); #else goto got_alias; #endif } YY_BREAK case 50: YY_RULE_SETUP #line 564 "toke.l" { #ifdef HAVE_PRIV_SET LEXTRACE("LIMITPRIVS "); LEXRETURN(LIMITPRIVS); #else goto got_alias; #endif } YY_BREAK case 51: YY_RULE_SETUP #line 573 "toke.l" { got_alias: if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("ALIAS "); LEXRETURN(ALIAS); } YY_BREAK case 52: YY_RULE_SETUP #line 581 "toke.l" { /* XXX - no way to specify digest for command */ /* no command args allowed for Defaults!/path */ if (!fill_cmnd(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("COMMAND "); LEXRETURN(COMMAND); } YY_BREAK case 53: YY_RULE_SETUP #line 590 "toke.l" { digest_len = SHA224_DIGEST_LENGTH; BEGIN WANTDIGEST; LEXTRACE("SHA224_TOK "); LEXRETURN(SHA224_TOK); } YY_BREAK case 54: YY_RULE_SETUP #line 597 "toke.l" { digest_len = SHA256_DIGEST_LENGTH; BEGIN WANTDIGEST; LEXTRACE("SHA256_TOK "); LEXRETURN(SHA256_TOK); } YY_BREAK case 55: YY_RULE_SETUP #line 604 "toke.l" { digest_len = SHA384_DIGEST_LENGTH; BEGIN WANTDIGEST; LEXTRACE("SHA384_TOK "); LEXRETURN(SHA384_TOK); } YY_BREAK case 56: YY_RULE_SETUP #line 611 "toke.l" { digest_len = SHA512_DIGEST_LENGTH; BEGIN WANTDIGEST; LEXTRACE("SHA512_TOK "); LEXRETURN(SHA512_TOK); } YY_BREAK case 57: YY_RULE_SETUP #line 618 "toke.l" { BEGIN GOTCMND; LEXTRACE("COMMAND "); if (!fill_cmnd(sudoerstext, sudoersleng)) yyterminate(); } /* sudo -e */ YY_BREAK case 58: YY_RULE_SETUP #line 625 "toke.l" { /* directories can't have args... */ if (sudoerstext[sudoersleng - 1] == '/') { LEXTRACE("COMMAND "); if (!fill_cmnd(sudoerstext, sudoersleng)) yyterminate(); LEXRETURN(COMMAND); } else { BEGIN GOTCMND; LEXTRACE("COMMAND "); if (!fill_cmnd(sudoerstext, sudoersleng)) yyterminate(); } } /* a pathname */ YY_BREAK case 59: YY_RULE_SETUP #line 640 "toke.l" { LEXTRACE("BEGINSTR "); sudoerslval.string = NULL; prev_state = YY_START; BEGIN INSTR; } YY_BREAK case 60: YY_RULE_SETUP #line 647 "toke.l" { /* a word */ if (!fill(sudoerstext, sudoersleng)) yyterminate(); LEXTRACE("WORD(5) "); LEXRETURN(WORD); } YY_BREAK case 61: YY_RULE_SETUP #line 655 "toke.l" { LEXTRACE("( "); LEXRETURN('('); } YY_BREAK case 62: YY_RULE_SETUP #line 660 "toke.l" { LEXTRACE(") "); LEXRETURN(')'); } YY_BREAK case 63: YY_RULE_SETUP #line 665 "toke.l" { LEXTRACE(", "); LEXRETURN(','); } /* return ',' */ YY_BREAK case 64: YY_RULE_SETUP #line 670 "toke.l" { LEXTRACE("= "); LEXRETURN('='); } /* return '=' */ YY_BREAK case 65: YY_RULE_SETUP #line 675 "toke.l" { LEXTRACE(": "); LEXRETURN(':'); } /* return ':' */ YY_BREAK case 66: YY_RULE_SETUP #line 680 "toke.l" { if (sudoersleng & 1) { LEXTRACE("!"); LEXRETURN('!'); /* return '!' */ } } YY_BREAK case 67: YY_RULE_SETUP #line 687 "toke.l" { if (YY_START == INSTR) { LEXTRACE("ERROR "); LEXRETURN(ERROR); /* line break in string */ } BEGIN INITIAL; sudolineno++; continued = false; LEXTRACE("\n"); LEXRETURN(COMMENT); } /* return newline */ YY_BREAK case 68: YY_RULE_SETUP #line 699 "toke.l" { /* throw away space/tabs */ sawspace = true; /* but remember for fill_args */ } YY_BREAK case 69: YY_RULE_SETUP #line 703 "toke.l" { sawspace = true; /* remember for fill_args */ sudolineno++; continued = true; } /* throw away EOL after \ */ YY_BREAK case 70: YY_RULE_SETUP #line 709 "toke.l" { if (sudoerstext[sudoersleng - 1] == '\n') { /* comment ending in a newline */ BEGIN INITIAL; sudolineno++; continued = false; } else if (!feof(yyin)) { LEXTRACE("ERROR "); LEXRETURN(ERROR); } LEXTRACE("#\n"); LEXRETURN(COMMENT); } /* comment, not uid/gid */ YY_BREAK case 71: YY_RULE_SETUP #line 723 "toke.l" { LEXTRACE("ERROR "); LEXRETURN(ERROR); } /* parse error */ YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(GOTDEFS): case YY_STATE_EOF(GOTCMND): case YY_STATE_EOF(STARTDEFS): case YY_STATE_EOF(INDEFS): case YY_STATE_EOF(INSTR): case YY_STATE_EOF(WANTDIGEST): #line 728 "toke.l" { if (YY_START != INITIAL) { BEGIN INITIAL; LEXTRACE("ERROR "); LEXRETURN(ERROR); } if (!pop_include()) yyterminate(); } YY_BREAK case 72: YY_RULE_SETUP #line 738 "toke.l" ECHO; YY_BREAK #line 3140 "lex.sudoers.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer YY_PROTO(( void )) { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state YY_PROTO(( void )) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 868 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 868 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 867); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )) #else static int input YY_PROTO(( void )) #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; yy_current_buffer->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE #include #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if defined(YY_ALWAYS_INTERACTIVE) && YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if defined(YY_NEVER_INTERACTIVE) && YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif errno = oerrno; } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )) { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )) { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if defined(YY_MAIN) && YY_MAIN int main() { yylex(); return 0; } #endif #line 738 "toke.l" struct path_list { SLIST_ENTRY(path_list) entries; char *path; }; SLIST_HEAD(path_list_head, path_list); struct include_stack { YY_BUFFER_STATE bs; char *path; struct path_list_head more; /* more files in case of includedir */ int lineno; bool keepopen; }; /* * Compare two struct path_list structs in reverse order. */ static int pl_compare(const void *v1, const void *v2) { const struct path_list * const *p1 = v1; const struct path_list * const *p2 = v2; return strcmp((*p2)->path, (*p1)->path); } /* * Open dirpath and fill in pathsp with an array of regular files * that do not end in '~' or contain a '.'. * Returns the number of files or -1 on error. * If zero files are found, NULL is stored in pathsp. */ static int read_dir_files(const char *dirpath, struct path_list ***pathsp) { DIR *dir; int i, count = 0; int max_paths = 32; struct dirent *dent; struct path_list **paths = NULL; debug_decl(read_dir_files, SUDOERS_DEBUG_PARSER) dir = opendir(dirpath); if (dir == NULL) { if (errno == ENOENT) goto done; sudo_warn("%s", dirpath); goto bad; } paths = reallocarray(NULL, max_paths, sizeof(*paths)); if (paths == NULL) goto oom; while ((dent = readdir(dir)) != NULL) { struct path_list *pl; struct stat sb; size_t len; char *path; /* Ignore files that end in '~' or have a '.' in them. */ if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~' || strchr(dent->d_name, '.') != NULL) { continue; } len = strlen(dirpath) + 1 + NAMLEN(dent); if ((path = rcstr_alloc(len)) == NULL) goto oom; (void)snprintf(path, len + 1, "%s/%s", dirpath, dent->d_name); if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) { rcstr_delref(path); continue; } pl = malloc(sizeof(*pl)); if (pl == NULL) { rcstr_delref(path); goto oom; } pl->path = path; if (count >= max_paths) { struct path_list **tmp; max_paths <<= 1; tmp = reallocarray(paths, max_paths, sizeof(*paths)); if (tmp == NULL) { rcstr_delref(path); free(pl); goto oom; } paths = tmp; } paths[count++] = pl; } closedir(dir); if (count == 0) { free(paths); paths = NULL; } done: *pathsp = paths; debug_return_int(count); oom: sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); bad: sudoerserror(NULL); if (dir != NULL) closedir(dir); for (i = 0; i < count; i++) { rcstr_delref(paths[i]->path); free(paths[i]); } free(paths); debug_return_int(-1); } /* * Push a list of all files in dirpath onto stack. * Returns the number of files or -1 on error. */ static int switch_dir(struct include_stack *stack, char *dirpath) { struct path_list **paths = NULL; int count, i; debug_decl(switch_dir, SUDOERS_DEBUG_PARSER) count = read_dir_files(dirpath, &paths); if (count > 0) { /* Sort the list as an array in reverse order. */ qsort(paths, count, sizeof(*paths), pl_compare); /* Build up the list in sorted order. */ for (i = 0; i < count; i++) { SLIST_INSERT_HEAD(&stack->more, paths[i], entries); } free(paths); } debug_return_int(count); } #define MAX_SUDOERS_DEPTH 128 #define SUDOERS_STACK_INCREMENT 16 static size_t istacksize, idepth; static struct include_stack *istack; static bool keepopen; void init_lexer(void) { struct path_list *pl; debug_decl(init_lexer, SUDOERS_DEBUG_PARSER) while (idepth) { idepth--; while ((pl = SLIST_FIRST(&istack[idepth].more)) != NULL) { SLIST_REMOVE_HEAD(&istack[idepth].more, entries); rcstr_delref(pl->path); free(pl); } rcstr_delref(istack[idepth].path); if (idepth && !istack[idepth].keepopen) fclose(istack[idepth].bs->yy_input_file); sudoers_delete_buffer(istack[idepth].bs); } free(istack); istack = NULL; istacksize = idepth = 0; sudolineno = 1; keepopen = false; sawspace = false; continued = false; prev_state = INITIAL; debug_return; } /* * Open an include file (or file from a directory), push the old * sudoers file buffer and switch to the new one. * A missing or insecure include dir is simply ignored. * Returns false on error, else true. */ static bool push_include_int(char *path, bool isdir) { struct path_list *pl; FILE *fp; debug_decl(push_include_int, SUDOERS_DEBUG_PARSER) /* push current state onto stack */ if (idepth >= istacksize) { struct include_stack *new_istack; if (idepth > MAX_SUDOERS_DEPTH) { sudoerserror(N_("too many levels of includes")); debug_return_bool(false); } istacksize += SUDOERS_STACK_INCREMENT; new_istack = reallocarray(istack, istacksize, sizeof(*istack)); if (new_istack == NULL) { sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); sudoerserror(NULL); debug_return_bool(false); } istack = new_istack; } SLIST_INIT(&istack[idepth].more); if (isdir) { struct stat sb; int count, status; status = sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb); if (status != SUDO_PATH_SECURE) { if (sudoers_warnings) { switch (status) { case SUDO_PATH_BAD_TYPE: errno = ENOTDIR; sudo_warn("%s", path); break; case SUDO_PATH_WRONG_OWNER: sudo_warnx(U_("%s is owned by uid %u, should be %u"), path, (unsigned int) sb.st_uid, (unsigned int) sudoers_uid); break; case SUDO_PATH_WORLD_WRITABLE: sudo_warnx(U_("%s is world writable"), path); break; case SUDO_PATH_GROUP_WRITABLE: sudo_warnx(U_("%s is owned by gid %u, should be %u"), path, (unsigned int) sb.st_gid, (unsigned int) sudoers_gid); break; default: break; } } /* A missing or insecure include dir is not a fatal error. */ debug_return_bool(true); } count = switch_dir(&istack[idepth], path); if (count <= 0) { /* switch_dir() called sudoerserror() for us */ rcstr_delref(path); debug_return_bool(count ? false : true); } /* Parse the first dir entry we can open, leave the rest for later. */ do { rcstr_delref(path); if ((pl = SLIST_FIRST(&istack[idepth].more)) == NULL) { /* Unable to open any files in include dir, not an error. */ debug_return_bool(true); } SLIST_REMOVE_HEAD(&istack[idepth].more, entries); path = pl->path; free(pl); } while ((fp = open_sudoers(path, false, &keepopen)) == NULL); } else { if ((fp = open_sudoers(path, true, &keepopen)) == NULL) { /* The error was already printed by open_sudoers() */ sudoerserror(NULL); debug_return_bool(false); } } /* Push the old (current) file and open the new one. */ istack[idepth].path = sudoers; /* push old path (and its ref) */ istack[idepth].bs = YY_CURRENT_BUFFER; istack[idepth].lineno = sudolineno; istack[idepth].keepopen = keepopen; idepth++; sudolineno = 1; sudoers = path; sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE)); debug_return_bool(true); } /* * Restore the previous sudoers file and buffer, or, in the case * of an includedir, switch to the next file in the dir. * Returns false if there is nothing to pop, else true. */ static bool pop_include(void) { struct path_list *pl; FILE *fp; debug_decl(pop_include, SUDOERS_DEBUG_PARSER) if (idepth == 0) debug_return_bool(false); if (!keepopen) fclose(YY_CURRENT_BUFFER->yy_input_file); sudoers_delete_buffer(YY_CURRENT_BUFFER); /* If we are in an include dir, move to the next file. */ while ((pl = SLIST_FIRST(&istack[idepth - 1].more)) != NULL) { SLIST_REMOVE_HEAD(&istack[idepth - 1].more, entries); fp = open_sudoers(pl->path, false, &keepopen); if (fp != NULL) { rcstr_delref(sudoers); sudoers = pl->path; sudolineno = 1; sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE)); free(pl); break; } /* Unable to open path in include dir, go to next one. */ rcstr_delref(pl->path); free(pl); } /* If no path list, just pop the last dir on the stack. */ if (pl == NULL) { idepth--; sudoers_switch_to_buffer(istack[idepth].bs); rcstr_delref(sudoers); sudoers = istack[idepth].path; sudolineno = istack[idepth].lineno; keepopen = istack[idepth].keepopen; } debug_return_bool(true); } static char * parse_include_int(const char *base, bool isdir) { const char *cp, *ep; char *path, *pp; int dirlen = 0, len = 0, subst = 0; size_t shost_len = 0; debug_decl(parse_include, SUDOERS_DEBUG_PARSER) /* Pull out path from #include line. */ cp = base + (isdir ? sizeof("#includedir") : sizeof("#include")); while (isblank((unsigned char) *cp)) cp++; ep = cp; while (*ep != '\0' && !isspace((unsigned char) *ep)) { if (ep[0] == '%' && ep[1] == 'h') { shost_len = strlen(user_shost); len += shost_len - 2; subst = 1; } ep++; } /* Relative paths are located in the same dir as the sudoers file. */ if (*cp != '/') { char *dirend = strrchr(sudoers, '/'); if (dirend != NULL) dirlen = (int)(dirend - sudoers) + 1; } /* Make a copy of the fully-qualified path and return it. */ len += (int)(ep - cp); path = pp = rcstr_alloc(len + dirlen); if (path == NULL) { sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); sudoerserror(NULL); debug_return_str(NULL); } if (dirlen) { memcpy(path, sudoers, dirlen); pp += dirlen; } if (subst) { /* substitute for %h */ while (cp < ep) { if (cp[0] == '%' && cp[1] == 'h') { memcpy(pp, user_shost, shost_len); pp += shost_len; cp += 2; continue; } *pp++ = *cp++; } *pp = '\0'; } else { memcpy(pp, cp, len); pp[len] = '\0'; } /* Push any excess characters (e.g. comment, newline) back to the lexer */ if (*ep != '\0') yyless((int)(ep - base)); debug_return_str(path); } #ifdef TRACELEXER int sudoers_trace_print(const char *msg) { return fputs(msg, stderr); } #else int sudoers_trace_print(const char *msg) { static bool initialized; static struct sudo_lbuf lbuf; if (!initialized) { initialized = true; sudo_lbuf_init(&lbuf, NULL, 0, NULL, 0); } sudo_lbuf_append(&lbuf, "%s", msg); /* XXX - assumes a final newline */ if (strchr(msg, '\n') != NULL) { sudo_debug_printf2(NULL, NULL, 0, SUDOERS_DEBUG_PARSER|SUDO_DEBUG_DEBUG, "%s:%d %s", sudoers, sudolineno, lbuf.buf); lbuf.len = 0; } return 0; } #endif /* TRACELEXER */