Edit all sudoers file if there were unused or undefined aliases and we
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 15 Nov 2004 03:37:53 +0000 (03:37 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 15 Nov 2004 03:37:53 +0000 (03:37 +0000)
are in strict mode.

visudo.c

index 59c1cf6dc8d346a90a72f81a659003659d6004f4..29a2612c6e4e90a1e797f1067c5153644ec079f0 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -420,7 +420,7 @@ reparse_sudoers(editor, strict, quiet)
        if (parse_error) {
            /* Edit file with the parse error */
            for (sp = sudoerslist.first; sp != NULL; sp = sp->next) {
-               if (strcmp(sp->path, errorfile) == 0) {
+               if (errorfile == NULL || strcmp(sp->path, errorfile) == 0) {
                    edit_sudoers(sp, editor, errorlineno);
                    break;
                }