Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHD Banners #720

Merged
merged 2 commits into from
Jul 16, 2024
Merged

SSHD Banners #720

merged 2 commits into from
Jul 16, 2024

Conversation

ejohnstown
Copy link
Contributor

@ejohnstown ejohnstown commented Jul 8, 2024

DESCRIPTION

Add support for loading banner files into wolfSSHd. (ZD 18156)

TESTING

Add "Banner filename.txt" to the sshd_config file used by wolfSSHd.

1. Add getting the banner option from the configuration file. Per the
   sshd_config(5) manpage, this is supposed to be a filename.
2. Load the banner file and set the banner into the CTX.
{
if (banner != NULL && *banner != NULL) {
#ifndef NO_FILESYSTEM
freeBufferFromFile(*banner, NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in the config for the specific user I think. To handle something like this in the future:

Match User sshUser
    Banner /path/to/specific_banner

Copy link
Contributor

Choose a reason for hiding this comment

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

Opps sorry, looks like it is setup that way. Just init/free different than I expected. Please double check the XFREE call though after CleanupCTX (with *banner set to NULL here).

@JacobBarthelmeh JacobBarthelmeh dismissed their stale review July 15, 2024 22:39

No longer requesting changes, only comment to review the free of banner.

@douzzer douzzer merged commit 01c1aad into wolfSSL:master Jul 16, 2024
36 checks passed
@ejohnstown ejohnstown deleted the sshd-banner branch July 16, 2024 20:59
jefferyq2 pushed a commit to jefferyq2/wolfssh that referenced this pull request Sep 24, 2024
jefferyq2 pushed a commit to jefferyq2/wolfssh that referenced this pull request Oct 18, 2024
jefferyq2 pushed a commit to jefferyq2/wolfssh that referenced this pull request Oct 29, 2024
jefferyq2 pushed a commit to jefferyq2/wolfssh that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants