include strings.h everywhere we include string.h

This commit is contained in:
Todd C. Miller
1999-08-28 09:24:15 +00:00
parent 55e31d781b
commit 3a8c0ca966
5 changed files with 107 additions and 92 deletions

View File

@@ -41,6 +41,9 @@
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif /* HAVE_UNISTD_H */ #endif /* HAVE_UNISTD_H */

View File

@@ -805,6 +805,9 @@ char *yytext;
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
#include <malloc.h> #include <malloc.h>
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
@@ -846,7 +849,7 @@ extern void yyerror __P((char *));
#define GOTRUNAS 2 #define GOTRUNAS 2
#line 850 "lex.yy.c" #line 853 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
@@ -997,9 +1000,9 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 102 "parse.lex" #line 105 "parse.lex"
#line 1003 "lex.yy.c" #line 1006 "lex.yy.c"
if ( yy_init ) if ( yy_init )
{ {
@@ -1084,14 +1087,14 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 103 "parse.lex" #line 106 "parse.lex"
{ /* throw away space/tabs */ { /* throw away space/tabs */
sawspace = TRUE; /* but remember for fill_args */ sawspace = TRUE; /* but remember for fill_args */
} }
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 107 "parse.lex" #line 110 "parse.lex"
{ {
sawspace = TRUE; /* remember for fill_args */ sawspace = TRUE; /* remember for fill_args */
++sudolineno; ++sudolineno;
@@ -1100,7 +1103,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 113 "parse.lex" #line 116 "parse.lex"
{ {
LEXTRACE("QUOTEDCHAR "); LEXTRACE("QUOTEDCHAR ");
fill_args(yytext + 1, 1, sawspace); fill_args(yytext + 1, 1, sawspace);
@@ -1109,7 +1112,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 119 "parse.lex" #line 122 "parse.lex"
{ {
BEGIN INITIAL; BEGIN INITIAL;
unput(*yytext); unput(*yytext);
@@ -1118,7 +1121,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 125 "parse.lex" #line 128 "parse.lex"
{ {
++sudolineno; ++sudolineno;
LEXTRACE("\n"); LEXTRACE("\n");
@@ -1127,7 +1130,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 131 "parse.lex" #line 134 "parse.lex"
{ {
++sudolineno; ++sudolineno;
LEXTRACE("\n"); LEXTRACE("\n");
@@ -1136,7 +1139,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 137 "parse.lex" #line 140 "parse.lex"
{ {
LEXTRACE("ARG "); LEXTRACE("ARG ");
fill_args(yytext, yyleng, sawspace); fill_args(yytext, yyleng, sawspace);
@@ -1145,7 +1148,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 143 "parse.lex" #line 146 "parse.lex"
{ {
LEXTRACE(", "); LEXTRACE(", ");
return(','); return(',');
@@ -1153,7 +1156,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
#line 148 "parse.lex" #line 151 "parse.lex"
{ {
if (yyleng % 2 == 1) if (yyleng % 2 == 1)
return('!'); /* return '!' */ return('!'); /* return '!' */
@@ -1161,7 +1164,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 153 "parse.lex" #line 156 "parse.lex"
{ {
LEXTRACE("= "); LEXTRACE("= ");
return('='); return('=');
@@ -1169,7 +1172,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 158 "parse.lex" #line 161 "parse.lex"
{ {
LEXTRACE(": "); LEXTRACE(": ");
return(':'); return(':');
@@ -1177,7 +1180,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 163 "parse.lex" #line 166 "parse.lex"
{ {
/* cmnd does not require passwd for this user */ /* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD "); LEXTRACE("NOPASSWD ");
@@ -1186,7 +1189,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 169 "parse.lex" #line 172 "parse.lex"
{ {
/* cmnd requires passwd for this user */ /* cmnd requires passwd for this user */
LEXTRACE("PASSWD "); LEXTRACE("PASSWD ");
@@ -1195,7 +1198,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 175 "parse.lex" #line 178 "parse.lex"
{ {
/* netgroup */ /* netgroup */
fill(yytext, yyleng); fill(yytext, yyleng);
@@ -1204,7 +1207,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 181 "parse.lex" #line 184 "parse.lex"
{ {
/* UN*X group */ /* UN*X group */
fill(yytext, yyleng); fill(yytext, yyleng);
@@ -1213,7 +1216,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 187 "parse.lex" #line 190 "parse.lex"
{ {
fill(yytext, yyleng); fill(yytext, yyleng);
LEXTRACE("NTWKADDR "); LEXTRACE("NTWKADDR ");
@@ -1222,7 +1225,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 17: case 17:
YY_RULE_SETUP YY_RULE_SETUP
#line 193 "parse.lex" #line 196 "parse.lex"
{ {
fill(yytext, yyleng); fill(yytext, yyleng);
LEXTRACE("NTWKADDR "); LEXTRACE("NTWKADDR ");
@@ -1231,7 +1234,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 199 "parse.lex" #line 202 "parse.lex"
{ {
fill(yytext, yyleng); fill(yytext, yyleng);
LEXTRACE("FQHOST "); LEXTRACE("FQHOST ");
@@ -1240,7 +1243,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 205 "parse.lex" #line 208 "parse.lex"
{ {
BEGIN GOTRUNAS; BEGIN GOTRUNAS;
LEXTRACE("RUNAS "); LEXTRACE("RUNAS ");
@@ -1249,7 +1252,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 211 "parse.lex" #line 214 "parse.lex"
{ {
/* Runas_Alias user can run command as or ALL */ /* Runas_Alias user can run command as or ALL */
if (strcmp(yytext, "ALL") == 0) { if (strcmp(yytext, "ALL") == 0) {
@@ -1264,7 +1267,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 223 "parse.lex" #line 226 "parse.lex"
{ {
/* username/uid that user can run command as */ /* username/uid that user can run command as */
fill(yytext, yyleng); fill(yytext, yyleng);
@@ -1274,12 +1277,12 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 230 "parse.lex" #line 233 "parse.lex"
BEGIN INITIAL; BEGIN INITIAL;
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 233 "parse.lex" #line 236 "parse.lex"
{ {
/* directories can't have args... */ /* directories can't have args... */
if (yytext[yyleng - 1] == '/') { if (yytext[yyleng - 1] == '/') {
@@ -1295,7 +1298,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 24: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 246 "parse.lex" #line 249 "parse.lex"
{ {
if (strcmp(yytext, "ALL") == 0) { if (strcmp(yytext, "ALL") == 0) {
LEXTRACE("ALL "); LEXTRACE("ALL ");
@@ -1309,7 +1312,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 25: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 257 "parse.lex" #line 260 "parse.lex"
{ {
fill(yytext, yyleng); fill(yytext, yyleng);
if (strcmp(yytext, "Host_Alias") == 0) { if (strcmp(yytext, "Host_Alias") == 0) {
@@ -1336,17 +1339,17 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 26: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 281 "parse.lex" #line 284 "parse.lex"
{ {
return(ERROR); return(ERROR);
} /* parse error */ } /* parse error */
YY_BREAK YY_BREAK
case 27: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 285 "parse.lex" #line 288 "parse.lex"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1350 "lex.yy.c" #line 1353 "lex.yy.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(GOTCMND): case YY_STATE_EOF(GOTCMND):
case YY_STATE_EOF(GOTRUNAS): case YY_STATE_EOF(GOTRUNAS):
@@ -2234,7 +2237,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 285 "parse.lex" #line 288 "parse.lex"
static void static void
fill(s, len) fill(s, len)

View File

@@ -48,6 +48,9 @@
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
#include <malloc.h> #include <malloc.h>
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #endif /* HAVE_MALLOC_H && !STDC_HEADERS */

View File

@@ -58,6 +58,9 @@
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
#include <malloc.h> #include <malloc.h>
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #endif /* HAVE_MALLOC_H && !STDC_HEADERS */

View File

@@ -16,7 +16,7 @@ static char yyrcsid[]
#define yyerrok (yyerrflag=0) #define yyerrok (yyerrflag=0)
#define YYRECOVERING() (yyerrflag!=0) #define YYRECOVERING() (yyerrflag!=0)
#define YYPREFIX "yy" #define YYPREFIX "yy"
#line 2 "./parse.yacc" #line 2 "parse.yacc"
/* /*
* Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
* All rights reserved. * All rights reserved.
@@ -76,6 +76,9 @@ static char yyrcsid[]
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif /* HAVE_STRING_H */ #endif /* HAVE_STRING_H */
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif /* HAVE_STRINGS_H */
#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
#include <malloc.h> #include <malloc.h>
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
@@ -220,14 +223,14 @@ yyerror(s)
} }
parse_error = TRUE; parse_error = TRUE;
} }
#line 207 "./parse.yacc" #line 210 "parse.yacc"
typedef union { typedef union {
char *string; char *string;
int BOOLEAN; int BOOLEAN;
struct sudo_command command; struct sudo_command command;
int tok; int tok;
} YYSTYPE; } YYSTYPE;
#line 231 "sudo.tab.c" #line 234 "sudo.tab.c"
#define COMMAND 257 #define COMMAND 257
#define ALIAS 258 #define ALIAS 258
#define NTWKADDR 259 #define NTWKADDR 259
@@ -532,7 +535,7 @@ short *yyss;
short *yysslim; short *yysslim;
YYSTYPE *yyvs; YYSTYPE *yyvs;
int yystacksize; int yystacksize;
#line 765 "./parse.yacc" #line 768 "parse.yacc"
#define MOREALIASES (32) #define MOREALIASES (32)
aliasinfo *aliases = NULL; aliasinfo *aliases = NULL;
@@ -883,7 +886,7 @@ init_parser()
if (printmatches == TRUE) if (printmatches == TRUE)
expand_match_list(); expand_match_list();
} }
#line 887 "sudo.tab.c" #line 890 "sudo.tab.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ /* allocate initial stack or double stack size, up to YYMAXDEPTH */
#if defined(__cplusplus) || __STDC__ #if defined(__cplusplus) || __STDC__
static int yygrowstack(void) static int yygrowstack(void)
@@ -1064,42 +1067,42 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 3: case 3:
#line 252 "./parse.yacc" #line 255 "parse.yacc"
{ ; } { ; }
break; break;
case 4: case 4:
#line 254 "./parse.yacc" #line 257 "parse.yacc"
{ yyerrok; } { yyerrok; }
break; break;
case 5: case 5:
#line 255 "./parse.yacc" #line 258 "parse.yacc"
{ push; } { push; }
break; break;
case 6: case 6:
#line 255 "./parse.yacc" #line 258 "parse.yacc"
{ {
while (top && user_matches != TRUE) while (top && user_matches != TRUE)
pop; pop;
} }
break; break;
case 7: case 7:
#line 260 "./parse.yacc" #line 263 "parse.yacc"
{ ; } { ; }
break; break;
case 8: case 8:
#line 262 "./parse.yacc" #line 265 "parse.yacc"
{ ; } { ; }
break; break;
case 9: case 9:
#line 264 "./parse.yacc" #line 267 "parse.yacc"
{ ; } { ; }
break; break;
case 10: case 10:
#line 266 "./parse.yacc" #line 269 "parse.yacc"
{ ; } { ; }
break; break;
case 13: case 13:
#line 274 "./parse.yacc" #line 277 "parse.yacc"
{ {
/* /*
* We already did a push if necessary in * We already did a push if necessary in
@@ -1112,27 +1115,27 @@ case 13:
} }
break; break;
case 14: case 14:
#line 286 "./parse.yacc" #line 289 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
host_matches = yyvsp[0].BOOLEAN; host_matches = yyvsp[0].BOOLEAN;
} }
break; break;
case 15: case 15:
#line 290 "./parse.yacc" #line 293 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
host_matches = ! yyvsp[0].BOOLEAN; host_matches = ! yyvsp[0].BOOLEAN;
} }
break; break;
case 16: case 16:
#line 295 "./parse.yacc" #line 298 "parse.yacc"
{ {
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
} }
break; break;
case 17: case 17:
#line 298 "./parse.yacc" #line 301 "parse.yacc"
{ {
if (addr_matches(yyvsp[0].string)) if (addr_matches(yyvsp[0].string))
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1142,7 +1145,7 @@ case 17:
} }
break; break;
case 18: case 18:
#line 305 "./parse.yacc" #line 308 "parse.yacc"
{ {
if (netgr_matches(yyvsp[0].string, user_host, NULL)) if (netgr_matches(yyvsp[0].string, user_host, NULL))
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1152,7 +1155,7 @@ case 18:
} }
break; break;
case 19: case 19:
#line 312 "./parse.yacc" #line 315 "parse.yacc"
{ {
if (strcasecmp(user_shost, yyvsp[0].string) == 0) if (strcasecmp(user_shost, yyvsp[0].string) == 0)
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1162,7 +1165,7 @@ case 19:
} }
break; break;
case 20: case 20:
#line 319 "./parse.yacc" #line 322 "parse.yacc"
{ {
if (strcasecmp(user_host, yyvsp[0].string) == 0) if (strcasecmp(user_host, yyvsp[0].string) == 0)
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1172,7 +1175,7 @@ case 20:
} }
break; break;
case 21: case 21:
#line 326 "./parse.yacc" #line 329 "parse.yacc"
{ {
aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS); aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
@@ -1197,7 +1200,7 @@ case 21:
} }
break; break;
case 24: case 24:
#line 354 "./parse.yacc" #line 357 "parse.yacc"
{ {
/* /*
* Push the entry onto the stack if it is worth * Push the entry onto the stack if it is worth
@@ -1220,14 +1223,14 @@ case 24:
} }
break; break;
case 25: case 25:
#line 376 "./parse.yacc" #line 379 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
cmnd_matches = yyvsp[0].BOOLEAN; cmnd_matches = yyvsp[0].BOOLEAN;
} }
break; break;
case 26: case 26:
#line 380 "./parse.yacc" #line 383 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1239,14 +1242,14 @@ case 26:
} }
break; break;
case 27: case 27:
#line 388 "./parse.yacc" #line 391 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
cmnd_matches = ! yyvsp[0].BOOLEAN; cmnd_matches = ! yyvsp[0].BOOLEAN;
} }
break; break;
case 28: case 28:
#line 394 "./parse.yacc" #line 397 "parse.yacc"
{ {
if (printmatches == TRUE && host_matches == TRUE && if (printmatches == TRUE && host_matches == TRUE &&
user_matches == TRUE) { user_matches == TRUE) {
@@ -1272,18 +1275,18 @@ case 28:
} }
break; break;
case 29: case 29:
#line 417 "./parse.yacc" #line 420 "parse.yacc"
{ ; } { ; }
break; break;
case 32: case 32:
#line 424 "./parse.yacc" #line 427 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
runas_matches = yyvsp[0].BOOLEAN; runas_matches = yyvsp[0].BOOLEAN;
} }
break; break;
case 33: case 33:
#line 428 "./parse.yacc" #line 431 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1295,14 +1298,14 @@ case 33:
} }
break; break;
case 34: case 34:
#line 436 "./parse.yacc" #line 439 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
runas_matches = ! yyvsp[0].BOOLEAN; runas_matches = ! yyvsp[0].BOOLEAN;
} }
break; break;
case 35: case 35:
#line 441 "./parse.yacc" #line 444 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1319,7 +1322,7 @@ case 35:
} }
break; break;
case 36: case 36:
#line 455 "./parse.yacc" #line 458 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1336,7 +1339,7 @@ case 36:
} }
break; break;
case 37: case 37:
#line 469 "./parse.yacc" #line 472 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1353,7 +1356,7 @@ case 37:
} }
break; break;
case 38: case 38:
#line 483 "./parse.yacc" #line 486 "parse.yacc"
{ {
aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS); aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
@@ -1385,7 +1388,7 @@ case 38:
} }
break; break;
case 39: case 39:
#line 512 "./parse.yacc" #line 515 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1398,7 +1401,7 @@ case 39:
} }
break; break;
case 40: case 40:
#line 524 "./parse.yacc" #line 527 "parse.yacc"
{ {
/* Inherit NOPASSWD/PASSWD status. */ /* Inherit NOPASSWD/PASSWD status. */
if (printmatches == TRUE && host_matches == TRUE && if (printmatches == TRUE && host_matches == TRUE &&
@@ -1411,7 +1414,7 @@ case 40:
} }
break; break;
case 41: case 41:
#line 534 "./parse.yacc" #line 537 "parse.yacc"
{ {
no_passwd = TRUE; no_passwd = TRUE;
if (printmatches == TRUE && host_matches == TRUE && if (printmatches == TRUE && host_matches == TRUE &&
@@ -1420,7 +1423,7 @@ case 41:
} }
break; break;
case 42: case 42:
#line 540 "./parse.yacc" #line 543 "parse.yacc"
{ {
no_passwd = FALSE; no_passwd = FALSE;
if (printmatches == TRUE && host_matches == TRUE && if (printmatches == TRUE && host_matches == TRUE &&
@@ -1429,7 +1432,7 @@ case 42:
} }
break; break;
case 43: case 43:
#line 548 "./parse.yacc" #line 551 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) if (in_alias == TRUE)
@@ -1449,7 +1452,7 @@ case 43:
} }
break; break;
case 44: case 44:
#line 565 "./parse.yacc" #line 568 "parse.yacc"
{ {
aliasinfo *aip; aliasinfo *aip;
@@ -1481,7 +1484,7 @@ case 44:
} }
break; break;
case 45: case 45:
#line 594 "./parse.yacc" #line 597 "parse.yacc"
{ {
if (printmatches == TRUE) { if (printmatches == TRUE) {
if (in_alias == TRUE) { if (in_alias == TRUE) {
@@ -1510,11 +1513,11 @@ case 45:
} }
break; break;
case 48: case 48:
#line 626 "./parse.yacc" #line 629 "parse.yacc"
{ push; } { push; }
break; break;
case 49: case 49:
#line 626 "./parse.yacc" #line 629 "parse.yacc"
{ {
if ((host_matches != -1 || pedantic) && if ((host_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches)) !add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches))
@@ -1523,7 +1526,7 @@ case 49:
} }
break; break;
case 54: case 54:
#line 642 "./parse.yacc" #line 645 "parse.yacc"
{ {
push; push;
if (printmatches == TRUE) { if (printmatches == TRUE) {
@@ -1536,7 +1539,7 @@ case 54:
} }
break; break;
case 55: case 55:
#line 651 "./parse.yacc" #line 654 "parse.yacc"
{ {
if ((cmnd_matches != -1 || pedantic) && if ((cmnd_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches)) !add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches))
@@ -1549,11 +1552,11 @@ case 55:
} }
break; break;
case 56: case 56:
#line 663 "./parse.yacc" #line 666 "parse.yacc"
{ ; } { ; }
break; break;
case 60: case 60:
#line 671 "./parse.yacc" #line 674 "parse.yacc"
{ {
push; push;
if (printmatches == TRUE) { if (printmatches == TRUE) {
@@ -1566,7 +1569,7 @@ case 60:
} }
break; break;
case 61: case 61:
#line 680 "./parse.yacc" #line 683 "parse.yacc"
{ {
if ((runas_matches != -1 || pedantic) && if ((runas_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches)) !add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches))
@@ -1579,11 +1582,11 @@ case 61:
} }
break; break;
case 64: case 64:
#line 696 "./parse.yacc" #line 699 "parse.yacc"
{ push; } { push; }
break; break;
case 65: case 65:
#line 696 "./parse.yacc" #line 699 "parse.yacc"
{ {
if ((user_matches != -1 || pedantic) && if ((user_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, USER_ALIAS, user_matches)) !add_alias(yyvsp[-3].string, USER_ALIAS, user_matches))
@@ -1593,25 +1596,25 @@ case 65:
} }
break; break;
case 66: case 66:
#line 705 "./parse.yacc" #line 708 "parse.yacc"
{ ; } { ; }
break; break;
case 68: case 68:
#line 709 "./parse.yacc" #line 712 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
user_matches = yyvsp[0].BOOLEAN; user_matches = yyvsp[0].BOOLEAN;
} }
break; break;
case 69: case 69:
#line 713 "./parse.yacc" #line 716 "parse.yacc"
{ {
if (yyvsp[0].BOOLEAN != -1) if (yyvsp[0].BOOLEAN != -1)
user_matches = ! yyvsp[0].BOOLEAN; user_matches = ! yyvsp[0].BOOLEAN;
} }
break; break;
case 70: case 70:
#line 718 "./parse.yacc" #line 721 "parse.yacc"
{ {
if (strcmp(yyvsp[0].string, user_name) == 0) if (strcmp(yyvsp[0].string, user_name) == 0)
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1621,7 +1624,7 @@ case 70:
} }
break; break;
case 71: case 71:
#line 725 "./parse.yacc" #line 728 "parse.yacc"
{ {
if (usergr_matches(yyvsp[0].string, user_name)) if (usergr_matches(yyvsp[0].string, user_name))
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1631,7 +1634,7 @@ case 71:
} }
break; break;
case 72: case 72:
#line 732 "./parse.yacc" #line 735 "parse.yacc"
{ {
if (netgr_matches(yyvsp[0].string, NULL, user_name)) if (netgr_matches(yyvsp[0].string, NULL, user_name))
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
@@ -1641,7 +1644,7 @@ case 72:
} }
break; break;
case 73: case 73:
#line 739 "./parse.yacc" #line 742 "parse.yacc"
{ {
aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS); aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
@@ -1664,12 +1667,12 @@ case 73:
} }
break; break;
case 74: case 74:
#line 759 "./parse.yacc" #line 762 "parse.yacc"
{ {
yyval.BOOLEAN = TRUE; yyval.BOOLEAN = TRUE;
} }
break; break;
#line 1673 "sudo.tab.c" #line 1676 "sudo.tab.c"
} }
yyssp -= yym; yyssp -= yym;
yystate = *yyssp; yystate = *yyssp;