]> granicus.if.org Git - sudo/commitdiff
Log the number of PAM messages in the conversation function at debug
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Feb 2016 16:30:31 +0000 (09:30 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Feb 2016 16:30:31 +0000 (09:30 -0700)
level.

plugins/sudoers/auth/pam.c

index 8543c7f0bede456c34915fd8d9142e9cb82b266f..90f4eabf1a1d0d8728c4918b02870b4f8366e989 100644 (file)
@@ -372,8 +372,7 @@ sudo_pam_end_session(struct passwd *pw, sudo_auth *auth)
 #endif /* PAM_TEXT_DOMAIN */
 
 /*
- * ``Conversation function'' for PAM.
- * XXX - does not handle PAM_BINARY_PROMPT
+ * ``Conversation function'' for PAM <-> human interaction.
  */
 static int
 converse(int num_msg, PAM_CONST struct pam_message **msg,
@@ -393,6 +392,8 @@ converse(int num_msg, PAM_CONST struct pam_message **msg,
            "invalid number of PAM messages: %d", num_msg);
        debug_return_int(PAM_CONV_ERR);
     }
+    sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO,
+       "number of PAM messages: %d", num_msg);
 
     if ((*response = calloc(num_msg, sizeof(struct pam_response))) == NULL) {
        sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));