Bug 318

Summary: visudo syntax error on multi-line statements after a comment
Product: Sudo Reporter: Dale King <daleking>
Component: VisudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.7.0   
Hardware: PC   
OS: Linux   

Description Dale King 2008-11-23 18:41:46 MST
Hi,

I have the following issue, that may be related to the comment in the UPGRADE note about digits following comments, though is not exactly described by it.

Consider the following visudo file that fails with a syntax error on line 3:

---
#
# a comment
#
User_Alias TEST = test1, \
                  test2
---

The following two sudoers files are syntactically OK:

---
#
# a comment
#

User_Alias TEST = test1, \
                  test2
---

and

---
#
# a comment
#
User_Alias TEST = test1, test2
---

The simple workarounds are adding a newline after the comment, or avoiding multi-line statements.

Thanks,
Dale
Comment 1 Todd C. Miller 2008-11-23 19:46:08 MST
I've updated the tarball at ftp://ftp.sudo.ws/pub/millert/sudo/sudo-1.7.0rc6.tar.gz with a fix
Comment 2 Dale King 2008-11-23 20:31:23 MST
Great!  It works like a treat.

Thanks again Todd.