On 23 January 2014 16:58, Andy Doan <email address hidden> wrote:
> 423 + with open(SUDOERS_FILE) as fp:
> 424 + contents = fp.read()
> 425 + if not contents.strip('\n').endswith(SUDOERS):
> 426 + return False
>
> non-root users can't read this file so the script fails.
On 23 January 2014 16:58, Andy Doan <email address hidden> wrote: strip(' \n').endswith( SUDOERS) :
> 423 + with open(SUDOERS_FILE) as fp:
> 424 + contents = fp.read()
> 425 + if not contents.
> 426 + return False
>
> non-root users can't read this file so the script fails.
Mine is 0644. Fixed as r141.