Skip to content

Revive introduction of libssh2_userauth_banner - #444

Closed
palmin wants to merge 5 commits into
libssh2:masterfrom
palmin:revive-auth-banner
Closed

palmin wants to merge 5 commits into
libssh2:masterfrom
palmin:revive-auth-banner

Conversation

@palmin

@palmin palmin commented Jan 4, 2020

Copy link
Copy Markdown
Contributor

This PR tries to revive #274 by @dmiller-nmap and @bonsaiviking from late 2018.

It includes bounds checks as requested by @willco007 and merges cleanly with libssh 1.9.0.

@palmin

palmin commented Jan 4, 2020

Copy link
Copy Markdown
Contributor Author

Closing and reopening PR to trigger a Travis rebuild.

@palmin palmin closed this Jan 4, 2020
@palmin palmin reopened this Jan 4, 2020
@palmin
palmin force-pushed the revive-auth-banner branch 3 times, most recently from df74a32 to 1e3bfc7 Compare January 4, 2020 16:49
@palmin
palmin force-pushed the revive-auth-banner branch from 1e3bfc7 to 7b11cad Compare January 4, 2020 17:22
@willco007

Copy link
Copy Markdown
Member

This looks OK to me, anyone else using this?

@tiennou tiennou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just got a few review remarks. The code looks fine to go in otherwise.

Comment thread src/userauth.c Outdated
* banner_len_out.
*/
LIBSSH2_API char *
libssh2_userauth_banner(LIBSSH2_SESSION * session,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not fond of the implicit requirement of having to call libssh2_userauth_list first. If you're calling that for some session you're not really responsible of (say, a progress bar debug widget), you can't tell from the return code alone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I change libssh2_userauth_banner to have a return code and output parameter for the banner?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be more consistent with the existing APIs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@palmin
palmin force-pushed the revive-auth-banner branch 4 times, most recently from 54c1e7b to a869c91 Compare February 6, 2020 13:50
@palmin

palmin commented Feb 9, 2020

Copy link
Copy Markdown
Contributor Author

Travis build is failing after compiling tests but while running them and I don't really know how to fix this.

It looks like it is some kind of Docker problem and I'm not experiencing this when running tests locally.

Any advice on things to attempt?

@palmin
palmin force-pushed the revive-auth-banner branch from a869c91 to 1483300 Compare March 23, 2020 16:35
@palmin

palmin commented Mar 23, 2020

Copy link
Copy Markdown
Contributor Author

I updated the date on a commit just to check if CI was in a better mood and now all checks pass.

Comment thread src/userauth.c Resolved
@stale

stale Bot commented Sep 15, 2020

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Sep 15, 2020
@willco007 willco007 removed the stale label Sep 23, 2020
@stale

stale Bot commented Jan 23, 2021

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Jan 23, 2021
@T35R6braPwgDJKq

Copy link
Copy Markdown

Whats the state here?

@stale stale Bot removed the stale label Jan 26, 2021
@willco007

Copy link
Copy Markdown
Member

I was just looking at this again and userauth_banner is being leaked. It needs to be freed in session_free()

@willco007

willco007 commented Feb 5, 2021 •

Copy link
Copy Markdown
Member

It should probably also be set to NULL in the if block session->userauth_list_state == libssh2_NB_state_idle). However, that leads me to wonder why this is in the userauth_list call instead of being its own thing.

@DevAGCO

DevAGCO commented Mar 10, 2021

Copy link
Copy Markdown

We are looking forward for this feature to be available again !

@stale

stale Bot commented Jul 13, 2021

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Jul 13, 2021
@stale stale Bot closed this Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants