Bug 437

Summary: Syntax Error on LOG_INPUT/LOG_OUTPUT Tags
Product: Sudo Reporter: Chris Wheeler <clwheel>
Component: VisudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.7.4   
Hardware: IBM   
OS: AIX   
Attachments: Replacement toke.c for sudo 1.7.4p4

Description Chris Wheeler 2010-09-07 16:10:38 MDT
After compiling Sudo 1.7.4p4 on AIX, both visudo and sudo throw syntax errors when using any of the new I/O logging command tags (LOG_INPUT, LOG_OUTPUT, NOLOG_INPUT, NOLOG_OUTPUT).  Here is an example of the usage...

testuser ALL = LOG_INPUT: /usr/bin/su -

When this entry appears in the sudoers file, visudo displays the following when attempting to save the file...

>>> /etc/sudoers: syntax error near line 227 <<<
What now?

It appears that the I/O logging is working otherwise.  If it is configured with "Defaults log_input", it captures the session input as expected.
Comment 1 Todd C. Miller 2010-09-07 17:14:26 MDT
Created attachment 292 [details]
Replacement toke.c for sudo 1.7.4p4

The lexer is missing support for LOG_INPUT/LOG_OUTPUT.  If you build the attached toke.c instead it should work as documented.
Comment 2 Chris Wheeler 2010-09-08 10:55:07 MDT
Thanks.  Looks like that did the trick.
Comment 3 Todd C. Miller 2011-01-15 12:21:02 MST
Fixed in sudo 1.7.4p5
Comment 4 Todd C. Miller 2011-01-15 12:21:30 MST
Fixed in sudo 1.7.4p5