1007 Commits

Author SHA1 Message Date
Tess Gauthier
fdde2326f9
Fix static analysis warning (#779)
* 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 (#780) 2025-03-31 15:15:57 -04:00
LainOTN2
31f8d13ab6
Fix for Y2038 gettimeofday for Win32 builds (#738)
* 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 (#778)
* 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 (#775)
* change sshd to sshd-session for process flag

* add pester test
2025-03-13 15:28:04 -04:00
Tess Gauthier
41734eb591
Update chroot symlink check (#765)
* 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 (#771) 2025-01-13 10:51:15 -05:00
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
Andrew
0c3137f621
Fix hang in syncio_close (#763) 2024-12-18 15:36:43 -05:00
Tess Gauthier
348084cc9a
Update sshd_config to latest defaults (#769) 2024-12-09 11:27:41 -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
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) 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) 2024-10-08 16:25:04 -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
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
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
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
Tess Gauthier
7906ad4cda continue merge - not compiling 2024-08-02 14:20:51 -04:00
Damien Miller
fa41f6592f
version numbers 2024-07-01 14:33:26 +10:00
Tess Gauthier
547baf4e29
Merge branch 'latestw_all' into sync-with-upstream-2 2024-06-17 15:00:49 -04:00
Damien Miller
24a1f3e5ad
attempt at updating RPM specs for sshd-session 2024-05-17 14:50:43 +10:00
Andrew
661803c9ec
Allow SID strings in sshd_config (#724)
* SIDs in sshd_config

* add #include <Sddl.h> to servconf.c

---------

Co-authored-by: Tess Gauthier <tessgauthier@microsoft.com>
2024-05-07 16:15:28 -04:00
Tess Gauthier
afe9007141
remove HAVE_FREEZERO from preprocessor definitions (#730) 2024-05-07 11:52:20 -04:00
Steve Lee
b89ee6aa37
fix how build script finds repo root (#729)
Co-authored-by: Steve Lee (POWERSHELL HE/HIM) (from Dev Box) <slee@ntdev.microsoft.com>
2024-04-29 11:43:53 -04:00
Tess Gauthier
3af5ef810d
remove manifest files from msi (#726) 2024-04-22 14:27:03 -04:00
Tess Gauthier
607df771b2
Delete contrib/win32/openssh/DockerFile (#722) 2024-03-18 13:58:04 -04:00
Tess Gauthier
0d44bc9b49 fix merge conflict 2024-03-11 11:46:39 -04:00
Damien Miller
282721418e
crank RPM spec versions 2024-03-11 16:20:08 +11:00
Marc-André Moreau
5622b51825
fix freezero duplicate symbol (#718)
Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
2024-02-12 18:26:32 -05:00
Marc-André Moreau
727d4dbac0
fix resource.h file encoding (#716)
Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
2024-02-12 18:18:08 -05:00