13396 Commits

Author SHA1 Message Date
Tess Gauthier
b36bc85f47
Update ssh folder permissions check in SSHD (#761)
* 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 (#757)
* 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 (#756) 2025-01-06 14:12:21 -05:00
Tess Gauthier
cdcc8d34d8
Fix tilde expand for Windows paths with backslashes (#768)
* 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 (#763) 2024-12-18 15:36:43 -05:00
Tess Gauthier
265df19787
Fix include paths (#770)
* 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 (#769) 2024-12-09 11:27:41 -05:00
Tess Gauthier
0dd6d2cd21
username logging fix (#762)
* 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 (#759)
* 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 (#764)
* 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 (#755)
* 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 (#754) v9.8.1.0 2024-10-09 16:38:44 -04:00
Tess Gauthier
e1661bfcb4
add sshd-session to msi (#753) 2024-10-09 14:23:52 -04:00
Tess Gauthier
64f148cc3b
fix for msrc cases (#752) v9.8.0.0 2024-10-08 16:25:04 -04:00
Tess Gauthier
b4d7f739df
Fix banner (#751)
* update banner

* update banner
2024-09-26 17:51:06 -04:00
Tess Gauthier
414d8531ce
Update paths.targets (#749) 2024-09-25 13:05:04 -04:00
Tess Gauthier
14ecb9d70e
update openssh banner (#748) 2024-09-18 15:46:24 -04:00
Tess Gauthier
7033d00153
Merge pull request #737 from tgauth/merge-9.8
Merge upstream 9.8
2024-09-18 14:27:52 -04:00
Tess Gauthier
d8b0147df2
Merge pull request #746 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 #713 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 (#744) 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 */. (#742) 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 (#741) 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
Tess Gauthier
9787cad03a fix compilation error 2024-08-06 11:43:29 -04:00
Tess Gauthier
cfd259fcf1 fix merge conflict properly 2024-08-05 16:29:51 -04:00
Tess Gauthier
442c43da10 disable upstream workflows 2024-08-02 17:44:45 -04:00
Tess Gauthier
9a0bf7d05d
Merge branch 'latestw_all' into merge-9.8 2024-08-02 17:41:45 -04:00
Tess Gauthier
6384372160 merge the rest of the 9.8 changes from upstream 2024-08-02 17:22:58 -04:00
Tess Gauthier
d5d6a52338 fix win32 sshd and sshd-session 2024-08-02 14:21:01 -04:00
djm@openbsd.org
9c25d37697 upstream: missing files from previous
OpenBSD-Commit-ID: 4b7be4434d8799f02365552b641a7a70a7ebeb2f
2024-08-02 14:21:00 -04:00
Tess Gauthier
7906ad4cda continue merge - not compiling 2024-08-02 14:20:51 -04:00
Tess Gauthier
57149fe90d
revert Win32 change (#732) 2024-08-01 14:09:20 -04:00