summaryrefslogtreecommitdiff
path: root/debian/patches/skip-noedit.diff
blob: 569bc1381668418ae363af74036c8b05081968ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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