[augeas-devel] Bug in sudoers.aug

Trevor Hemsley trevor.hemsley at codefarm.com
Mon Aug 3 15:35:30 UTC 2009


Raphaël Pinson wrote:
> On Mon, Aug 3, 2009 at 5:23 PM, Trevor
> Hemsley<trevor.hemsley at codefarm.com> wrote:
>   
>> Running augeas[-libs]-0.5.2-1.el5 from epel-testing on CentOS 5.3 and
>> getting errors when trying to
>>
>> print /files/etc/sudoers/
>>
>> augtool> print /augeas//error/
>> /augeas/files/etc/sudoers/error = "parse_failed"
>> /augeas/files/etc/sudoers/error/pos = "2562"
>> /augeas/files/etc/sudoers/error/line = "67"
>> /augeas/files/etc/sudoers/error/char = "0"
>> /augeas/files/etc/sudoers/error/lens =
>> "/usr/share/augeas/lenses/dist/sudoers.aug:480.10-.57"
>> /augeas/files/etc/sudoers/error/message = "Iterated lens matched less
>> than it should"
>> augtool>
>>
>> >From a process of elimination it appears to be burping on this line in
>> our sudoers file.
>>
>> Defaults
>> syslog=authpriv,log_year,logfile=/var/log/sudo.log,mail_no_perms,mail_no_user,loglinelen=0,mailto="our-admin at ourdomain.com"
>>
>> Problem goes away if I split that line into two and have
>>
>> Defaults
>> syslog=authpriv,log_year,logfile=/var/log/sudo.log,mail_no_perms,mail_no_user,loglinelen=0
>> Defaults mailto="our-admin at ourdomain.com"
>>
>>     
>
> This doesn't work for me. It works when I remove the quotes around the
> value. It seems the current lens only supports double quotes arround
> integer parameters.
>   
But the sudoers man page says this:

       mailto      Address to send warning and error mail to.  The address
                   should be enclosed in double quotes (") to protect
against
                   sudo interpreting the @ sign.  Defaults to root.

So the quotes are mandatory according to the man page.

-- 

Trevor Hemsley
Infrastructure Engineer
.................................................
* C A L Y P S O
* Brighton, UK   

OFFICE 	+44 (0) 1273 666 350
FAX 	+44 (0) 1273 666 351

.................................................
www.calypso.com

This electronic-mail might contain confidential information intended
only for the use by the entity named. If the reader of this message is
not the intended recipient, the reader is hereby notified that any
dissemination, distribution or copying is strictly prohibited.

* P * /*/ Please consider the environment before printing this e-mail /*/




More information about the augeas-devel mailing list