Skip to content

Commit 45e3c0d

Browse files
committed
timestamp_open: add some debugging
1 parent 3297ffa commit 45e3c0d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugins/sudoers/timestamp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ timestamp_open(const struct sudoers_context *ctx)
481481
/* Already logged set_perms/restore_perms error. */
482482
goto bad;
483483
}
484+
sudo_debug_printf(SUDO_DEBUG_INFO, "%s: opened time stamp file %s",
485+
__func__, fname);
484486

485487
/* Remove time stamp file if its mtime predates boot time. */
486488
if (tries == 1 && fstat(fd, &sb) == 0) {
@@ -521,6 +523,8 @@ timestamp_open(const struct sudoers_context *ctx)
521523
close(dfd);
522524
debug_return_ptr(cookie);
523525
bad:
526+
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
527+
"%s: unable to open time stamp file %s", __func__, fname);
524528
if (dfd != -1)
525529
close(dfd);
526530
if (fd >= 0)

0 commit comments

Comments
 (0)