Commit Graph

810 Commits

Author SHA1 Message Date
Yanbing a75116b6f8 Fix of 1211 and 1082 (#349)
PowerShell/Win32-OpenSSH#1211
PowerShell/Win32-OpenSSH#1082

Added support for posix_spawnp that executes the command directly instead of appending path. (SH_ASKPASS and proxy command use this). Refactored posix spawn commandline building logic to automatically account for Windows CRT escaping rules on all arguments.
2018-11-05 12:22:20 -08:00
Manoj Ampalam 456c5fc72b Merge branch 'V_7_9' of https://github.com/openssh/openssh-portable 2018-10-25 11:55:02 -07:00
Manoj Ampalam f7ea7ca04c Pester tests updated to reflect changes in 7.8 2018-10-05 16:11:58 -07:00
Manoj Ampalam 1ce9e2005d Merge branch 'V_7_8' of https://github.com/openssh/openssh-portable into cwb 2018-10-04 14:43:51 -07:00
Manoj Ampalam af4e4113b2
Ported bash based E2E tests and integrated security fix for cve-2018-15473(#346)
- Updated code to dynamic load Lsa functions until RS5 SDK includes them
 - Add conpty support in openssh
- Fixed Wierd characters (?25l) are seen, when logged in from ssh client
- Backspace doesn't work in powershell window
- Changes to support ssh-shellhost as an alternative shell
- Added support to have ssh-shellhost work as a standby shell (ssh-shellhost -c "cmdline") simply executes cmdline via CreateProcess
- Added E2E test cases and fixed unittests broken from prior changes
- Added PTY launch interface that supports both conpty and ssh-shellhost pty.
- Implemented PTY control channel in ssh-shellhost that supports Window resize events.
- Fixed regression with starting a PTY session with an explicit command
- modified ssh-shellhost pty argument to ---pty to remove ambiguity in cases when both -p and -c are present in commandline. Ex. ssh-shellhost.exe -c "myprogram -p -c argument"
2018-10-04 14:16:02 -07:00
Yanbing 0840af06bf
Add support of posix_spawnp (#344)
Added support of posix_spawnp.
1. fix of issue https://github.com/PowerShell/Win32-OpenSSH/issues/1185
2. add End2End tests
2018-09-29 14:28:21 -07:00
Damien Miller 4488ae1a69 really add source for authopt_fuzz this time 2018-09-15 19:36:55 +10:00
Damien Miller 9201784b4a remove accidentally checked-in authopt_fuzz binary 2018-09-15 19:35:40 +10:00
Damien Miller 6bc5a24ac8 fuzzer harness for authorized_keys option parsing 2018-09-14 15:17:08 +10:00
Damien Miller 0aa1f23084 allow SIGUSR1 as synonym for SIGINFO
Lets users on those unfortunate operating systems that lack SIGINFO
still be able to obtain progress information from unit tests :)
2018-09-14 10:31:47 +10:00
Damien Miller d64e785265 add compat header 2018-09-13 19:05:48 +10:00
djm@openbsd.org a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest
OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9
2018-09-13 19:04:10 +10:00
djm@openbsd.org 86e0a9f3d2 upstream: use only openssl-1.1.x API here too
OpenBSD-Regress-ID: ae877064597c349954b1b443769723563cecbc8f
2018-09-13 15:08:27 +10:00
Damien Miller 86112951d6 forgot to stage these test files in commit d70d061 2018-09-13 12:12:42 +10:00
djm@openbsd.org d70d061828 upstream: Include certs with multiple RSA signature variants in
test data Ensure that cert->signature_key is populated correctly

OpenBSD-Regress-ID: 56e68f70fe46cb3a193ca207385bdb301fd6603a
2018-09-12 16:51:36 +10:00
djm@openbsd.org f803b26829 upstream: test revocation by explicit hash and by fingerprint
OpenBSD-Regress-ID: 079c18a9ab9663f4af419327c759fc1e2bc78fd8
2018-09-12 16:51:14 +10:00
djm@openbsd.org 2de78bc7da upstream: s/sshkey_demote/sshkey_from_private/g
OpenBSD-Regress-ID: 782bde7407d94a87aa8d1db7c23750e09d4443c4
2018-09-12 16:51:14 +10:00
Damien Miller 9617816dbe document some more regress control env variables
Specifically SKIP_UNIT, USE_VALGRING and LTESTS. Sort the list of
environment variables.

Based on patch from Jakub Jelen
2018-08-27 13:08:01 +10:00
Damien Miller 71508e06fa shorten temporary SSH_REGRESS_TMP path
Previous path was exceeding max socket length on at least one platform (OSX)
2018-08-23 15:41:42 +10:00
Damien Miller 829fc28a9c Missing unistd.h for regress/mkdtemp.c 2018-08-20 15:57:29 +10:00
dtucker@openbsd.org 2f4766ceef upstream: The script that cooks up PuTTY format host keys does not
understand the new key format so convert back to old format to create the
PuTTY key and remove it once done.

OpenBSD-Regress-ID: 2a449a18846c3a144bc645135b551ba6177e38d3
2018-08-10 11:40:21 +10:00
Yanbing 4ac87b4991
Upload unit test as artifacts (#337)
Update vsts scripts to upload unit tests as artifacts
2018-08-06 12:57:47 -07:00
Yanbing fde0994a30
fix test failures on win7 (#335) 2018-08-01 12:31:10 -07:00
Darren Tucker 149cab325a Include stdarg.h in mkdtemp for va_list. 2018-07-27 13:46:06 +10:00
Manoj Ampalam 84e87be8ae
ConPTY changes and support for auto-updating known_hosts;
- Logic to support conpty (currently disabled until validation is complete)
- fdopen() and fchmod() support for file handles
- support for auto updating known_hosts via ssh and ssh-keygen
- Support for dynamic Windows-size changes with PTY
- Changes to support OneCore SDK
- Test cases
2018-07-25 15:15:05 -07:00
Damien Miller c59aca8adb Create control sockets in clean temp directories
Adds a regress/mkdtemp tool and uses it to create empty temp
directories for tests needing control sockets.

Patch from Colin Watson via bz#2660; ok dtucker
2018-07-20 14:55:29 +10:00
djm@openbsd.org 2f131e1b34 upstream: memleak in unittest; found by valgrind
OpenBSD-Regress-ID: 168c23b0fb09fc3d0b438628990d3fd9260a8a5e
2018-07-16 13:12:28 +10:00
djm@openbsd.org 7449c178e9 upstream: make this use ssh_proxy rather than starting/stopping a
daemon for each testcase

OpenBSD-Regress-ID: 608b7655ea65b1ba8fff5a13ce9caa60ef0c8166
2018-07-13 12:14:38 +10:00
djm@openbsd.org dbab02f920 upstream: fix leaks in unit test; with this, all unit tests are
leak free (as far as valgrind can spot anyway)

OpenBSD-Regress-ID: b824d8b27998365379963440e5d18b95ca03aa17
2018-07-13 12:14:38 +10:00
Damien Miller 2f6accff50 Enable leak checks for unit tests with valgrind
Leave the leak checking on unconditionally when running with valgrind.
The unit tests are leak-free and I want them to stay that way.
2018-07-13 11:41:33 +10:00
Damien Miller e46cfbd9db increase timeout to match cfgmatch.sh
lets test pass under valgrind (on my workstation at least)
2018-07-13 11:41:33 +10:00
Damien Miller fccfa239de VALGRIND_CHECK_LEAKS logic was backwards :( 2018-07-11 10:19:56 +10:00
Damien Miller d20720d373 disable valgrind memleak checking by default
Add VALGRIND_CHECK_LEAKS knob to turn it back on.
2018-07-11 09:57:44 +10:00
Damien Miller 120a1ec74e Adapt portable to legacy buffer API removal 2018-07-10 19:39:52 +10:00
djm@openbsd.org 314908f451 upstream: deal with API rename: match_filter_list() =>
match_filter_blacklist()

OpenBSD-Regress-ID: 2da342be913efeb51806351af906fab01ba4367f
2018-07-04 23:52:50 +10:00
djm@openbsd.org 89f54cdf6b upstream: exercise new expansion behaviour of
PubkeyAcceptedKeyTypes and, by proxy, test kex_assemble_names()

ok markus@

OpenBSD-Regress-ID: 292978902e14d5729aa87e492dd166c842f72736
2018-07-04 23:52:50 +10:00
djm@openbsd.org 187633f24c upstream: add a comment that could have saved me 45 minutes of wild
goose chasing

OpenBSD-Regress-ID: d469b29ffadd3402c090e21b792d627d46fa5297
2018-07-04 23:52:50 +10:00
djm@openbsd.org 303af5803b upstream: some magic for RSA-SHA2 checks
OpenBSD-Regress-ID: e5a9b11368ff6d86e7b25ad10ebe43359b471cd4
2018-07-04 00:07:12 +10:00
dtucker@openbsd.org 1eee79a11c upstream: One ampersand is enough to backgroud an process. OpenBSD
doesn't seem to mind, but some platforms in -portable object to the second.

OpenBSD-Regress-ID: d6c3e404871764343761dc25c3bbe29c2621ff74
2018-07-03 00:45:40 +10:00
djm@openbsd.org 80e199d617 upstream: test PermitListen with bare port numbers
OpenBSD-Regress-ID: 4b50a02dfb0ccaca08247f3877c444126ba901b3
2018-06-19 13:03:03 +10:00
djm@openbsd.org 57379dbd01 upstream: test the correct configuration option name
OpenBSD-Regress-ID: 492279ea9f65657f97a970e0e7c7fd0b339fee23
2018-06-08 00:31:38 +10:00
djm@openbsd.org 4319f7a868 upstream: permitlisten/PermitListen unit test from Markus
OpenBSD-Regress-ID: ab12eb42f0e14926980441cf7c058a6d1d832ea5
2018-06-07 14:48:39 +10:00
djm@openbsd.org 392db2bc83 upstream: regress test for PermitOpen
OpenBSD-Regress-ID: ce8b5f28fc039f09bb297fc4a92319e65982ddaf
2018-06-07 04:28:25 +10:00
Manoj Ampalam 9369d870ad
upped version to 7.7.1.0 and fixed some issues with session path resolution (#320)
upped version to 7.7.1.0 and fixed some issues with session path resolution
2018-06-04 21:15:18 -07:00
Manoj Ampalam 1e0c864707
session process path changes (#319)
Added utility to build session process command line - this accounts for restrictions from various shells. With these changes, scp and sftp-server are expected to be machine wide PATH if a custom shell (other than cmd.exe) is defined. Added comprehensive test cases.
Fixed issue with USERNAME env variable containing domain prefix too.

PowerShell/Win32-OpenSSH#1165
PowerShell/Win32-OpenSSH#1165
PowerShell/Win32-OpenSSH#1171
2018-06-04 12:16:13 -07:00
Bryan Berns 710050b186 Remove None/Domain Users Group Filter (#316)
- Removed logic that was excluding the group membership SID that matched 'None' on workgroup computers or 'Domain Users' on domain systems.
- Removed test that was checking that AllowGroups failure if user was not in any group at all.  This is no longer testable since user will always be a member of at least one group.

https://github.com/PowerShell/Win32-OpenSSH/issues/1167
2018-06-03 08:23:30 -07:00
djm@openbsd.org a1dcafc41c upstream: Adapt to extra default verboisity from ssh-keygen when
searching for and hashing known_hosts entries in a single operation
(ssh-keygen -HF ...) Patch from Anton Kremenetsky

OpenBSD-Regress-ID: 519585a4de35c4611285bd6a7272766c229b19dd
2018-06-01 14:24:08 +10:00
djm@openbsd.org 76f314c75d upstream: Add TEST_SSH_FAIL_FATAL variable, to force all failures
to instantly abort the test. Useful in capturing clean logs for individual
failure cases.

OpenBSD-Regress-ID: feba18cf338c2328b9601bd4093cabdd9baa3af1
2018-06-01 14:24:08 +10:00
dtucker@openbsd.org 065c8c055d upstream: Clean up comment.
OpenBSD-Regress-ID: 6adb35f384d447e7dcb9f170d4f0d546d3973e10
2018-06-01 14:23:22 +10:00
Bryan Berns ec102dce28 Alternate Thread Creation API To Avoid Memory Leaks (#306)
* Alternate Thread Creation API To Avoid Memory Leaks

- Switched from CreateThread() to _beginthreadex() and ExitThread() to _endthreadex() in order to avoid potential leaks when linking with static CRT library.
- Addressed a variety of warnings that were being detected with static code analysis.

* Addressed Type Cast Warning

- Added explicit cast to the output of _beginthreadex() to avoid a compiler warning.

* Indentation Fix
2018-05-23 16:53:36 -07:00