Bug 117

Summary: Parameter_List referenced but not defined
Product: Sudo Reporter: John Jolly <jjolly>
Component: DocumentationAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: normal    
Version: 1.6.7   
Hardware: All   
OS: All   
URL: http://www.sudo.ws/sudo/man/sudoers.html#defaults

Description John Jolly 2003-06-11 06:44:50 MDT
In the EBNF for the Default keyword in the sudoers manpage is found the 
following BNF:

 Default_Type ::= 'Defaults' ||
                  'Defaults' '@' Host ||
                  'Defaults' ':' User ||
                  'Defaults' '>' RunasUser
 Default_Entry ::= Default_Type Parameter_List
 Parameter ::= Parameter '=' Value ||
               Parameter '+=' Value ||
               Parameter '-=' Value ||
               '!'* Parameter ||

The 'Default_Entry' line references a Parameter_List, but Parameter_List is not 
defined anywhere in the manpage.  The Suggested BNF should (possibly) look like 
this:

 Default_Type ::= 'Defaults' ||
                  'Defaults' '@' Host ||
                  'Defaults' ':' User ||
                  'Defaults' '>' RunasUser
 Default_Entry ::= Default_Type Parameter_List
 Parameter ::= Parameter '=' Value ||
               Parameter '+=' Value ||
               Parameter '-=' Value ||
               '!'* Parameter ||
 Parameter_List ::= Parameter |
                    Parameter ',' Parameter_List

Also, there is an apparent descrepency of usage for the 'or' pipe in the BNF 
found with the Default parameter versus other parameters (i.e. User_List).  In 
Default, double-pipes are used to specify 'or', where everyplace else uses the 
single-pipe.  I suggest the Default parameter contains the improper 'or' pipes 
because of this line near the top of the manpage in the 'Quick Guide to EBNF' 
section:

 symbol ::= definition | alternate1 | alternate2 ...
Comment 1 Todd C. Miller 2004-01-17 14:26:10 MST
The EBNF grammar will be fixed in the next release of sudo.