Skip installing/unlinking files without doedit set --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -247,6 +247,8 @@ /* Install the sudoers temp files. */ tq_foreach_fwd(&sudoerslist, sp) { + if (!sp->doedit) + continue; if (!sp->modified) (void) unlink(sp->tpath); else