patch to fix segfaults on hurd
[debian/sudo] / debian / patches / skip-noedit.diff
diff --git a/debian/patches/skip-noedit.diff b/debian/patches/skip-noedit.diff
new file mode 100644 (file)
index 0000000..569bc13
--- /dev/null
@@ -0,0 +1,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