Diff for /embedaddon/sudo/plugins/sudoers/gram.c between versions 1.1 and 1.1.1.4

version 1.1, 2012/02/21 16:23:02 version 1.1.1.4, 2013/07/22 10:46:12
Line 9 Line 9
 #define yyclearin (yychar=(YYEMPTY))  #define yyclearin (yychar=(YYEMPTY))
 #define yyerrok (yyerrflag=0)  #define yyerrok (yyerrflag=0)
 #define YYRECOVERING() (yyerrflag!=0)  #define YYRECOVERING() (yyerrflag!=0)
#define YYPREFIX "yy"#define yyparse sudoersparse
 #define yylex sudoerslex
 #define yyerror sudoerserror
 #define yychar sudoerschar
 #define yyval sudoersval
 #define yylval sudoerslval
 #define yydebug sudoersdebug
 #define yynerrs sudoersnerrs
 #define yyerrflag sudoerserrflag
 #define yyss sudoersss
 #define yysslim sudoerssslim
 #define yyssp sudoersssp
 #define yyvs sudoersvs
 #define yyvsp sudoersvsp
 #define yystacksize sudoersstacksize
 #define yylhs sudoerslhs
 #define yylen sudoerslen
 #define yydefred sudoersdefred
 #define yydgoto sudoersdgoto
 #define yysindex sudoerssindex
 #define yyrindex sudoersrindex
 #define yygindex sudoersgindex
 #define yytable sudoerstable
 #define yycheck sudoerscheck
 #define yyname sudoersname
 #define yyrule sudoersrule
 #define YYPREFIX "sudoers"
 #line 2 "gram.y"  #line 2 "gram.y"
 /*  /*
 * Copyright (c) 1996, 1998-2005, 2007-2011 * Copyright (c) 1996, 1998-2005, 2007-2013
  *      Todd C. Miller <Todd.Miller@courtesan.com>   *      Todd C. Miller <Todd.Miller@courtesan.com>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
Line 37 Line 63
 #include <config.h>  #include <config.h>
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/param.h>  
 #include <stdio.h>  #include <stdio.h>
 #ifdef STDC_HEADERS  #ifdef STDC_HEADERS
 # include <stdlib.h>  # include <stdlib.h>
Line 56 Line 81
 #ifdef HAVE_UNISTD_H  #ifdef HAVE_UNISTD_H
 # include <unistd.h>  # include <unistd.h>
 #endif /* HAVE_UNISTD_H */  #endif /* HAVE_UNISTD_H */
   #ifdef HAVE_INTTYPES_H
   # include <inttypes.h>
   #endif
 #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)  #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
 # include <alloca.h>  # include <alloca.h>
 #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */  #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */
Line 82 Line 110
  * Globals   * Globals
  */   */
 extern int sudolineno;  extern int sudolineno;
   extern int last_token;
 extern char *sudoers;  extern char *sudoers;
static int verbose = FALSE;bool sudoers_warnings = true;
int parse_error = FALSE;bool parse_error = false;
int pedantic = FALSE; 
 int errorlineno = -1;  int errorlineno = -1;
 char *errorfile = NULL;  char *errorfile = NULL;
   
Line 99  static void  add_defaults(int, struct member *, struct Line 127  static void  add_defaults(int, struct member *, struct
 static void  add_userspec(struct member *, struct privilege *);  static void  add_userspec(struct member *, struct privilege *);
 static struct defaults *new_default(char *, char *, int);  static struct defaults *new_default(char *, char *, int);
 static struct member *new_member(char *, int);  static struct member *new_member(char *, int);
       void  yyerror(const char *);static struct sudo_digest *new_digest(int, const char *);
#line 95 "gram.y"
void 
yyerror(const char *s) 
{ 
    /* Save the line the first error occurred on. */ 
    if (errorlineno == -1) { 
        errorlineno = sudolineno ? sudolineno - 1 : 0; 
        errorfile = estrdup(sudoers); 
    } 
    if (trace_print != NULL) { 
        LEXTRACE("<*> "); 
    } else if (verbose && s != NULL) { 
        warningx(_(">>> %s: %s near line %d <<<"), sudoers, s, 
            sudolineno ? sudolineno - 1 : 0); 
    } 
    parse_error = TRUE; 
} 
#line 110 "gram.y" 
 #ifndef YYSTYPE_DEFINED  #ifndef YYSTYPE_DEFINED
 #define YYSTYPE_DEFINED  #define YYSTYPE_DEFINED
 typedef union {  typedef union {
Line 126  typedef union { Line 137  typedef union {
     struct member *member;      struct member *member;
     struct runascontainer *runas;      struct runascontainer *runas;
     struct privilege *privilege;      struct privilege *privilege;
       struct sudo_digest *digest;
     struct sudo_command command;      struct sudo_command command;
     struct cmndtag tag;      struct cmndtag tag;
     struct selinux_info seinfo;      struct selinux_info seinfo;
       struct solaris_privs_info privinfo;
     char *string;      char *string;
     int tok;      int tok;
 } YYSTYPE;  } YYSTYPE;
 #endif /* YYSTYPE_DEFINED */  #endif /* YYSTYPE_DEFINED */
#line 136 "y.tab.c"#line 149 "gram.c"
 #define COMMAND 257  #define COMMAND 257
 #define ALIAS 258  #define ALIAS 258
 #define DEFVAR 259  #define DEFVAR 259
Line 141  typedef union { Line 154  typedef union {
 #define NETGROUP 261  #define NETGROUP 261
 #define USERGROUP 262  #define USERGROUP 262
 #define WORD 263  #define WORD 263
#define DEFAULTS 264#define DIGEST 264
#define DEFAULTS_HOST 265#define DEFAULTS 265
#define DEFAULTS_USER 266#define DEFAULTS_HOST 266
#define DEFAULTS_RUNAS 267#define DEFAULTS_USER 267
#define DEFAULTS_CMND 268#define DEFAULTS_RUNAS 268
#define NOPASSWD 269#define DEFAULTS_CMND 269
#define PASSWD 270#define NOPASSWD 270
#define NOEXEC 271#define PASSWD 271
#define EXEC 272#define NOEXEC 272
#define SETENV 273#define EXEC 273
#define NOSETENV 274#define SETENV 274
#define LOG_INPUT 275#define NOSETENV 275
#define NOLOG_INPUT 276#define LOG_INPUT 276
#define LOG_OUTPUT 277#define NOLOG_INPUT 277
#define NOLOG_OUTPUT 278#define LOG_OUTPUT 278
#define ALL 279#define NOLOG_OUTPUT 279
#define COMMENT 280#define ALL 280
#define HOSTALIAS 281#define COMMENT 281
#define CMNDALIAS 282#define HOSTALIAS 282
#define USERALIAS 283#define CMNDALIAS 283
#define RUNASALIAS 284#define USERALIAS 284
#define ERROR 285#define RUNASALIAS 285
#define TYPE 286#define ERROR 286
#define ROLE 287#define TYPE 287
 #define ROLE 288
 #define PRIVS 289
 #define LIMITPRIVS 290
 #define MYSELF 291
 #define SHA224 292
 #define SHA256 293
 #define SHA384 294
 #define SHA512 295
 #define YYERRCODE 256  #define YYERRCODE 256
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yylhs[] =const short sudoerslhs[] =
 #else  #else
short yylhs[] =short sudoerslhs[] =
 #endif  #endif
         {                                        -1,          {                                        -1,
    0,    0,   25,   25,   26,   26,   26,   26,   26,   26,    0,    0,   30,   30,   31,   31,   31,   31,   31,   31,
   26,   26,   26,   26,   26,   26,    4,    4,    3,    3,   31,   31,   31,   31,   31,   31,    4,    4,    3,    3,
    3,    3,    3,   20,   20,   19,   10,   10,    8,    8,    3,    3,    3,   21,   21,   20,   11,   11,    9,    9,
    8,    8,    8,    2,    2,    1,    6,    6,   23,   24,    9,    9,    9,    2,    2,    1,   29,   29,   29,   29,
   22,   22,   22,   22,   22,   17,   17,   18,   18,   18,    7,    7,    6,    6,   24,   25,   23,   23,   23,   23,
   21,   21,   21,   21,   21,   21,   21,   21,   21,   21,   23,   27,   28,   26,   26,   26,   26,   26,   18,   18,
   21,    5,    5,    5,   28,   28,   31,    9,    9,   29,   19,   19,   19,   19,   19,   22,   22,   22,   22,   22,
   29,   32,    7,    7,   30,   30,   33,   27,   27,   34,   22,   22,   22,   22,   22,   22,    5,    5,    5,   33,
   13,   13,   11,   11,   12,   12,   12,   12,   12,   16,   33,   36,   10,   10,   34,   34,   37,    8,    8,   35,
   16,   14,   14,   15,   15,   15,   35,   38,   32,   32,   39,   14,   14,   12,   12,   13,
    13,   13,   13,   13,   17,   17,   15,   15,   16,   16,
    16,
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yylen[] =const short sudoerslen[] =
 #else  #else
short yylen[] =short sudoerslen[] =
 #endif  #endif
         {                                         2,          {                                         2,
     0,    1,    1,    2,    1,    2,    2,    2,    2,    2,      0,    1,    1,    2,    1,    2,    2,    2,    2,    2,
     2,    2,    3,    3,    3,    3,    1,    3,    1,    2,      2,    2,    3,    3,    3,    3,    1,    3,    1,    2,
     3,    3,    3,    1,    3,    3,    1,    2,    1,    1,      3,    3,    3,    1,    3,    3,    1,    2,    1,    1,
    1,    1,    1,    1,    3,    4,    1,    2,    3,    3,    1,    1,    1,    1,    3,    5,    3,    3,    3,    3,
    0,    1,    1,    2,    2,    0,    3,    1,    3,    2,    1,    2,    1,    2,    3,    3,    0,    1,    1,    2,
    0,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    3,    3,    0,    1,    1,    2,    2,    0,    3,
    2,    1,    1,    1,    1,    3,    3,    1,    3,    1,    0,    1,    3,    2,    1,    0,    2,    2,    2,    2,
    3,    3,    1,    3,    1,    3,    3,    1,    3,    3,    2,    2,    2,    2,    2,    2,    1,    1,    1,    1,
    1,    3,    1,    2,    1,    1,    1,    1,    1,    1,    3,    3,    1,    3,    1,    3,    3,    1,    3,    1,
    3,    1,    2,    1,    1,    1,    3,    3,    1,    3,    3,    1,    3,    1,    2,    1,
     1,    1,    1,    1,    1,    3,    1,    2,    1,    1,
     1,
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yydefred[] =const short sudoersdefred[] =
 #else  #else
short yydefred[] =short sudoersdefred[] =
 #endif  #endif
         {                                      0,          {                                      0,
    0,   85,   87,   88,   89,    0,    0,    0,    0,    0,    0,  100,  102,  103,  104,    0,    0,    0,    0,    0,
   86,    5,    0,    0,    0,    0,    0,    0,   81,   83,  101,    5,    0,    0,    0,    0,    0,    0,   96,   98,
     0,    0,    3,    6,    0,    0,   17,    0,   29,   32,      0,    0,    3,    6,    0,    0,   17,    0,   29,   32,
   31,   33,   30,    0,   27,    0,   68,    0,    0,   64,   31,   33,   30,    0,   27,    0,   83,    0,    0,   79,
   63,   62,    0,   37,   73,    0,    0,    0,   65,    0,   78,   77,    0,    0,    0,    0,    0,   43,   41,   88,
    0,   70,    0,    0,   78,    0,    0,   75,   84,    0,    0,    0,    0,    0,   80,    0,    0,   85,    0,    0,
    0,   24,    0,    4,    0,    0,    0,   20,    0,   28,   93,    0,    0,   90,   99,    0,    0,   24,    0,    4,
    0,    0,    0,    0,   38,    0,    0,    0,    0,    0,    0,    0,    0,   20,    0,   28,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   82,    0,    0,   21,   22,   44,    0,    0,    0,    0,    0,    0,   42,    0,    0,
   23,   18,   69,   74,    0,   66,    0,   71,    0,   79,    0,    0,    0,    0,    0,    0,   97,    0,    0,   21,
    0,   76,    0,   34,    0,    0,   25,    0,    0,    0,   22,   23,   18,   84,   37,   38,   39,   40,   89,    0,
    0,    0,    0,   51,    0,    0,   94,   96,   95,    0,   81,    0,   86,    0,   94,    0,   91,    0,   34,    0,
   90,   92,    0,    0,   47,   35,    0,    0,    0,   44,    0,   25,    0,    0,    0,    0,    0,    0,    0,    0,
   45,   93,    0,    0,   40,   39,   52,   53,   54,   55,    0,  109,  111,  110,    0,  105,  107,    0,    0,   60,
   56,   57,   58,   59,   60,   61,   36,   91,   35,    0,    0,    0,    0,   66,    0,    0,   50,   51,
   108,    0,    0,   46,   45,    0,    0,    0,   57,   58,
   106,   52,   53,   67,   68,   69,   70,   71,   72,   73,
    74,   75,   76,   36,
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yydgoto[] =const short sudoersdgoto[] =
 #else  #else
short yydgoto[] =short sudoersdgoto[] =
 #endif  #endif
         {                                      18,          {                                      18,
  104,  105,   27,   28,   44,   45,   46,   35,   61,   37,  119,  120,   27,   28,   48,   49,   50,   51,   35,   67,
   19,   20,   21,  121,  122,  123,  106,  110,   62,   63,   37,   19,   20,   21,  136,  137,  138,  121,  125,   68,
  129,  114,  115,  116,   22,   23,   54,   48,   51,   57,   69,  158,  129,  130,  131,  146,  147,  148,   52,   22,
   49,   52,   58,   55,   23,   60,   54,   57,   63,   55,   58,   64,   61,
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yysindex[] =const short sudoerssindex[] =
 #else  #else
short yysindex[] =short sudoerssindex[] =
 #endif  #endif
        {                                    475,        {                                    -33,
 -270,    0,    0,    0,    0,  -29,  567,  594,  594,   -2, -277,    0,    0,    0,    0,  -13,   75,  105,  105,  -15,
    0,    0, -240, -222, -216, -212, -241,    0,    0,    0,    0,    0, -246, -241, -217, -210, -226,    0,    0,    0,
  -25,  475,    0,    0,  -10, -207,    0,    9,    0,    0,   -5,  -33,    0,    0,   -3, -244,    0,    5,    0,    0,
    0,    0,    0, -235,    0,  -33,    0,  -31,  -31,    0,    0,    0,    0, -237,    0,  -28,    0,  -19,  -19,    0,
    0,    0, -242,    0,    0,  -30,   -7,    3,    0,   -6,    0,    0, -251,   -7,   -1,    4,    7,    0,    0,    0,
    4,    0,   -5,    6,    0,   -1,    8,    0,    0,  594,  -14,  -20,   -2,    8,    0,    6,   11,    0,    9,   13,
  -20,    0,   10,    0, -205, -196, -194,    0,  -29,    0,    0,   12,   14,    0,    0,  105,  -11,    0,   18,    0,
  567,    9,    9,    9,    0,   -2,    9,  567, -240,   -2, -203, -200, -188,    0,  -13,    0,   75,    5,    5,    5,
 -222,  594, -216,  594, -212,    0,   31,  567,    0,    0,    0, -187, -185, -184, -183,  -15,    5,    0,   75, -246,
    0,    0,    0,    0,   26,    0,   28,    0,   29,    0,  -15, -241,  105, -217,  105, -210,    0,   42,   75,    0,
   29,    0,  541,    0,   32, -247,    0,   86,  -15,   33,    0,    0,    0,    0,    0,    0,    0,    0,    0,   39,
   31,   14,   16,    0, -208, -204,    0,    0,    0, -231,    0,   40,    0,   43,    0,   43,    0,   45,    0,   44,
    0,    0,   38,   86,    0,    0, -179, -178,  491,    0, -279,    0,  135,   -6,   49,   42,   25,   32, -243, -195,
    0,    0,   86,   38,    0,    0,    0,    0,    0,    0, -192,    0,    0,    0, -236,    0,    0,   54,  135,    0,
    0,    0,    0,    0,    0,    0,    0,    0,};    0, -164, -163,   41,   46,    0, -189, -180,    0,    0,
     0,  135,   54,    0,    0, -159, -158,  585,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,};
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yyrindex[] =const short sudoersrindex[] =
 #else  #else
short yyrindex[] =short sudoersrindex[] =
 #endif  #endif
        {                                     87,        {                                    106,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,   90,    0,    0,    1,    0,    0,  177,    0,    0,    0,  110,    0,    0,    1,    0,    0,  181,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,  207,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  237,    0,    0,  271,    0,    0,  300,    0,    0,    0,    0,    0,    0,  211,    0,    0,  241,    0,    0,  271,
    0,    0,  329,    0,    0,    0,    0,    0,    0,    0,    0,    0,  301,    0,    0,    0,    0,    0,  331,    0,
    0,  358,  387,  417,    0,    0,  446,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,  361,  391,  421,
    0,    0,    0,    0,    0,    0,  -26,    0,    0,    0,    0,    0,    0,    0,    0,    0,  451,    0,    0,    0,
    0,    0,    0,    0,   30,    0,   59,    0,   89,    0,    0,    0,    0,    0,    0,    0,    0,  467,    0,    0,
  118,    0,    0,    0,  148,  514,    0,    0,   45,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   31,
  -26,    0,    0,    0,  537,  565,    0,    0,    0,    0,    0,   61,    0,   91,    0,  121,    0,   70,    0,  151,
    0,    0,   50,    0,    0,    0,    0,    0,    0,    0,  495,    0,   71,   72,    0,  467,    0,    0,  615,  525,
    0,    0,    0,   52,    0,    0,    0,    0,    0,    0,  555,    0,    0,    0,    0,    0,    0,   73,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,};    0,    0,    0,    0,    0,    0,  645,  675,    0,    0,
     0,    0,   74,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,};
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yygindex[] =const short sudoersgindex[] =
 #else  #else
short yygindex[] =short sudoersgindex[] =
 #endif  #endif
         {                                      0,          {                                      0,
  -17,    0,   27,   11,   54,  -64,   15,   64,    2,   34,  -10,    0,   47,   17,   80,   65,  -84,   27,   92,   -4,
   39,   84,   -3,  -27,  -18,  -21,    0,    0,   19,    0,   48,   62,  112,    2,  -25,   10,   -9,    0,    0,   33,
    0,    0,  -12,   -4,    0,   88,    0,    0,    0,    0,    0,    0,    0,    3,   16,    0,  -17,  -12,    0,    0,
   35,   40,   23,   37,  111,    0,    0,    0,    0,   50,   51,   52,   53,
 };  };
#define YYTABLESIZE 873#define YYTABLESIZE 970
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yytable[] =const short sudoerstable[] =
 #else  #else
short yytable[] =short sudoerstable[] =
 #endif  #endif
        {                                      26,        {                                      17,
   19,   26,   26,   26,   38,   39,   46,   34,   36,   24,   19,  109,   36,   24,   26,   40,   41,  127,  128,   38,
   71,   94,   60,   76,   40,   41,    2,   47,   60,    3,   39,   53,   43,   26,   74,   77,   56,   43,   26,   26,
    4,    5,   29,   71,   30,   31,  117,   32,   60,   67,   29,  132,   30,   31,   66,   32,  133,   34,   42,   86,
   43,  118,   66,   19,   67,   50,   42,   11,  112,  113,   82,    2,   77,   19,    3,    4,    5,   66,   66,   72,
   87,   53,  124,   33,   19,   56,   72,  119,   73,   74,   59,   73,   33,  134,   19,  144,  145,   62,   75,   98,
   65,   68,   69,   78,   80,   82,   77,   89,   72,   84,   82,  139,   78,   11,   79,   80,   83,   71,   89,  100,
   79,   81,   67,   83,  147,   85,   90,   88,   91,   71,   87,   84,  101,   82,   85,   90,   91,   87,   92,   93,
  103,   76,   60,  125,  127,  111,  128,  112,   99,   95,   94,   96,   95,  174,  102,   99,  105,   17,  106,  107,
  101,  133,  113,  135,  136,   48,    1,   67,   80,    2,  108,  118,   77,   86,  110,  142,   66,  126,   82,  140,
   50,   72,   49,  126,   97,   92,   75,   70,   86,  109,   95,  127,  143,   87,  114,  128,  116,  152,  154,  155,
   59,  132,  134,  131,   93,  148,  107,  102,    0,   64,  145,  156,  123,  162,  163,    1,  157,   34,  144,    2,
  130,    0,    0,   96,    0,    0,   72,   77,  120,  100,   61,   65,   62,   64,   63,  141,   88,  112,   87,  124,
   98,   80,    0,    0,    0,    0,    0,    0,    0,    0,   92,  103,   81,   95,  104,   76,  161,   97,   65,  153,
   160,  122,   70,  150,  159,    0,    0,   17,    0,  111,
     0,    0,  113,    0,  151,  149,  115,  117,   95,    0,
    26,    0,    0,   92,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,  135,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,   92,    0,
    12,    0,    0,   26,    0,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,   80,   26,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   26,    0,
   77,    0,    0,    0,    0,    0,    0,    0,    0,    0,    9,    0,    0,   12,    0,    0,    0,    0,    0,    0,
     0,    0,    1,    0,    2,    0,    0,    3,    4,    5,
    25,    6,    7,    8,    9,   10,   40,   41,    0,   25,
    10,   40,   41,    9,   25,   25,   11,   12,   13,   14,
    15,   16,   29,    0,   30,   31,   19,   32,   19,   42,
     0,   19,   19,   19,   42,   19,   19,   19,   19,   19,
     8,    0,    0,   10,   33,    0,   44,   45,   46,   47,
    19,   19,   19,   19,   19,   19,   82,    0,   82,    0,
     0,   82,   82,   82,    0,   82,   82,   82,   82,   82,
    11,    0,    2,    8,    0,    3,    4,    5,    0,    0,
    82,   82,   82,   82,   82,   82,   87,    0,   87,    0,
     0,   87,   87,   87,   11,   87,   87,   87,   87,   87,
     7,    0,   29,   11,   30,   31,    0,   32,    0,    0,
    87,   87,   87,   87,   87,   87,   95,    0,   95,    0,
     0,   95,   95,   95,   33,   95,   95,   95,   95,   95,
    15,    0,    2,    7,    0,    3,    4,    5,    0,    0,
    95,   95,   95,   95,   95,   95,   92,    0,   92,    0,
     0,   92,   92,   92,   11,   92,   92,   92,   92,   92,
    13,    0,  132,   15,    0,    0,    0,  133,    0,    0,
    92,   92,   92,   92,   92,   92,   26,    0,   26,    0,
     0,   26,   26,   26,  134,   26,   26,   26,   26,   26,
    14,    0,    0,   13,    0,    0,    0,    0,    0,    0,
    26,   26,   26,   26,   26,   26,   12,    0,   12,    0,
     0,   12,   12,   12,    0,   12,   12,   12,   12,   12,
    16,    0,    0,   14,    0,    0,    0,    0,    0,    0,
    12,   12,   12,   12,   12,   12,    9,    0,    9,    0,
     0,    9,    9,    9,    0,    9,    9,    9,    9,    9,
     0,    0,    0,   16,    0,    0,    0,    0,    0,    0,
     9,    9,    9,    9,    9,    9,   10,    0,   10,   59,
     0,   10,   10,   10,    0,   10,   10,   10,   10,   10,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   77,   12,    0,    0,    0,   10,   10,   10,   10,   10,   10,    8,   47,    8,    0,
   26,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    8,    8,    8,    0,    8,    8,    8,    8,    8,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   26,    9,    0,    0,   12,    8,    8,    8,    8,    8,    8,   11,   48,   11,    0,
     0,   11,   11,   11,    0,   11,   11,   11,   11,   11,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   25,    0,   25,   25,   25,   11,   11,   11,   11,   11,   11,    7,   49,    7,    0,
   46,   46,   29,    0,   30,   31,   10,   32,    0,    9,    0,    7,    7,    7,    0,    7,    7,    7,    7,    7,
    0,    0,   46,   46,   46,   46,   46,   46,   46,   46, 
   46,   46,   46,   33,   40,   41,   19,    0,   19,   46, 
   46,   19,   19,   19,   19,   19,   19,   19,   19,   10, 
    8,    0,    0,    0,    0,    0,   42,    0,    0,   19, 
   19,   19,   19,   19,   19,   67,    0,   67,    0,    0, 
   67,   67,   67,   67,   67,   67,   67,   67,    0,   11, 
    0,    0,    0,    8,    0,    0,    0,    0,   67,   67, 
   67,   67,   67,   67,   72,    0,   72,    0,    0,   72, 
   72,   72,   72,   72,   72,   72,   72,    0,    7,    0, 
    0,    0,   11,    0,    0,    0,    0,   72,   72,   72, 
   72,   72,   72,  117,   80,    0,   80,    0,  118,   80, 
   80,   80,   80,   80,   80,   80,   80,   15,    0,    0, 
    0,    7,    0,    0,  119,    0,    0,   80,   80,   80, 
   80,   80,   80,   77,    0,   77,    0,    0,   77,   77, 
   77,   77,   77,   77,   77,   77,   13,    0,    0,    0, 
   15,    0,    0,    0,    0,    0,   77,   77,   77,   77, 
   77,   77,    0,   26,    0,   26,    0,    0,   26,   26, 
   26,   26,   26,   26,   26,   26,   14,    0,    0,   13, 
    0,    0,    0,    0,    0,    0,   26,   26,   26,   26, 
   26,   26,   12,    0,   12,    0,    0,   12,   12,   12, 
   12,   12,   12,   12,   12,   16,    0,    0,    0,   14, 
    0,    0,    0,    0,    0,   12,   12,   12,   12,   12, 
   12,    0,    9,    0,    9,    0,    0,    9,    9,    9, 
    9,    9,    9,    9,    9,    0,    0,    0,   16,    0, 
    0,    0,    0,    0,    0,    9,    9,    9,    9,    9, 
    9,    0,   10,    0,   10,    0,    0,   10,   10,   10, 
   10,   10,   10,   10,   10,    0,    0,   17,    0,    0, 
    0,    0,    0,    0,    0,   10,   10,   10,   10,   10, 
   10,    0,    0,   43,    0,    0,    8,    0,    8,    0, 
    0,    8,    8,    8,    8,    8,    8,    8,    8,    0, 
    0,    0,    0,    0,    0,    0,   41,    0,    0,    8, 
    8,    8,    8,    8,    8,   11,    0,   11,    0,    0, 
   11,   11,   11,   11,   11,   11,   11,   11,    0,   42, 
    0,    0,    0,   17,    0,    0,    0,    0,   11,   11, 
   11,   11,   11,   11,    7,    0,    7,    0,    0,    7, 
    7,    7,    7,    7,    7,    7,    7,   43,  108,   34, 
    0,    0,    0,    0,    0,    0,    0,    7,    7,    7, 
    7,    7,    7,   15,    0,   15,    0,    0,   15,   15, 
   15,   15,   15,   15,   15,   15,   17,    0,    0,    0, 
    0,    0,    0,    0,    0,    0,   15,   15,   15,   15, 
   15,   15,   13,    0,   13,    0,    0,   13,   13,   13, 
   13,   13,   13,   13,   13,    0,    0,    0,    0,    0, 
    0,    0,    0,    0,    0,   13,   13,   13,   13,   13, 
   13,    0,   14,    0,   14,    0,    0,   14,   14,   14, 
   14,   14,   14,   14,   14,    0,    0,    0,    0,    0, 
    0,    0,    0,    0,    0,   14,   14,   14,   14,   14, 
   14,   16,    0,   16,    0,    0,   16,   16,   16,   16, 
   16,   16,   16,   16,    0,    0,    0,    0,    0,    0, 
    0,    0,    0,    0,   16,   16,   16,   16,   16,   16, 
    1,    0,    2,    0,    0,    3,    4,    5,    6,    7, 
    8,    9,   10,    0,    0,    0,    0,   40,   41,    0, 
    0,    0,    0,   11,   12,   13,   14,   15,   16,  137, 
  138,  139,  140,  141,  142,  143,  144,  145,  146,   42, 
   41,   41,    0,    0,    0,    0,    0,    0,    0,    0, 
    0,    0,   41,   41,   41,   41,   41,   41,   41,   41, 
   41,   41,   41,   42,   42,    0,    0,    0,    2,    0, 
    0,    3,    4,    5,    0,   42,   42,   42,   42,   42, 
   42,   42,   42,   42,   42,   42,    0,    0,    0,   11, 
    0,   43,   43,    0,   29,    0,   30,   31,    0,   32, 
    0,    0,    0,   43,   43,   43,   43,   43,   43,   43, 
   43,   43,   43,   43,    0,   33,    0,    0,    0,    0, 
    0,    2,    0,    0,    3,    4,    5,    0,    0,    0, 
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,   11,    7,    7,    7,    7,    7,    7,   15,   43,   15,    0,
     0,   15,   15,   15,    0,   15,   15,   15,   15,   15,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    15,   15,   15,   15,   15,   15,   13,   54,   13,    0,
     0,   13,   13,   13,    0,   13,   13,   13,   13,   13,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    13,   13,   13,   13,   13,   13,   14,   55,   14,    0,
     0,   14,   14,   14,    0,   14,   14,   14,   14,   14,
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    14,   14,   14,   14,   14,   14,   16,   56,   16,    0,
     0,   16,   16,   16,    0,   16,   16,   16,   16,   16,
     0,    0,    0,   59,   59,    0,    0,    0,    0,    0,
    16,   16,   16,   16,   16,   16,   59,   59,   59,   59,
    59,   59,   59,   59,   59,   59,   59,    0,    0,    0,
     0,   47,   47,   59,   59,   59,   59,    0,   59,   59,
    59,   59,    0,    0,   47,   47,   47,   47,   47,   47,
    47,   47,   47,   47,   47,    0,    0,    0,    0,    0,
     0,   48,   48,   47,   47,    0,   47,   47,   47,   47,
     0,    0,    0,    0,   48,   48,   48,   48,   48,   48,
    48,   48,   48,   48,   48,    0,    0,    0,    0,    0,
     0,   49,   49,   48,   48,    0,   48,   48,   48,   48,
     0,    0,    0,    0,   49,   49,   49,   49,   49,   49,
    49,   49,   49,   49,   49,    0,    0,    0,    0,    0,
     0,   40,   41,   49,   49,    0,   49,   49,   49,   49,
     0,    0,    0,    0,  164,  165,  166,  167,  168,  169,
   170,  171,  172,  173,   42,    0,    0,    0,    0,    0,
     0,   54,   54,    0,    0,    0,   44,   45,   46,   47,
     0,    0,    0,    0,   54,   54,   54,   54,   54,   54,
    54,   54,   54,   54,   54,    0,    0,    0,    0,    0,
     0,   55,   55,    0,    0,    0,   54,   54,   54,   54,
     0,    0,    0,    0,   55,   55,   55,   55,   55,   55,
    55,   55,   55,   55,   55,    0,    0,    0,    0,    0,
     0,   56,   56,    0,    0,    0,   55,   55,   55,   55,
     0,    0,    0,    0,   56,   56,   56,   56,   56,   56,
    56,   56,   56,   56,   56,    0,    0,    0,    0,    0,
     0,    0,    0,    0,    0,    0,   56,   56,   56,   56,
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const short yycheck[] =const short sudoerscheck[] =
 #else  #else
short yycheck[] =short sudoerscheck[] =
 #endif  #endif
         {                                      33,          {                                      33,
    0,   33,   33,   33,    8,    9,   33,   33,    7,  280,    0,   86,    7,  281,   33,  257,  258,  287,  288,    8,
   44,   76,   44,   44,  257,  258,  258,  258,   44,  261,    9,  258,   33,   33,  259,   44,  258,   33,   33,   33,
  262,  263,  258,   44,  260,  261,  258,  263,   44,    0,  258,  258,  260,  261,   44,  263,  263,   33,  280,   44,
   33,  263,   43,   33,   45,  258,  279,  279,  286,  287,    0,  258,   44,   33,  261,  262,  263,   44,   44,   43,
   61,  258,   58,  279,   44,  258,   36,  279,   38,   39,  258,   45,  280,  280,   44,  289,  290,  258,   44,   61,
   61,  259,   44,   61,   61,   61,   46,  263,    0,   61,   58,   58,   36,  280,   38,   39,   58,   61,   61,  263,
   58,   58,   33,   58,  129,   58,  263,   58,  263,   44,    0,   58,  263,   33,   58,   58,   61,   51,   58,   61,
   40,   44,   44,   41,   61,   44,   61,  286,   82,   78,   58,   58,   61,  158,  263,   58,  264,   33,  264,  264,
   84,   44,  287,  263,  263,   41,    0,   58,    0,    0,  264,   40,   44,   44,   89,   61,   44,   44,   58,   41,
   41,   33,   41,  111,   80,   69,   43,   34,   60,  103,    0,  287,   61,   33,   93,  288,   95,   44,  263,  263,
   17,  120,  124,  116,   71,  133,   88,   85,   -1,   22,  290,   61,   58,  263,  263,    0,   61,   33,  289,    0,
  115,   -1,   -1,   79,   -1,   -1,   58,    0,   33,   83,   41,   41,   41,   41,   41,  126,   52,   91,   58,  118,
   81,   33,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,    0,   75,   43,   33,   77,   34,  152,   66,   17,  139,
   148,   99,   22,  131,  147,   -1,   -1,   33,   -1,   90,
    -1,   -1,   92,   -1,  135,  130,   94,   96,   58,   -1,
     0,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
    -1,   -1,   -1,   -1,   -1,   -1,   -1,   33,   -1,   -1,
    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   58,   -1,
     0,   -1,   -1,   33,   -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,   58,    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   58,   -1,
   33,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,    0,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
    -1,   -1,  256,   -1,  258,   -1,   -1,  261,  262,  263,
   259,  265,  266,  267,  268,  269,  257,  258,   -1,  259,
     0,  257,  258,   33,  259,  259,  280,  281,  282,  283,
   284,  285,  258,   -1,  260,  261,  256,  263,  258,  280,
    -1,  261,  262,  263,  280,  265,  266,  267,  268,  269,
     0,   -1,   -1,   33,  280,   -1,  292,  293,  294,  295,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
     0,   -1,  258,   33,   -1,  261,  262,  263,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,  280,  265,  266,  267,  268,  269,
     0,   -1,  258,   33,  260,  261,   -1,  263,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,  280,  265,  266,  267,  268,  269,
     0,   -1,  258,   33,   -1,  261,  262,  263,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,  280,  265,  266,  267,  268,  269,
     0,   -1,  258,   33,   -1,   -1,   -1,  263,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,  280,  265,  266,  267,  268,  269,
     0,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
     0,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   -1,  258,   33,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -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,   58,    0,   -1,   -1,   -1,  280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
   33,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -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,   58,    0,   -1,   -1,   33,  280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -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,  259,   -1,  259,  259,  259,  280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
  257,  258,  258,   -1,  260,  261,    0,  263,   -1,   33,   -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
   -1,   -1,  269,  270,  271,  272,  273,  274,  275,  276, 
  277,  278,  279,  279,  257,  258,  256,   -1,  258,  286, 
  287,  261,  262,  263,  264,  265,  266,  267,  268,   33, 
    0,   -1,   -1,   -1,   -1,   -1,  279,   -1,   -1,  279, 
  280,  281,  282,  283,  284,  256,   -1,  258,   -1,   -1, 
  261,  262,  263,  264,  265,  266,  267,  268,   -1,    0, 
   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,  279,  280, 
  281,  282,  283,  284,  256,   -1,  258,   -1,   -1,  261, 
  262,  263,  264,  265,  266,  267,  268,   -1,    0,   -1, 
   -1,   -1,   33,   -1,   -1,   -1,   -1,  279,  280,  281, 
  282,  283,  284,  258,  256,   -1,  258,   -1,  263,  261, 
  262,  263,  264,  265,  266,  267,  268,    0,   -1,   -1, 
   -1,   33,   -1,   -1,  279,   -1,   -1,  279,  280,  281, 
  282,  283,  284,  256,   -1,  258,   -1,   -1,  261,  262, 
  263,  264,  265,  266,  267,  268,    0,   -1,   -1,   -1, 
   33,   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282, 
  283,  284,   -1,  256,   -1,  258,   -1,   -1,  261,  262, 
  263,  264,  265,  266,  267,  268,    0,   -1,   -1,   33, 
   -1,   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282, 
  283,  284,  256,   -1,  258,   -1,   -1,  261,  262,  263, 
  264,  265,  266,  267,  268,    0,   -1,   -1,   -1,   33, 
   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283, 
  284,   -1,  256,   -1,  258,   -1,   -1,  261,  262,  263, 
  264,  265,  266,  267,  268,   -1,   -1,   -1,   33,   -1, 
   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283, 
  284,   -1,  256,   -1,  258,   -1,   -1,  261,  262,  263, 
  264,  265,  266,  267,  268,   -1,   -1,   33,   -1,   -1, 
   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283, 
  284,   -1,   -1,   33,   -1,   -1,  256,   -1,  258,   -1, 
   -1,  261,  262,  263,  264,  265,  266,  267,  268,   -1, 
   -1,   -1,   -1,   -1,   -1,   -1,   33,   -1,   -1,  279, 
  280,  281,  282,  283,  284,  256,   -1,  258,   -1,   -1, 
  261,  262,  263,  264,  265,  266,  267,  268,   -1,   33, 
   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,  279,  280, 
  281,  282,  283,  284,  256,   -1,  258,   -1,   -1,  261, 
  262,  263,  264,  265,  266,  267,  268,   33,   58,   33, 
   -1,   -1,   -1,   -1,   -1,   -1,   -1,  279,  280,  281, 
  282,  283,  284,  256,   -1,  258,   -1,   -1,  261,  262, 
  263,  264,  265,  266,  267,  268,   33,   -1,   -1,   -1, 
   -1,   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282, 
  283,  284,  256,   -1,  258,   -1,   -1,  261,  262,  263, 
  264,  265,  266,  267,  268,   -1,   -1,   -1,   -1,   -1, 
   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283, 
  284,   -1,  256,   -1,  258,   -1,   -1,  261,  262,  263, 
  264,  265,  266,  267,  268,   -1,   -1,   -1,   -1,   -1, 
   -1,   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283, 
  284,  256,   -1,  258,   -1,   -1,  261,  262,  263,  264, 
  265,  266,  267,  268,   -1,   -1,   -1,   -1,   -1,   -1, 
   -1,   -1,   -1,   -1,  279,  280,  281,  282,  283,  284, 
  256,   -1,  258,   -1,   -1,  261,  262,  263,  264,  265, 
  266,  267,  268,   -1,   -1,   -1,   -1,  257,  258,   -1, 
   -1,   -1,   -1,  279,  280,  281,  282,  283,  284,  269, 
  270,  271,  272,  273,  274,  275,  276,  277,  278,  279, 
  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1, 
   -1,   -1,  269,  270,  271,  272,  273,  274,  275,  276, 
  277,  278,  279,  257,  258,   -1,   -1,   -1,  258,   -1, 
   -1,  261,  262,  263,   -1,  269,  270,  271,  272,  273, 
  274,  275,  276,  277,  278,  279,   -1,   -1,   -1,  279, 
   -1,  257,  258,   -1,  258,   -1,  260,  261,   -1,  263, 
   -1,   -1,   -1,  269,  270,  271,  272,  273,  274,  275, 
  276,  277,  278,  279,   -1,  279,   -1,   -1,   -1,   -1, 
   -1,  258,   -1,   -1,  261,  262,  263,   -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,  279,  280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  256,   33,  258,   -1,
    -1,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    -1,   -1,   -1,  257,  258,   -1,   -1,   -1,   -1,   -1,
   280,  281,  282,  283,  284,  285,  270,  271,  272,  273,
   274,  275,  276,  277,  278,  279,  280,   -1,   -1,   -1,
    -1,  257,  258,  287,  288,  289,  290,   -1,  292,  293,
   294,  295,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,  289,  290,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,  289,  290,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,  289,  290,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,   -1,   -1,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,   -1,   -1,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,  257,  258,   -1,   -1,   -1,  292,  293,  294,  295,
    -1,   -1,   -1,   -1,  270,  271,  272,  273,  274,  275,
   276,  277,  278,  279,  280,   -1,   -1,   -1,   -1,   -1,
    -1,   -1,   -1,   -1,   -1,   -1,  292,  293,  294,  295,
 };  };
 #define YYFINAL 18  #define YYFINAL 18
 #ifndef YYDEBUG  #ifndef YYDEBUG
 #define YYDEBUG 0  #define YYDEBUG 0
 #endif  #endif
#define YYMAXTOKEN 287#define YYMAXTOKEN 295
 #if YYDEBUG  #if YYDEBUG
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const char * const yyname[] =const char * const sudoersname[] =
 #else  #else
char *yyname[] =char *sudoersname[] =
 #endif  #endif
         {          {
 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Line 496  char *yyname[] = Line 548  char *yyname[] =
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
"COMMAND","ALIAS","DEFVAR","NTWKADDR","NETGROUP","USERGROUP","WORD","DEFAULTS","COMMAND","ALIAS","DEFVAR","NTWKADDR","NETGROUP","USERGROUP","WORD","DIGEST",
"DEFAULTS_HOST","DEFAULTS_USER","DEFAULTS_RUNAS","DEFAULTS_CMND","NOPASSWD","DEFAULTS","DEFAULTS_HOST","DEFAULTS_USER","DEFAULTS_RUNAS","DEFAULTS_CMND",
"PASSWD","NOEXEC","EXEC","SETENV","NOSETENV","LOG_INPUT","NOLOG_INPUT","NOPASSWD","PASSWD","NOEXEC","EXEC","SETENV","NOSETENV","LOG_INPUT",
"LOG_OUTPUT","NOLOG_OUTPUT","ALL","COMMENT","HOSTALIAS","CMNDALIAS","USERALIAS","NOLOG_INPUT","LOG_OUTPUT","NOLOG_OUTPUT","ALL","COMMENT","HOSTALIAS",
"RUNASALIAS","ERROR","TYPE","ROLE","CMNDALIAS","USERALIAS","RUNASALIAS","ERROR","TYPE","ROLE","PRIVS","LIMITPRIVS",
 "MYSELF","SHA224","SHA256","SHA384","SHA512",
 };  };
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
const char * const yyrule[] =const char * const sudoersrule[] =
 #else  #else
char *yyrule[] =char *sudoersrule[] =
 #endif  #endif
         {"$accept : file",          {"$accept : file",
 "file :",  "file :",
Line 543  char *yyrule[] = Line 596  char *yyrule[] =
 "host : WORD",  "host : WORD",
 "cmndspeclist : cmndspec",  "cmndspeclist : cmndspec",
 "cmndspeclist : cmndspeclist ',' cmndspec",  "cmndspeclist : cmndspeclist ',' cmndspec",
"cmndspec : runasspec selinux cmndtag opcmnd","cmndspec : runasspec selinux solarisprivs cmndtag digcmnd",
 "digest : SHA224 ':' DIGEST",
 "digest : SHA256 ':' DIGEST",
 "digest : SHA384 ':' DIGEST",
 "digest : SHA512 ':' DIGEST",
 "digcmnd : opcmnd",
 "digcmnd : digest opcmnd",
 "opcmnd : cmnd",  "opcmnd : cmnd",
 "opcmnd : '!' cmnd",  "opcmnd : '!' cmnd",
 "rolespec : ROLE '=' WORD",  "rolespec : ROLE '=' WORD",
Line 553  char *yyrule[] = Line 612  char *yyrule[] =
 "selinux : typespec",  "selinux : typespec",
 "selinux : rolespec typespec",  "selinux : rolespec typespec",
 "selinux : typespec rolespec",  "selinux : typespec rolespec",
   "privsspec : PRIVS '=' WORD",
   "limitprivsspec : LIMITPRIVS '=' WORD",
   "solarisprivs :",
   "solarisprivs : privsspec",
   "solarisprivs : limitprivsspec",
   "solarisprivs : privsspec limitprivsspec",
   "solarisprivs : limitprivsspec privsspec",
 "runasspec :",  "runasspec :",
 "runasspec : '(' runaslist ')'",  "runasspec : '(' runaslist ')'",
   "runaslist :",
 "runaslist : userlist",  "runaslist : userlist",
 "runaslist : userlist ':' grouplist",  "runaslist : userlist ':' grouplist",
 "runaslist : ':' grouplist",  "runaslist : ':' grouplist",
   "runaslist : ':'",
 "cmndtag :",  "cmndtag :",
 "cmndtag : cmndtag NOPASSWD",  "cmndtag : cmndtag NOPASSWD",
 "cmndtag : cmndtag PASSWD",  "cmndtag : cmndtag PASSWD",
Line 580  char *yyrule[] = Line 648  char *yyrule[] =
 "cmndaliases : cmndalias",  "cmndaliases : cmndalias",
 "cmndaliases : cmndaliases ':' cmndalias",  "cmndaliases : cmndaliases ':' cmndalias",
 "cmndalias : ALIAS '=' cmndlist",  "cmndalias : ALIAS '=' cmndlist",
"cmndlist : opcmnd","cmndlist : digcmnd",
"cmndlist : cmndlist ',' opcmnd","cmndlist : cmndlist ',' digcmnd",
 "runasaliases : runasalias",  "runasaliases : runasalias",
 "runasaliases : runasaliases ':' runasalias",  "runasaliases : runasaliases ':' runasalias",
 "runasalias : ALIAS '=' userlist",  "runasalias : ALIAS '=' userlist",
Line 631  short *yyss; Line 699  short *yyss;
 short *yysslim;  short *yysslim;
 YYSTYPE *yyvs;  YYSTYPE *yyvs;
 int yystacksize;  int yystacksize;
#line 604 "gram.y"#line 681 "gram.y"
 void
 sudoerserror(const char *s)
 {
     debug_decl(sudoerserror, SUDO_DEBUG_PARSER)
 
     /* If we last saw a newline the error is on the preceding line. */
     if (last_token == COMMENT)
         sudolineno--;
 
     /* Save the line the first error occurred on. */
     if (errorlineno == -1) {
         errorlineno = sudolineno;
         errorfile = estrdup(sudoers);
     }
     if (sudoers_warnings && s != NULL) {
         LEXTRACE("<*> ");
 #ifndef TRACELEXER
         if (trace_print == NULL || trace_print == sudoers_trace_print) {
             const char fmt[] = ">>> %s: %s near line %d <<<\n";
             int oldlocale;
 
             /* Warnings are displayed in the user's locale. */
             sudoers_setlocale(SUDOERS_LOCALE_USER, &oldlocale);
             sudo_printf(SUDO_CONV_ERROR_MSG, _(fmt), sudoers, _(s), sudolineno);
             sudoers_setlocale(oldlocale, NULL);
         }
 #endif
     }
     parse_error = true;
     debug_return;
 }
 
 static struct defaults *  static struct defaults *
 new_default(char *var, char *val, int op)  new_default(char *var, char *val, int op)
 {  {
     struct defaults *d;      struct defaults *d;
       debug_decl(new_default, SUDO_DEBUG_PARSER)
   
    d = emalloc(sizeof(struct defaults));    d = ecalloc(1, sizeof(struct defaults));
     d->var = var;      d->var = var;
     d->val = val;      d->val = val;
     tq_init(&d->binding);      tq_init(&d->binding);
    d->type = 0;    /* d->type = 0; */
     d->op = op;      d->op = op;
     d->prev = d;      d->prev = d;
    d->next = NULL;    /* d->next = NULL; */
   
    return d;    debug_return_ptr(d);
 }  }
   
 static struct member *  static struct member *
 new_member(char *name, int type)  new_member(char *name, int type)
 {  {
     struct member *m;      struct member *m;
       debug_decl(new_member, SUDO_DEBUG_PARSER)
   
    m = emalloc(sizeof(struct member));    m = ecalloc(1, sizeof(struct member));
     m->name = name;      m->name = name;
     m->type = type;      m->type = type;
     m->prev = m;      m->prev = m;
    m->next = NULL;    /* m->next = NULL; */
   
    return m;    debug_return_ptr(m);
 }  }
   
   struct sudo_digest *
   new_digest(int digest_type, const char *digest_str)
   {
       struct sudo_digest *dig;
       debug_decl(new_digest, SUDO_DEBUG_PARSER)
   
       dig = emalloc(sizeof(*dig));
       dig->digest_type = digest_type;
       dig->digest_str = estrdup(digest_str);
   
       debug_return_ptr(dig);
   }
   
 /*  /*
  * Add a list of defaults structures to the defaults list.   * Add a list of defaults structures to the defaults list.
  * The binding, if non-NULL, specifies a list of hosts, users, or   * The binding, if non-NULL, specifies a list of hosts, users, or
Line 673  add_defaults(int type, struct member *bmem, struct def Line 788  add_defaults(int type, struct member *bmem, struct def
 {  {
     struct defaults *d;      struct defaults *d;
     struct member_list binding;      struct member_list binding;
       debug_decl(add_defaults, SUDO_DEBUG_PARSER)
   
     /*      /*
      * We can only call list2tq once on bmem as it will zero       * We can only call list2tq once on bmem as it will zero
Line 688  add_defaults(int type, struct member *bmem, struct def Line 804  add_defaults(int type, struct member *bmem, struct def
         d->binding = binding;          d->binding = binding;
     }      }
     tq_append(&defaults, defs);      tq_append(&defaults, defs);
   
       debug_return;
 }  }
   
 /*  /*
Line 698  static void Line 816  static void
 add_userspec(struct member *members, struct privilege *privs)  add_userspec(struct member *members, struct privilege *privs)
 {  {
     struct userspec *u;      struct userspec *u;
       debug_decl(add_userspec, SUDO_DEBUG_PARSER)
   
    u = emalloc(sizeof(*u));    u = ecalloc(1, sizeof(*u));
     list2tq(&u->users, members);      list2tq(&u->users, members);
     list2tq(&u->privileges, privs);      list2tq(&u->privileges, privs);
     u->prev = u;      u->prev = u;
    u->next = NULL;    /* u->next = NULL; */
     tq_append(&userspecs, u);      tq_append(&userspecs, u);
   
       debug_return;
 }  }
   
 /*  /*
Line 712  add_userspec(struct member *members, struct privilege  Line 833  add_userspec(struct member *members, struct privilege 
  * the current sudoers file to path.   * the current sudoers file to path.
  */   */
 void  void
init_parser(const char *path, int quiet)init_parser(const char *path, bool quiet)
 {  {
     struct defaults *d;      struct defaults *d;
     struct member *m, *binding;      struct member *m, *binding;
Line 720  init_parser(const char *path, int quiet) Line 841  init_parser(const char *path, int quiet)
     struct privilege *priv;      struct privilege *priv;
     struct cmndspec *cs;      struct cmndspec *cs;
     struct sudo_command *c;      struct sudo_command *c;
       debug_decl(init_parser, SUDO_DEBUG_PARSER)
   
     while ((us = tq_pop(&userspecs)) != NULL) {      while ((us = tq_pop(&userspecs)) != NULL) {
         while ((m = tq_pop(&us->users)) != NULL) {          while ((m = tq_pop(&us->users)) != NULL) {
Line 731  init_parser(const char *path, int quiet) Line 853  init_parser(const char *path, int quiet)
 #ifdef HAVE_SELINUX  #ifdef HAVE_SELINUX
             char *role = NULL, *type = NULL;              char *role = NULL, *type = NULL;
 #endif /* HAVE_SELINUX */  #endif /* HAVE_SELINUX */
   #ifdef HAVE_PRIV_SET
               char *privs = NULL, *limitprivs = NULL;
   #endif /* HAVE_PRIV_SET */
   
             while ((m = tq_pop(&priv->hostlist)) != NULL) {              while ((m = tq_pop(&priv->hostlist)) != NULL) {
                 efree(m->name);                  efree(m->name);
Line 748  init_parser(const char *path, int quiet) Line 873  init_parser(const char *path, int quiet)
                     efree(cs->type);                      efree(cs->type);
                 }                  }
 #endif /* HAVE_SELINUX */  #endif /* HAVE_SELINUX */
   #ifdef HAVE_PRIV_SET
                   /* Only free the first instance of privs/limitprivs. */
                   if (cs->privs != privs) {
                       privs = cs->privs;
                       efree(cs->privs);
                   }
                   if (cs->limitprivs != limitprivs) {
                       limitprivs = cs->limitprivs;
                       efree(cs->limitprivs);
                   }
   #endif /* HAVE_PRIV_SET */
                 if (tq_last(&cs->runasuserlist) != runasuser) {                  if (tq_last(&cs->runasuserlist) != runasuser) {
                     runasuser = tq_last(&cs->runasuserlist);                      runasuser = tq_last(&cs->runasuserlist);
                     while ((m = tq_pop(&cs->runasuserlist)) != NULL) {                      while ((m = tq_pop(&cs->runasuserlist)) != NULL) {
Line 804  init_parser(const char *path, int quiet) Line 940  init_parser(const char *path, int quiet)
     efree(sudoers);      efree(sudoers);
     sudoers = path ? estrdup(path) : NULL;      sudoers = path ? estrdup(path) : NULL;
   
    parse_error = FALSE;    parse_error = false;
     errorlineno = -1;      errorlineno = -1;
    errorfile = NULL;    errorfile = sudoers;
    verbose = !quiet;    sudoers_warnings = !quiet;
 
     debug_return;
 }  }
#line 760 "y.tab.c"#line 898 "gram.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */  /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || defined(__STDC__)  #if defined(__cplusplus) || defined(__STDC__)
 static int yygrowstack(void)  static int yygrowstack(void)
Line 821  static int yygrowstack() Line 959  static int yygrowstack()
     short *newss;      short *newss;
     YYSTYPE *newvs;      YYSTYPE *newvs;
   
    if ((newsize = yystacksize) == 0)    newsize = yystacksize ? yystacksize : YYINITSTACKSIZE;
        newsize = YYINITSTACKSIZE;    if (newsize >= YYMAXDEPTH)
    else if (newsize >= YYMAXDEPTH) 
         return -1;          return -1;
     else if ((newsize *= 2) > YYMAXDEPTH)      else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;          newsize = YYMAXDEPTH;
     i = yyssp - yyss;  
 #ifdef SIZE_MAX  #ifdef SIZE_MAX
 #define YY_SIZE_MAX SIZE_MAX  #define YY_SIZE_MAX SIZE_MAX
 #else  #else
 #define YY_SIZE_MAX 0x7fffffff  #define YY_SIZE_MAX 0x7fffffff
 #endif  #endif
    if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)    if (YY_SIZE_MAX / newsize < sizeof *newss)
         goto bail;          goto bail;
       i = yyssp - yyss;
     newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :      newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
       (short *)malloc(newsize * sizeof *newss); /* overflow check above */        (short *)malloc(newsize * sizeof *newss); /* overflow check above */
     if (newss == NULL)      if (newss == NULL)
         goto bail;          goto bail;
     yyss = newss;      yyss = newss;
     yyssp = newss + i;      yyssp = newss + i;
     if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs)  
         goto bail;  
     newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :      newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
       (YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */        (YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */
     if (newvs == NULL)      if (newvs == NULL)
Line 1100  break; Line 1235  break;
 case 19:  case 19:
 #line 238 "gram.y"  #line 238 "gram.y"
 {  {
                            yyval.defaults = new_default(yyvsp[0].string, NULL, TRUE);                            yyval.defaults = new_default(yyvsp[0].string, NULL, true);
                         }                          }
 break;  break;
 case 20:  case 20:
 #line 241 "gram.y"  #line 241 "gram.y"
 {  {
                            yyval.defaults = new_default(yyvsp[0].string, NULL, FALSE);                            yyval.defaults = new_default(yyvsp[0].string, NULL, false);
                         }                          }
 break;  break;
 case 21:  case 21:
 #line 244 "gram.y"  #line 244 "gram.y"
 {  {
                            yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, TRUE);                            yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, true);
                         }                          }
 break;  break;
 case 22:  case 22:
Line 1137  break; Line 1272  break;
 case 26:  case 26:
 #line 262 "gram.y"  #line 262 "gram.y"
 {  {
                            struct privilege *p = emalloc(sizeof(*p));                            struct privilege *p = ecalloc(1, sizeof(*p));
                             list2tq(&p->hostlist, yyvsp[-2].member);                              list2tq(&p->hostlist, yyvsp[-2].member);
                             list2tq(&p->cmndlist, yyvsp[0].cmndspec);                              list2tq(&p->cmndlist, yyvsp[0].cmndspec);
                             p->prev = p;                              p->prev = p;
                            p->next = NULL;                            /* p->next = NULL; */
                             yyval.privilege = p;                              yyval.privilege = p;
                         }                          }
 break;  break;
Line 1149  case 27: Line 1284  case 27:
 #line 272 "gram.y"  #line 272 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;                            yyval.member->negated = false;
                         }                          }
 break;  break;
 case 28:  case 28:
 #line 276 "gram.y"  #line 276 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;                            yyval.member->negated = true;
                         }                          }
 break;  break;
 case 29:  case 29:
Line 1200  case 35: Line 1335  case 35:
                             if (yyvsp[0].cmndspec->type == NULL)                              if (yyvsp[0].cmndspec->type == NULL)
                                 yyvsp[0].cmndspec->type = yyvsp[0].cmndspec->prev->type;                                  yyvsp[0].cmndspec->type = yyvsp[0].cmndspec->prev->type;
 #endif /* HAVE_SELINUX */  #endif /* HAVE_SELINUX */
   #ifdef HAVE_PRIV_SET
                               /* propagate privs & limitprivs */
                               if (yyvsp[0].cmndspec->privs == NULL)
                                   yyvsp[0].cmndspec->privs = yyvsp[0].cmndspec->prev->privs;
                               if (yyvsp[0].cmndspec->limitprivs == NULL)
                                   yyvsp[0].cmndspec->limitprivs = yyvsp[0].cmndspec->prev->limitprivs;
   #endif /* HAVE_PRIV_SET */
                             /* propagate tags and runas list */                              /* propagate tags and runas list */
                             if (yyvsp[0].cmndspec->tags.nopasswd == UNSPEC)                              if (yyvsp[0].cmndspec->tags.nopasswd == UNSPEC)
                                 yyvsp[0].cmndspec->tags.nopasswd = yyvsp[0].cmndspec->prev->tags.nopasswd;                                  yyvsp[0].cmndspec->tags.nopasswd = yyvsp[0].cmndspec->prev->tags.nopasswd;
Line 1223  case 35: Line 1365  case 35:
                         }                          }
 break;  break;
 case 36:  case 36:
#line 332 "gram.y"#line 339 "gram.y"
 {  {
                            struct cmndspec *cs = emalloc(sizeof(*cs));                            struct cmndspec *cs = ecalloc(1, sizeof(*cs));
                            if (yyvsp[-3].runas != NULL) {                            if (yyvsp[-4].runas != NULL) {
                                list2tq(&cs->runasuserlist, yyvsp[-3].runas->runasusers);                                list2tq(&cs->runasuserlist, yyvsp[-4].runas->runasusers);
                                list2tq(&cs->runasgrouplist, yyvsp[-3].runas->runasgroups);                                list2tq(&cs->runasgrouplist, yyvsp[-4].runas->runasgroups);
                                efree(yyvsp[-3].runas);                                efree(yyvsp[-4].runas);
                             } else {                              } else {
                                 tq_init(&cs->runasuserlist);                                  tq_init(&cs->runasuserlist);
                                 tq_init(&cs->runasgrouplist);                                  tq_init(&cs->runasgrouplist);
                             }                              }
 #ifdef HAVE_SELINUX  #ifdef HAVE_SELINUX
                            cs->role = yyvsp[-2].seinfo.role;                            cs->role = yyvsp[-3].seinfo.role;
                            cs->type = yyvsp[-2].seinfo.type;                            cs->type = yyvsp[-3].seinfo.type;
 #endif  #endif
   #ifdef HAVE_PRIV_SET
                               cs->privs = yyvsp[-2].privinfo.privs;
                               cs->limitprivs = yyvsp[-2].privinfo.limitprivs;
   #endif
                             cs->tags = yyvsp[-1].tag;                              cs->tags = yyvsp[-1].tag;
                             cs->cmnd = yyvsp[0].member;                              cs->cmnd = yyvsp[0].member;
                             cs->prev = cs;                              cs->prev = cs;
Line 1250  case 36: Line 1396  case 36:
                         }                          }
 break;  break;
 case 37:  case 37:
#line 358 "gram.y"#line 369 "gram.y"
 {  {
                            yyval.member = yyvsp[0].member;                            yyval.digest = new_digest(SUDO_DIGEST_SHA224, yyvsp[0].string);
                            yyval.member->negated = FALSE; 
                         }                          }
 break;  break;
 case 38:  case 38:
#line 362 "gram.y"#line 372 "gram.y"
 {  {
                            yyval.member = yyvsp[0].member;                            yyval.digest = new_digest(SUDO_DIGEST_SHA256, yyvsp[0].string);
                            yyval.member->negated = TRUE; 
                         }                          }
 break;  break;
 case 39:  case 39:
#line 368 "gram.y"#line 375 "gram.y"
 {  {
                            yyval.string = yyvsp[0].string;                            yyval.digest = new_digest(SUDO_DIGEST_SHA384, yyvsp[0].string);
                         }                          }
 break;  break;
 case 40:  case 40:
#line 373 "gram.y"#line 378 "gram.y"
 {  {
                            yyval.string = yyvsp[0].string;                            yyval.digest = new_digest(SUDO_DIGEST_SHA512, yyvsp[0].string);
                         }                          }
 break;  break;
 case 41:  case 41:
#line 378 "gram.y"#line 383 "gram.y"
 {  {
                            yyval.seinfo.role = NULL;                            yyval.member = yyvsp[0].member;
                            yyval.seinfo.type = NULL; 
                         }                          }
 break;  break;
 case 42:  case 42:
#line 382 "gram.y"#line 386 "gram.y"
 {  {
                            yyval.seinfo.role = yyvsp[0].string;                            /* XXX - yuck */
                            yyval.seinfo.type = NULL;                            struct sudo_command *c = (struct sudo_command *)(yyvsp[0].member->name);
                             c->digest = yyvsp[-1].digest;
                             yyval.member = yyvsp[0].member;
                         }                          }
 break;  break;
 case 43:  case 43:
#line 386 "gram.y"#line 394 "gram.y"
 {  {
                            yyval.seinfo.type = yyvsp[0].string;                            yyval.member = yyvsp[0].member;
                            yyval.seinfo.role = NULL;                            yyval.member->negated = false;
                         }                          }
 break;  break;
 case 44:  case 44:
#line 390 "gram.y"#line 398 "gram.y"
 {  {
                            yyval.seinfo.role = yyvsp[-1].string;                            yyval.member = yyvsp[0].member;
                            yyval.seinfo.type = yyvsp[0].string;                            yyval.member->negated = true;
                         }                          }
 break;  break;
 case 45:  case 45:
#line 394 "gram.y"#line 404 "gram.y"
 {  {
                            yyval.seinfo.type = yyvsp[-1].string;                            yyval.string = yyvsp[0].string;
                            yyval.seinfo.role = yyvsp[0].string; 
                         }                          }
 break;  break;
 case 46:  case 46:
#line 400 "gram.y"#line 409 "gram.y"
 {  {
                            yyval.runas = NULL;                            yyval.string = yyvsp[0].string;
                         }                          }
 break;  break;
 case 47:  case 47:
#line 403 "gram.y"#line 414 "gram.y"
 {  {
                            yyval.runas = yyvsp[-1].runas;                            yyval.seinfo.role = NULL;
                             yyval.seinfo.type = NULL;
                         }                          }
 break;  break;
 case 48:  case 48:
#line 408 "gram.y"#line 418 "gram.y"
 {  {
                            yyval.runas = emalloc(sizeof(struct runascontainer));                            yyval.seinfo.role = yyvsp[0].string;
                            yyval.runas->runasusers = yyvsp[0].member;                            yyval.seinfo.type = NULL;
                            yyval.runas->runasgroups = NULL; 
                         }                          }
 break;  break;
 case 49:  case 49:
#line 413 "gram.y"#line 422 "gram.y"
 {  {
                            yyval.runas = emalloc(sizeof(struct runascontainer));                            yyval.seinfo.type = yyvsp[0].string;
                            yyval.runas->runasusers = yyvsp[-2].member;                            yyval.seinfo.role = NULL;
                            yyval.runas->runasgroups = yyvsp[0].member; 
                         }                          }
 break;  break;
 case 50:  case 50:
#line 418 "gram.y"#line 426 "gram.y"
 {  {
                            yyval.runas = emalloc(sizeof(struct runascontainer));                            yyval.seinfo.role = yyvsp[-1].string;
                            yyval.runas->runasusers = NULL;                            yyval.seinfo.type = yyvsp[0].string;
                            yyval.runas->runasgroups = yyvsp[0].member; 
                         }                          }
 break;  break;
 case 51:  case 51:
#line 425 "gram.y"#line 430 "gram.y"
 {  {
                            yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv =                            yyval.seinfo.type = yyvsp[-1].string;
                                yyval.tag.log_input = yyval.tag.log_output = UNSPEC;                            yyval.seinfo.role = yyvsp[0].string;
                         }                          }
 break;  break;
 case 52:  case 52:
#line 429 "gram.y"#line 436 "gram.y"
 {  {
                            yyval.tag.nopasswd = TRUE;                            yyval.string = yyvsp[0].string;
                         }                          }
 break;  break;
 case 53:  case 53:
#line 432 "gram.y"#line 440 "gram.y"
 {  {
                            yyval.tag.nopasswd = FALSE;                            yyval.string = yyvsp[0].string;
                         }                          }
 break;  break;
 case 54:  case 54:
#line 435 "gram.y"#line 445 "gram.y"
 {  {
                            yyval.tag.noexec = TRUE;                            yyval.privinfo.privs = NULL;
                             yyval.privinfo.limitprivs = NULL;
                         }                          }
 break;  break;
 case 55:  case 55:
#line 438 "gram.y"#line 449 "gram.y"
 {  {
                            yyval.tag.noexec = FALSE;                            yyval.privinfo.privs = yyvsp[0].string;
                             yyval.privinfo.limitprivs = NULL;
                         }                          }
 break;  break;
 case 56:  case 56:
#line 441 "gram.y"#line 453 "gram.y"
 {  {
                            yyval.tag.setenv = TRUE;                            yyval.privinfo.privs = NULL;
                             yyval.privinfo.limitprivs = yyvsp[0].string;
                         }                          }
 break;  break;
 case 57:  case 57:
#line 444 "gram.y"#line 457 "gram.y"
 {  {
                            yyval.tag.setenv = FALSE;                            yyval.privinfo.privs = yyvsp[-1].string;
                             yyval.privinfo.limitprivs = yyvsp[0].string;
                         }                          }
 break;  break;
 case 58:  case 58:
#line 447 "gram.y"#line 461 "gram.y"
 {  {
                            yyval.tag.log_input = TRUE;                            yyval.privinfo.limitprivs = yyvsp[-1].string;
                             yyval.privinfo.privs = yyvsp[0].string;
                         }                          }
 break;  break;
 case 59:  case 59:
#line 450 "gram.y"#line 467 "gram.y"
 {  {
                            yyval.tag.log_input = FALSE;                            yyval.runas = NULL;
                         }                          }
 break;  break;
 case 60:  case 60:
#line 453 "gram.y"#line 470 "gram.y"
 {  {
                            yyval.tag.log_output = TRUE;                            yyval.runas = yyvsp[-1].runas;
                         }                          }
 break;  break;
 case 61:  case 61:
#line 456 "gram.y"#line 475 "gram.y"
 {  {
                            yyval.tag.log_output = FALSE;                            yyval.runas = ecalloc(1, sizeof(struct runascontainer));
                             yyval.runas->runasusers = new_member(NULL, MYSELF);
                             /* $$->runasgroups = NULL; */
                         }                          }
 break;  break;
 case 62:  case 62:
#line 461 "gram.y"#line 480 "gram.y"
 {  {
                            yyval.member = new_member(NULL, ALL);                            yyval.runas = ecalloc(1, sizeof(struct runascontainer));
                             yyval.runas->runasusers = yyvsp[0].member;
                             /* $$->runasgroups = NULL; */
                         }                          }
 break;  break;
 case 63:  case 63:
#line 464 "gram.y"#line 485 "gram.y"
 {  {
                            yyval.member = new_member(yyvsp[0].string, ALIAS);                            yyval.runas = ecalloc(1, sizeof(struct runascontainer));
                             yyval.runas->runasusers = yyvsp[-2].member;
                             yyval.runas->runasgroups = yyvsp[0].member;
                         }                          }
 break;  break;
 case 64:  case 64:
#line 467 "gram.y"#line 490 "gram.y"
 {  {
                            struct sudo_command *c = emalloc(sizeof(*c));                            yyval.runas = ecalloc(1, sizeof(struct runascontainer));
                             /* $$->runasusers = NULL; */
                             yyval.runas->runasgroups = yyvsp[0].member;
                         }
 break;
 case 65:
 #line 495 "gram.y"
 {
                             yyval.runas = ecalloc(1, sizeof(struct runascontainer));
                             yyval.runas->runasusers = new_member(NULL, MYSELF);
                             /* $$->runasgroups = NULL; */
                         }
 break;
 case 66:
 #line 502 "gram.y"
 {
                             yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv =
                                 yyval.tag.log_input = yyval.tag.log_output = UNSPEC;
                         }
 break;
 case 67:
 #line 506 "gram.y"
 {
                             yyval.tag.nopasswd = true;
                         }
 break;
 case 68:
 #line 509 "gram.y"
 {
                             yyval.tag.nopasswd = false;
                         }
 break;
 case 69:
 #line 512 "gram.y"
 {
                             yyval.tag.noexec = true;
                         }
 break;
 case 70:
 #line 515 "gram.y"
 {
                             yyval.tag.noexec = false;
                         }
 break;
 case 71:
 #line 518 "gram.y"
 {
                             yyval.tag.setenv = true;
                         }
 break;
 case 72:
 #line 521 "gram.y"
 {
                             yyval.tag.setenv = false;
                         }
 break;
 case 73:
 #line 524 "gram.y"
 {
                             yyval.tag.log_input = true;
                         }
 break;
 case 74:
 #line 527 "gram.y"
 {
                             yyval.tag.log_input = false;
                         }
 break;
 case 75:
 #line 530 "gram.y"
 {
                             yyval.tag.log_output = true;
                         }
 break;
 case 76:
 #line 533 "gram.y"
 {
                             yyval.tag.log_output = false;
                         }
 break;
 case 77:
 #line 538 "gram.y"
 {
                             yyval.member = new_member(NULL, ALL);
                         }
 break;
 case 78:
 #line 541 "gram.y"
 {
                             yyval.member = new_member(yyvsp[0].string, ALIAS);
                         }
 break;
 case 79:
 #line 544 "gram.y"
 {
                             struct sudo_command *c = ecalloc(1, sizeof(*c));
                             c->cmnd = yyvsp[0].command.cmnd;                              c->cmnd = yyvsp[0].command.cmnd;
                             c->args = yyvsp[0].command.args;                              c->args = yyvsp[0].command.args;
                             yyval.member = new_member((char *)c, COMMAND);                              yyval.member = new_member((char *)c, COMMAND);
                         }                          }
 break;  break;
case 67:case 82:
#line 479 "gram.y"#line 556 "gram.y"
 {  {
                             char *s;                              char *s;
                             if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) {                              if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) {
                                yyerror(s);                                sudoerserror(s);
                                 YYERROR;                                  YYERROR;
                             }                              }
                         }                          }
 break;  break;
case 69:case 84:
#line 489 "gram.y"#line 566 "gram.y"
 {  {
                             list_append(yyvsp[-2].member, yyvsp[0].member);                              list_append(yyvsp[-2].member, yyvsp[0].member);
                             yyval.member = yyvsp[-2].member;                              yyval.member = yyvsp[-2].member;
                         }                          }
 break;  break;
case 72:case 87:
#line 499 "gram.y"#line 576 "gram.y"
 {  {
                             char *s;                              char *s;
                             if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) {                              if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) {
                                yyerror(s);                                sudoerserror(s);
                                 YYERROR;                                  YYERROR;
                             }                              }
                         }                          }
 break;  break;
case 74:case 89:
#line 509 "gram.y"#line 586 "gram.y"
 {  {
                             list_append(yyvsp[-2].member, yyvsp[0].member);                              list_append(yyvsp[-2].member, yyvsp[0].member);
                             yyval.member = yyvsp[-2].member;                              yyval.member = yyvsp[-2].member;
                         }                          }
 break;  break;
case 77:case 92:
#line 519 "gram.y"#line 596 "gram.y"
 {  {
                             char *s;                              char *s;
                             if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) {                              if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) {
                                yyerror(s);                                sudoerserror(s);
                                 YYERROR;                                  YYERROR;
                             }                              }
                         }                          }
 break;  break;
case 80:case 95:
#line 532 "gram.y"#line 609 "gram.y"
 {  {
                             char *s;                              char *s;
                             if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) {                              if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) {
                                yyerror(s);                                sudoerserror(s);
                                 YYERROR;                                  YYERROR;
                             }                              }
                         }                          }
 break;  break;
case 82:case 97:
#line 542 "gram.y"#line 619 "gram.y"
 {  {
                             list_append(yyvsp[-2].member, yyvsp[0].member);                              list_append(yyvsp[-2].member, yyvsp[0].member);
                             yyval.member = yyvsp[-2].member;                              yyval.member = yyvsp[-2].member;
                         }                          }
 break;  break;
case 83:case 98:
#line 548 "gram.y"#line 625 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;                            yyval.member->negated = false;
                         }                          }
 break;  break;
case 84:case 99:
#line 552 "gram.y"#line 629 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;                            yyval.member->negated = true;
                         }                          }
 break;  break;
case 85:case 100:
#line 558 "gram.y"#line 635 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, ALIAS);                              yyval.member = new_member(yyvsp[0].string, ALIAS);
                         }                          }
 break;  break;
case 86:case 101:
#line 561 "gram.y"#line 638 "gram.y"
 {  {
                             yyval.member = new_member(NULL, ALL);                              yyval.member = new_member(NULL, ALL);
                         }                          }
 break;  break;
case 87:case 102:
#line 564 "gram.y"#line 641 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, NETGROUP);                              yyval.member = new_member(yyvsp[0].string, NETGROUP);
                         }                          }
 break;  break;
case 88:case 103:
#line 567 "gram.y"#line 644 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, USERGROUP);                              yyval.member = new_member(yyvsp[0].string, USERGROUP);
                         }                          }
 break;  break;
case 89:case 104:
#line 570 "gram.y"#line 647 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, WORD);                              yyval.member = new_member(yyvsp[0].string, WORD);
                         }                          }
 break;  break;
case 91:case 106:
#line 576 "gram.y"#line 653 "gram.y"
 {  {
                             list_append(yyvsp[-2].member, yyvsp[0].member);                              list_append(yyvsp[-2].member, yyvsp[0].member);
                             yyval.member = yyvsp[-2].member;                              yyval.member = yyvsp[-2].member;
                         }                          }
 break;  break;
case 92:case 107:
#line 582 "gram.y"#line 659 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = FALSE;                            yyval.member->negated = false;
                         }                          }
 break;  break;
case 93:case 108:
#line 586 "gram.y"#line 663 "gram.y"
 {  {
                             yyval.member = yyvsp[0].member;                              yyval.member = yyvsp[0].member;
                            yyval.member->negated = TRUE;                            yyval.member->negated = true;
                         }                          }
 break;  break;
case 94:case 109:
#line 592 "gram.y"#line 669 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, ALIAS);                              yyval.member = new_member(yyvsp[0].string, ALIAS);
                         }                          }
 break;  break;
case 95:case 110:
#line 595 "gram.y"#line 672 "gram.y"
 {  {
                             yyval.member = new_member(NULL, ALL);                              yyval.member = new_member(NULL, ALL);
                         }                          }
 break;  break;
case 96:case 111:
#line 598 "gram.y"#line 675 "gram.y"
 {  {
                             yyval.member = new_member(yyvsp[0].string, WORD);                              yyval.member = new_member(yyvsp[0].string, WORD);
                         }                          }
 break;  break;
#line 1529 "y.tab.c"#line 1777 "gram.c"
     }      }
     yyssp -= yym;      yyssp -= yym;
     yystate = *yyssp;      yystate = *yyssp;

Removed from v.1.1  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>