Bug 318 - visudo syntax error on multi-line statements after a comment
visudo syntax error on multi-line statements after a comment
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Visudo
1.7.0
PC Linux
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-23 18:41 MST by Dale King
Modified: 2008-11-23 20:31 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.