Repository navigation
ssh: Add support for userauth banner. - #610
snimmagadda wants to merge 10 commits into
Conversation
The new libssh2_userauth_banner API allows to get an optional userauth banner sent with SSH_MSG_USERAUTH_BANNER packet by the server.
|
Close and reopen PR to trigger a ci/appveyor rebuild. Last run hit a maximum limit and logs show "Waiting for SSH connection from GitHub Actions...". |
willco007
left a comment
There was a problem hiding this comment.
userauth_banner can be junk memory when calling libssh2_userauth_banner() if it hasn't been allocated or banner_len is an unexpected value. It should probably be set to NULL on initialization.
|
@willco007 I believe this memset during session initialization sets |
Suggested by Will Cosgrove.
|
Looking forward for this functionality to be back in the next release ! |
|
Anyone using this PR that can comment on it before we land it? |
|
I had a small diff in my tree that I forgot to push until I received this comment. Sorry for the delay, it's safer to explicitly NUL terminate before using the banner as a string. |
Pointed out by Daniel Stenberg (bagder).
Suggested by Daniel Stenberg (bagder).
|
Thanks! |
The new libssh2_userauth_banner API allows to get an optional userauth banner sent with SSH_MSG_USERAUTH_BANNER packet by the server. Closes libssh2#610
|
Any plan on when this will be merged to master? |
|
It's in. d5ed0e6 |
|
Awesome! Thanks! 🙂
…________________________________
From: Will Cosgrove ***@***.***>
Sent: Wednesday, June 7, 2023 6:29 AM
To: libssh2/libssh2 ***@***.***>
Cc: Vuarnoz, Vincent Bremer ***@***.***>; Comment ***@***.***>
Subject: [External] Re: [libssh2/libssh2] ssh: Add support for userauth banner. (#610)
It's in. d5ed0e6<d5ed0e6>
—
Reply to this email directly, view it on GitHub<#610 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATE6ABCFDFAFWF2G4R3SKRTXJ77UHANCNFSM46AOCQCQ>.
You are receiving this because you commented.Message ID: ***@***.***>
This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).
|
This PR tries to revive #444 by @palmin which was based on #274 by @dmiller-nmap and @bonsaiviking from late 2018.
Instead of a do..while(1) loop, this PR calls _libssh2_packet_requirev() again after handling SSH_MSG_USERAUTH_BANNER similar to what's being done in _libssh2_userauth_publickey(). Additionally, userauth_banner is freed in session_free().