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

wolfSSHd Terminal #640

Merged
merged 3 commits into from
Jan 4, 2024
Merged

wolfSSHd Terminal #640

merged 3 commits into from
Jan 4, 2024

Conversation

ejohnstown
Copy link
Contributor

Some cleanups and improvements to the code in wolfSSHd that starts the user's shell. Uses the modes in the client's terminal settings provided in the PTY request. Also configures some of the inherited variables in the new shell.

1. Rename the stashed window size values.
2. Set the terminal modes after the child process is running.
3. Decode the modes list from the pty-request message.
4. Store the modes list for later use.
1. Prep the SHELL variable inherited by the new shell to be equal to the
   user's shell.
2. Prep the new shell's $0 variable to be equal to the shell name
   prefixed with a '-', ie "/bin/bash" becomes "-bash".
1. Modified the ssh terminal size test to be agnostic to the version of
   sed used.
2. Add some guards around the mode setting code for ioctl() availability
   so it would build for Windows.
Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

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

LGTM

@douzzer douzzer merged commit f481ed5 into wolfSSL:master Jan 4, 2024
10 checks passed
@ejohnstown ejohnstown deleted the wolfsshd-term branch January 4, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants