Commit Graph

138 Commits (055d024b2e0a07885c550f72238134ff787b0a70)

Author SHA1 Message Date
JacobBarthelmeh 3859213936 use childFd when not handling a forced command 2025-02-19 12:00:38 -07:00
JacobBarthelmeh 60cd4bca73 redirect stdin with forced command 2025-02-19 10:32:08 -07:00
JacobBarthelmeh bbe3bac2d5 add regression test and use a better macro name 2025-02-18 10:50:05 -07:00
JacobBarthelmeh ab3622e672 fix for FD_SET call on pipes and handling of channel EOF 2025-02-17 10:07:39 -07:00
JacobBarthelmeh c8692f7570 kill child process after SSH connection failure 2024-11-25 16:36:54 -07:00
JacobBarthelmeh 6e70a07cfd fix for handling memory on socket timeout 2024-11-15 11:10:16 -07:00
JacobBarthelmeh b8e6f595b4 show version of wolfSSL linked to 2024-09-27 14:36:42 -06:00
JacobBarthelmeh 2fbe01092d account for partial sends 2024-08-05 14:48:51 -06:00
JacobBarthelmeh 781aa27582 touch up after rebase 2024-08-05 13:31:47 -06:00
JacobBarthelmeh 2722cb9da8 handle send retry when SSH window is full 2024-08-05 13:31:47 -06:00
John Safranek a4f860d071 Release v1.4.18: Release Fixes
1. Update scp.test to delete the empty test file.
2. In wolfSSHd, when coverting an IP address to a printable
   representation, the destination needs to be able to handle IPv6
   addresses potentially.
2024-07-19 14:38:07 -07:00
John Safranek 1a6225671b Release v1.4.18: Release Testing Fixes (Windows)
1. For the ASCII and Wide versions of types and functions, make sure
   the wolfSSHd is being consistent using them.
2. In SFTP, use WSOCKETCLOSE to close the socket. Use the correct type
   for the socket.
3. Add parens around part of a ternary operator check to clear up some
   ambiguous order of operations.
4. Add a variable initializer for a COORD structure.
5. Add parameter checks to the Base16_Decode function.
6. Fix a double-freed handle.
7. Clean up a bunch of build warnings.
2024-07-19 12:03:32 -07:00
John Safranek e7ad7dd922
Merge pull request #722 from JacobBarthelmeh/sshd-windows
Fixes for SSHD Windows virtual terminal sequences
2024-07-17 14:06:37 -07:00
Daniel Pouzzner 01c1aadfba
Merge pull request #720 from ejohnstown/sshd-banner
SSHD Banners
2024-07-16 15:43:17 -05:00
Daniel Pouzzner e3bed88ead
Merge pull request #718 from ejohnstown/wolfsshd-closure
wolfSSHd Connection Closure
2024-07-16 15:41:50 -05:00
John Safranek 6c69c12bf7 wolfSSHd Connection Closure
1. Initialize all the fds to -1.
2. Add flags for peerConnected and stdoutEmpty.
3. Remove the idle counter.
4. When the socket would block on write, set a flag to check the socket for
   writing later to call the worker which will send pending data.
5. When reading the pipes, a 0 returns means the pipe is closed. Deal
   with that.
6. If the ssh write fails, interrupt the subordinate process.
7. When waiting for the peer to close its channel and shutdown, sleep
   for 100ms, rather than 1us. It takes a little while to tear down.
8. Shutdown the peer socket. Spin on receiving the peer socket until it
   closes or has an error.
9. Fixed a few function wrappers; was using Xname instead of Wname.
2024-07-16 10:50:12 -07:00
Lealem Amedie 5ea74bc22d Free resources 2024-07-15 17:19:20 -06:00
JacobBarthelmeh 89a24568a6 remove extra debug print outs 2024-07-12 01:02:33 -06:00
JacobBarthelmeh 25a0414378 handling virtual terminal sequences with exec command 2024-07-12 00:43:13 -06:00
Lealem Amedie b0cf4cfa5d Don't exit wolfSSHd daemon on recoverable fcntl failure 2024-07-11 16:56:39 -06:00
Lealem Amedie ff3e0177f7 Don't set banner unless specified in config 2024-07-10 15:06:51 -07:00
John Safranek 7fc63e86bf SSHD Banners
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.
2024-07-08 10:02:41 -07:00
Anthony Hu 499a742097 improvements for ipv6 2024-05-31 17:32:20 -04:00
Anthony Hu 17a9ff4caa Fix compile error triggered by enabling TEST_IPV6 2024-05-27 17:09:00 -04:00
Sean Parkinson 9b29ba68cc
Merge pull request #666 from JacobBarthelmeh/progress_bar
refactor windows wolfsshd service to resolve powershell Write-Progress
2024-04-30 08:52:13 +10:00
John Safranek 6d51cc8278
Release v1.4.17: Release Testing Fixes
1. C++ build required some additional typecasting.
2. C++ complained about using the `= { 0 }` initializer, switched to
   `WMEMSET()`.
2024-03-22 17:09:01 -07:00
John Safranek 1736a4cabf
Update Copyright Date
1. Bring all copyright dates up to 2024.
2. Fix a few files with incorrect licensing.
2024-03-22 12:17:09 -07:00
JacobBarthelmeh 4ad5c5cd76 refactor windows wolfsshd service to resolve powershell Write-Progress 2024-03-12 10:18:42 -06:00
JacobBarthelmeh 46cdfc570d set pipes as non blocking before last read 2024-02-03 00:24:04 -07:00
JacobBarthelmeh 8ce9d164ca fix windows build with sshd 2024-02-02 09:46:41 -07:00
JacobBarthelmeh 2366417b06 increase type size for command name and improve handling read of pipes after command exits 2024-01-26 14:01:52 -07:00
JacobBarthelmeh 31ffa18492 account for last bit of left over data in pipes after command exits 2024-01-26 14:01:50 -07:00
JacobBarthelmeh e8f34afe6e fix to only use stdout/stderr pipes with forced commands 2024-01-26 14:01:06 -07:00
JacobBarthelmeh b711d62238 add piping of stderr 2024-01-26 14:00:21 -07:00
John Safranek dce3cf09e9
Merge pull request #614 from JacobBarthelmeh/err
send error status on exit
2024-01-23 14:26:23 -08:00
JacobBarthelmeh ad8bd954a1 do not set SIG_IGN now that the parent process is getting the childs exit status 2024-01-23 14:44:20 -07:00
JacobBarthelmeh 39b6e26c7e improve unix/linux wait for child exit status 2024-01-23 14:39:47 -07:00
JacobBarthelmeh 7d2b4c5e39 fix typo in macro guard 2024-01-22 15:10:53 -07:00
JacobBarthelmeh 80a21ccc09 print out log on fail and remove print out from alarm 2024-01-19 09:22:13 -07:00
JacobBarthelmeh 6791f979aa account for sleep on windows 2024-01-19 09:18:41 -07:00
JacobBarthelmeh 0d480fa419 adjust shutdown for sending exit status cleanly 2024-01-19 09:18:41 -07:00
JacobBarthelmeh f41e706825 add exit status return to Windows server 2024-01-19 09:18:41 -07:00
JacobBarthelmeh fda22526e2 add linux server side sending of exit-status 2024-01-19 09:18:41 -07:00
John Safranek 92c4242b1f
wolfSSHd Terminal
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".
2023-12-28 15:20:11 -08:00
John Safranek 711fee25f2
wolfSSHd Terminal
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.
2023-12-28 15:02:01 -08:00
JacobBarthelmeh 47ce821b33 avoid zombie processes 2023-12-04 00:13:39 -07:00
John Safranek 76c6c9974f
Merge pull request #627 from JacobBarthelmeh/term
add terminal resize callback for unix like use
2023-12-01 15:39:11 -08:00
JacobBarthelmeh a5103bf885 add terminal resize callback for unix like use 2023-11-30 16:12:06 -08:00
JacobBarthelmeh 9a33bed122 add regression test for grace period login 2023-11-28 10:04:11 -07:00
JacobBarthelmeh 82323db6f8 cancel alarm timer after connected 2023-11-28 08:01:05 -07:00