I've looked into pam_motd, and found that it already has this code at the top of the call:
if (flags & PAM_SILENT) {
return retval;
}
So I think this is an openssh issue - openssh ought to be setting PAM_SILENT in cases where it doesn't plan to show PAM_TEXT_INFO messages, so that the PAM modules don't waste their time.
I've looked into pam_motd, and found that it already has this code at the top of the call:
if (flags & PAM_SILENT) {
return retval;
}
So I think this is an openssh issue - openssh ought to be setting PAM_SILENT in cases where it doesn't plan to show PAM_TEXT_INFO messages, so that the PAM modules don't waste their time.