Commit Graph

264 Commits (7f625da9d57fcda45dc34d238a57e684441f5533)

Author SHA1 Message Date
David Garske 055d024b2e
Merge pull request #776 from JacobBarthelmeh/wolfsshd
fix for FD_SET call on pipes and handling of channel EOF
2025-02-19 12:35:27 -08:00
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
Andrew Hutchings a9c7ebc36d Fix SCP server side
SCP on the server side would get an EAGAIN around the 128KB mark, which
would trigger an error. That error in-turn would cause two attempts to
close the file, which would segfault.

Also fix inverted error return status on scpclient.
2025-02-19 11:13:42 +00: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 34c3794396
Merge pull request #768 from LinuxJedi/client-crash
Fix crash when client has no hostname
2025-02-10 16:34:46 -07:00
Andrew Hutchings d108c69c5d Add cppcheck test to GitHub actions
Found and fixed:

* Fix typos in Renesas demo
* Fix uninitialized variable reads
* Fix redundant condition
* Fix argument checks
* Fix some null ptr dereferences
* Fix ambiguous statement
2025-02-05 19:49:01 +00:00
Andrew Hutchings 669bf92683 Fix crash when client has no hostname
If the client is not provided a hostname, `ClientPublicKeyCheck` would
crash trying to match `targetName`. A hostname is required.
2025-02-04 11:18:51 +00:00
JacobBarthelmeh c476e8846e refactor sshd test case script 2025-01-30 18:16:55 -07:00
JacobBarthelmeh c2fefec0eb add debug print out with test case 2025-01-30 17:42:44 -07:00
JacobBarthelmeh e4356dd6ed add test case 2025-01-30 17:31:05 -07:00
JacobBarthelmeh ce5b401ebd add regression test for closing down child on SSH connection issue 2024-11-26 12:01:23 -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
Daniel Pouzzner d3a8ec6dc0
Merge pull request #743 from JacobBarthelmeh/sftp
keep trailing delimiter with SFTP open
2024-11-01 14:24:23 -05:00
JacobBarthelmeh 9e68977945 test setting different wolfssl version for test 2024-10-11 16:23:20 -06:00
John Safranek 8d1efe9fdf Testing Update
1. Update the sshd test to use the newer actions.
2. Parameterize the test for macos and ubuntu.
3. Parameterize the version of wolfssl used.
4. Parameterize the wolfSSH options used.
5. Update a couple test scripts to output their $0 variable instead of
   the wrong string.
2024-10-04 15:44:15 -06:00
JacobBarthelmeh 52e4e32529 keep trailing delimiter with SFTP open 2024-10-04 14:59:40 -06:00
JacobBarthelmeh b8e6f595b4 show version of wolfSSL linked to 2024-09-27 14:36:42 -06:00
John Safranek f51889430f
Merge pull request #732 from JacobBarthelmeh/scp_example
continue to cleanup on fail case and use WLOG for debug messages
2024-08-08 18:11:06 -07:00
JacobBarthelmeh 2fbe01092d account for partial sends 2024-08-05 14:48:51 -06:00
JacobBarthelmeh 15f4dc9d0f adjustments to test case 2024-08-05 13:31:47 -06:00
JacobBarthelmeh 781aa27582 touch up after rebase 2024-08-05 13:31:47 -06:00
JacobBarthelmeh 46832e46b4 add test case 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
JacobBarthelmeh fdecd765b9 continue to cleanup on fail case and use WLOG for debug messages 2024-08-05 13:23:04 -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 0f9e87357b
Merge pull request #715 from JacobBarthelmeh/examples
case of non-console ouptut handle
2024-07-10 11:20:32 -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
Eric Blankenhorn 0719578e29 Fix testsuite with singlethreaded 2024-07-01 09:12:36 -05:00
JacobBarthelmeh 816b314819 case of non-console ouptut handle 2024-06-24 13:52:17 -06:00
Anthony Hu 1697d603c0 Changes inspired by ejohnstown comments. 2024-06-03 14:40:52 -04: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 5d3f8776ed add macro guard on windows version for VT 2024-03-06 09:49:42 -07:00