summaryrefslogtreecommitdiff
path: root/sudo.tab.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>1999-08-17 12:47:53 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>1999-08-17 12:47:53 +0000
commit14ea6f10e7046ce1b7c763385f2368df4f48247e (patch)
treea95b4d3eedfc52cd9c693cec91d2d5a02a0c6f4c /sudo.tab.c
parent1ca48db27ebaee062852f4dd92fed468b70f4122 (diff)
downloadsudo-14ea6f10e7046ce1b7c763385f2368df4f48247e.tar.gz
In pedantic mode we need to save *all* the aliases, not just those
that match, or we get spurious warnings.
Diffstat (limited to 'sudo.tab.c')
-rw-r--r--sudo.tab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sudo.tab.c b/sudo.tab.c
index 462c00486..b02f7efec 100644
--- a/sudo.tab.c
+++ b/sudo.tab.c
@@ -1440,7 +1440,7 @@ case 44:
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);
@@ -1482,7 +1482,7 @@ break;
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;
@@ -1503,7 +1503,7 @@ break;
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;
@@ -1532,7 +1532,7 @@ break;
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;
@@ -1549,7 +1549,7 @@ break;
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;