]> granicus.if.org Git - sudo/commitdiff
Do not produce a warning for "sudo -k" if the ticket file does not
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 3 Aug 2010 19:16:57 +0000 (15:16 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 3 Aug 2010 19:16:57 +0000 (15:16 -0400)
exist.

plugins/sudoers/check.c

index a644080f39063c7d337f6e9aa404bedca4e93a10..156f051b859b776649a9cfd5d8505c8f4ccf4b88 100644 (file)
@@ -641,7 +641,7 @@ remove_timestamp(int remove)
            }
        } else {
            timevalclear(&tv);
-           if (touch(-1, path, &tv) == -1)
+           if (touch(-1, path, &tv) == -1 && errno != ENOENT)
                error(1, "can't reset %s to Epoch", path);
        }
     }