13405 Commits

Author SHA1 Message Date
Tess Gauthier
fdde2326f9
Fix static analysis warning ()
* update function declaration and definition to match usage

* change _Outptr_ to _Out_
2025-04-01 14:15:59 -04:00
Tess Gauthier
de4c0c7c59
fix warnings () 2025-03-31 15:15:57 -04:00
LainOTN2
31f8d13ab6
Fix for Y2038 gettimeofday for Win32 builds ()
* Fix for Y2038 gettimeofday for Win32 builds

* fixing spaces

* Fixing also the builtin gettimeofday
2025-03-26 14:50:34 -04:00
Tess Gauthier
ae72d833fd
Crank version ()
* bump libressl version

* bump openssh version
2025-03-26 11:40:53 -04:00
Tess Gauthier
0096029101
fix non-interactive session regression with sshd-session ()
* change sshd to sshd-session for process flag

* add pester test
2025-03-13 15:28:04 -04:00
Tess Gauthier
a96b3fbae4
add publish test results step to CI with pester test fix ()
* upload results from setup tests

* Update test results file path in CI

* Update ci.yml

* Update Setup.Tests.ps1

* Add systemDrive variable and update paths

* Update variable names in CI configuration

* Enable task failure on failed tests

* Comment out sshd service stop command to test CI

* uncomment part of pester test
2025-02-24 16:57:30 -05:00
Tess Gauthier
8514f78233
change default keygen key type ()
* change default keygen key type

* increase DEFAULT_BITS_ECDSA to 384

* change default key path to ECDSA
2025-02-21 14:26:04 -05:00
Tess Gauthier
41734eb591
Update chroot symlink check ()
* start sftp chroot symlink fix

* update symlink logic chroot check

* fix order
2025-02-20 16:26:18 -05:00
Leonard Hecker
8fe096c7b7
Increase stdin chunksize from 16 to 1024 chars () 2025-01-13 10:51:15 -05:00
Tess Gauthier
b36bc85f47
Update ssh folder permissions check in SSHD ()
* remove check on progdata/ssh/log folder permissions

* add pester test

* modify permissions check to log event without failing startup

* modify perm check

* update test

* uncomment code

* modify pester test

* address review feedback

* address review feedback

* fix multi-line logging

* cleanup allocations

* address review feedback

* address additional review feedback

* store value in tmp var
2025-01-10 10:47:23 -05:00
Tess Gauthier
7baad0a474
make env vars optional for default allow list path ()
* make env vars optional for default allow list path

* add pkcs11 pester test

* use lowercasing within method
2025-01-07 10:02:04 -05:00
Tess Gauthier
86bc0d7df9
remove sntrup761x25519-sha512 from supported kex list () 2025-01-06 14:12:21 -05:00
Tess Gauthier
cdcc8d34d8
Fix tilde expand for Windows paths with backslashes ()
* add backslash support for Windows paths

* add pester tests for tilde_expand

* fix typo
2025-01-06 14:11:58 -05:00
Andrew
0c3137f621
Fix hang in syncio_close () 2024-12-18 15:36:43 -05:00
Tess Gauthier
265df19787
Fix include paths ()
* fix Include abs path on Windows

* add pester tests for Include directive

* fix tests

* fix typo
2024-12-10 11:57:15 -05:00
Tess Gauthier
348084cc9a
Update sshd_config to latest defaults () 2024-12-09 11:27:41 -05:00
Tess Gauthier
0dd6d2cd21
username logging fix ()
* initial pass at including username from sftp

* initialize user to unknown

* update tests

* fix spacing

* fix test take 2
2024-11-21 16:42:02 -05:00
manu0401
27f6cfa7b0
Add an environement variable to control stdio mode ()
* Add an environement variable to control stdio mode

stdio descriptors (stdin, stdout and stderr) can be operated in various
modes by win32compat code. The behavior is set very early in
fd_table_initialize() by setting pio->type.

In https://github.com/PowerShell/Win32-OpenSSH/issues/1427 it was
chosen to set pio->type to NONSOCK_SYNC_FD to resolve an I/O hang
problem. Unfortunately this introduce problems for other ssh usage.

sshfs-wiun uses ssh and has at leas 6 open issues for the same
problem introduced by this NONSOCK_SYNC_FD change:
https://github.com/winfsp/sshfs-win/issues?q=is%3Aissue+cb+%3A87

The sshfs-win workaround it to use an older ssh.exe from cygwin, which
is bundled with sshfs-win. This program is unable to use ssh-agent,
which is quite frustrating. And if PATH is not set to use it, sshfs-win
cannot work.

This change introduce an OPENSSH_STDIO_MODE environment variable that
can be set to the following values: unknown, sock, nonsock, nonsock_sync.
It cause pio->type to be set to UNKNOWN_FD, SOCK_FD, NONSOCK_FD, and
NONSOCK_SYNC_FD respecitively. The default behavior when the variable
is not set is unchanged (which means NONSOCK_SYNC_FD).

Setting OPENSSH_STDIO_MODE="nonsock" lets sshfs-win work again with
openssh-portable ssh.exe. ssh-agent can be used, and this is good.

* Leave out  UNKNOWN_FD as the possible rtpes for stdio descriptors

An assert(pio->type != UNKNOWN_FD) in fd_table_set() causes that
case to fail early anyway.
2024-11-19 16:14:43 -05:00
Tess Gauthier
796d297a66
fix open call for ssh-keygen ()
* fix open call for ssh-keygen

* fix test

* fix formatting
2024-11-18 16:55:49 -05:00
Mike Gilbert
a915f06c78
Set argv[argc] to NULL when calling main ()
* Set argv[argc] to NULL when calling main

ISO C states that argv[argc] shall be a null pointer.

The OpenSSH codebase does not appear to rely on this currently, but
better to be safe in case something changes.

* Check for malloc failure in sshd wmain
2024-10-14 17:43:35 -04:00
Tess Gauthier
d7e886b9f6
Update version.rc () v9.8.1.0 2024-10-09 16:38:44 -04:00
Tess Gauthier
e1661bfcb4
add sshd-session to msi () 2024-10-09 14:23:52 -04:00
Tess Gauthier
64f148cc3b
fix for msrc cases () v9.8.0.0 2024-10-08 16:25:04 -04:00
Tess Gauthier
b4d7f739df
Fix banner ()
* update banner

* update banner
2024-09-26 17:51:06 -04:00
Tess Gauthier
414d8531ce
Update paths.targets () 2024-09-25 13:05:04 -04:00
Tess Gauthier
14ecb9d70e
update openssh banner () 2024-09-18 15:46:24 -04:00
Tess Gauthier
7033d00153
Merge pull request from tgauth/merge-9.8
Merge upstream 9.8
2024-09-18 14:27:52 -04:00
Tess Gauthier
d8b0147df2
Merge pull request from tgauth/update-dependencies
Update dependency versions
2024-09-17 13:12:13 -04:00
Tess Gauthier
f168dca436 remove DSA from pester tests 2024-09-16 11:37:57 -04:00
Tess Gauthier
0e69c3dd2b fix spacing 2024-09-16 11:24:27 -04:00
Tess Gauthier
10d03163e9 confirm failing tests are due to DSA deprecation 2024-09-16 11:18:06 -04:00
Tess Gauthier
718738b783 merge latestw_all 2024-09-13 16:34:42 -04:00
Tess Gauthier
4d7e9c189c address review feedback 2024-09-13 16:33:01 -04:00
Tess Gauthier
f0d05b5fec cleanup config declarations 2024-09-13 16:32:45 -04:00
Tess Gauthier
251eb8d522 using openbsd compat for arc4random 2024-09-13 15:54:07 -04:00
Tess Gauthier
dcdd707699 fix function definitions 2024-09-13 15:49:07 -04:00
Tess Gauthier
b240ddf209
bump libressl and libfido2 versions 2024-09-13 14:50:53 -04:00
Tess Gauthier
0eab6d5d68
Merge pull request from tgauth/sync-with-upstream-2
Sync with upstream 9.7
2024-09-09 14:12:13 -04:00
Tess Gauthier
56d415a029
fix group check for user () 2024-08-27 16:49:50 -04:00
Tess Gauthier
cc2dc243e0
Update ZLib version 2024-08-27 11:22:27 -04:00
Yusi (James) Zhang
59a553e67e
Missing */. () 2024-08-22 13:24:24 -04:00
Tess Gauthier
03ae1035d1
change comment to ifdef 2024-08-20 13:29:41 -04:00
Tess Gauthier
9215a127ba fix bash test failures 2024-08-16 13:12:39 -04:00
Tess Gauthier
8e7aee937a fix inetd 2024-08-15 11:54:04 -04:00
Tess Gauthier
9ad0bff74b
remove credscan from PR CI job () 2024-08-12 12:25:23 -04:00
Tess Gauthier
18f1991754 fix test-exec to find sshd-session on Windows 2024-08-09 15:12:21 -04:00
Tess Gauthier
78fa6b269a fix debug mode 2024-08-08 11:05:21 -04:00
Tess Gauthier
03aa1ed7f2 fix typo 2024-08-06 16:45:50 -04:00
Tess Gauthier
8584d34d60 separate wmain_sshd-session from wmain_sshd 2024-08-06 15:48:02 -04:00
Tess Gauthier
209dad58c7
add sshd-session to ci artifacts 2024-08-06 14:22:58 -04:00