From: Todd C. Miller Date: Fri, 9 May 2014 15:29:42 +0000 (-0600) Subject: Don't try to install the temporary sudoers file if we didn't edit it. X-Git-Tag: SUDO_1_8_11^2~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45ff42eb9f4efd5e16a089588dbfa5cb2f50d2e0;p=sudo Don't try to install the temporary sudoers file if we didn't edit it. By default, visudo does not edit files in a #includedir. Fixes a NULL pointer defef on GNU hurd; Bug #647 --- diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index c491629f2..79e6486bf 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -266,7 +266,8 @@ main(int argc, char *argv[]) */ if (reparse_sudoers(editor, args, strict, quiet)) { TAILQ_FOREACH(sp, &sudoerslist, entries) { - (void) install_sudoers(sp, oldperms); + if (sp->doedit) + (void) install_sudoers(sp, oldperms); } }