You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The patch in pull #205 fixed the motd display for interactive sessions, but breaks non-interactive sessions like sftp
Steps to reproduce
Set up login_duo.conf with both the "groups" config and "motd = yes"
Log in via sftp as a user who is not in the specified group(s) - sftp fails with "Received message too long"
Specs
OS version (ie CENTOS 7 or Ubuntu 14): Ubuntu 18.04
OS arch (ie 32 or 64): 64
Using pam_duo or login_duo: login_duo
Cause
This is caused because the motd prints regardless of whether the session is interactive or non-interactive. The test for this and setting of the "headless" variable is later in duo_auth(). It seems the best fix is to do the detection and setting of this variable earlier.
I have done minimal testing of the patch below and it appears to fix the issue for me. It would be great, though, to have someone that knows the code better make sure this won't break something else.
Summary
The patch in pull #205 fixed the motd display for interactive sessions, but breaks non-interactive sessions like sftp
Steps to reproduce
Specs
Cause
This is caused because the motd prints regardless of whether the session is interactive or non-interactive. The test for this and setting of the "headless" variable is later in duo_auth(). It seems the best fix is to do the detection and setting of this variable earlier.
I have done minimal testing of the patch below and it appears to fix the issue for me. It would be great, though, to have someone that knows the code better make sure this won't break something else.
Patch
The text was updated successfully, but these errors were encountered: