Add SUDO_DEBUG_ERRNO flag to debug functions so we can log errno.

Use this flag when wrapping error() and warning() so the debug
output includes the error string.
This commit is contained in:
Todd C. Miller
2012-04-04 16:59:31 -04:00
parent a94855f56e
commit 2fe41248ac
4 changed files with 93 additions and 56 deletions

View File

@@ -98,7 +98,7 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
break;
case SUDO_CONV_DEBUG_MSG:
if (msg->msg)
sudo_debug_write(msg->msg, strlen(msg->msg));
sudo_debug_write(msg->msg, strlen(msg->msg), 0);
break;
default:
goto err;