Bugzilla – Bug 342
segmentation fault when /etc/sudoers has wrong perms (among others)
Last modified: 2009-11-17 10:15:28 MST
When /etc/sudoers has wrong permissions then a 'sudo bla' answers sudo: /etc/sudoers is mode 0442, should be 0440 Segmentation fault The bug is at sudo.c:1089, where fileno is called with fp, even though fp is NULL. This is not only the case for wrong perms for /etc/sudoers but rather for any other error related to /etc/sudoers. Checked if the bug is also present in latetest webCVS version, and it is.
Created attachment 249 [details] Simple patch: remove the NO_EXIT flags.
This has been fixed for some time in cvs: revision 1.501 date: 2009/01/09 00:13:37; author: millert; state: Exp; lines: +9 -7 Do not try to set the close on exec flag if we didn't actually open sudoers.
Ah, right, the bug is fixed already. I was reading too inaccurately.
Fixed in sudo 1.7.1. A beta version of sudo 1.7.1 may be downloaded from http://www.sudo.ws/devel.html
*** Bug 374 has been marked as a duplicate of this bug. ***