else {
if (pedantic)
(void) fprintf(stderr,
- "Warning: undeclared Cmnd_Alias `%s' referenced near line %d", $1, sudolineno);
+ "Warning: undeclared Cmnd_Alias `%s' referenced near line %d\n", $1, sudolineno);
$$ = -1;
}
free($1);
;
hostalias : ALIAS { push; } '=' hostlist {
- if (host_matches != -1 &&
+ if ((host_matches != -1 || pedantic) &&
!add_alias($1, HOST_ALIAS, host_matches))
YYERROR;
pop;
ga_list[ga_list_len-1].alias = estrdup($1);
}
} '=' cmndlist {
- if (cmnd_matches != -1 &&
+ if ((cmnd_matches != -1 || pedantic) &&
!add_alias($1, CMND_ALIAS, cmnd_matches))
YYERROR;
pop;
ga_list[ga_list_len-1].alias = estrdup($1);
}
} '=' runaslist {
- if (runas_matches != -1 &&
+ if ((runas_matches != -1 || pedantic) &&
!add_alias($1, RUNAS_ALIAS, runas_matches))
YYERROR;
pop;
;
useralias : ALIAS { push; } '=' userlist {
- if (user_matches != -1 &&
+ if ((user_matches != -1 || pedantic) &&
!add_alias($1, USER_ALIAS, user_matches))
YYERROR;
pop;
else {
if (pedantic)
(void) fprintf(stderr,
- "Warning: undeclared Cmnd_Alias `%s' referenced near line %d", yyvsp[0].string, sudolineno);
+ "Warning: undeclared Cmnd_Alias `%s' referenced near line %d\n", yyvsp[0].string, sudolineno);
yyval.BOOLEAN = -1;
}
free(yyvsp[0].string);
case 49:
#line 602 "parse.yacc"
{
- if (host_matches != -1 &&
+ if ((host_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches))
YYERROR;
pop;
case 55:
#line 626 "parse.yacc"
{
- if (cmnd_matches != -1 &&
+ if ((cmnd_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches))
YYERROR;
pop;
case 61:
#line 654 "parse.yacc"
{
- if (runas_matches != -1 &&
+ if ((runas_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches))
YYERROR;
pop;
case 65:
#line 670 "parse.yacc"
{
- if (user_matches != -1 &&
+ if ((user_matches != -1 || pedantic) &&
!add_alias(yyvsp[-3].string, USER_ALIAS, user_matches))
YYERROR;
pop;