mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-04-08 18:35:05 +02:00
Compare commits
396 Commits
v9.5.0.0
...
latestw_al
Author | SHA1 | Date | |
---|---|---|---|
|
fdde2326f9 | ||
|
de4c0c7c59 | ||
|
31f8d13ab6 | ||
|
ae72d833fd | ||
|
0096029101 | ||
|
a96b3fbae4 | ||
|
8514f78233 | ||
|
41734eb591 | ||
|
8fe096c7b7 | ||
|
b36bc85f47 | ||
|
7baad0a474 | ||
|
86bc0d7df9 | ||
|
cdcc8d34d8 | ||
|
0c3137f621 | ||
|
265df19787 | ||
|
348084cc9a | ||
|
0dd6d2cd21 | ||
|
27f6cfa7b0 | ||
|
796d297a66 | ||
|
a915f06c78 | ||
|
d7e886b9f6 | ||
|
e1661bfcb4 | ||
|
64f148cc3b | ||
|
b4d7f739df | ||
|
414d8531ce | ||
|
14ecb9d70e | ||
|
7033d00153 | ||
|
d8b0147df2 | ||
|
f168dca436 | ||
|
0e69c3dd2b | ||
|
10d03163e9 | ||
|
718738b783 | ||
|
4d7e9c189c | ||
|
f0d05b5fec | ||
|
251eb8d522 | ||
|
dcdd707699 | ||
|
b240ddf209 | ||
|
0eab6d5d68 | ||
|
56d415a029 | ||
|
cc2dc243e0 | ||
|
59a553e67e | ||
|
03ae1035d1 | ||
|
9215a127ba | ||
|
8e7aee937a | ||
|
9ad0bff74b | ||
|
18f1991754 | ||
|
78fa6b269a | ||
|
03aa1ed7f2 | ||
|
8584d34d60 | ||
|
209dad58c7 | ||
|
9787cad03a | ||
|
cfd259fcf1 | ||
|
442c43da10 | ||
|
9a0bf7d05d | ||
|
6384372160 | ||
|
d5d6a52338 | ||
|
9c25d37697 | ||
|
7906ad4cda | ||
|
57149fe90d | ||
|
43c6e39474 | ||
|
429419ba38 | ||
|
e829ad267c | ||
|
c21fc9d953 | ||
|
b35a64dd7d | ||
|
34f7a962f9 | ||
|
20950a7c04 | ||
|
6849957945 | ||
|
fa41f6592f | ||
|
bfebb8a513 | ||
|
146c420d29 | ||
|
637e4dfea4 | ||
|
c8cfe258ce | ||
|
94b9d37100 | ||
|
268c3a7f57 | ||
|
12b6cc09ce | ||
|
d6bcd13297 | ||
|
b8793e2b08 | ||
|
f23e9332c4 | ||
|
1839e3eb71 | ||
|
603193e32a | ||
|
dbbf9337c1 | ||
|
8de2c8cebc | ||
|
e9b6471c59 | ||
|
d9336d344e | ||
|
579d9adb70 | ||
|
7089b5f843 | ||
|
d5f83cfd85 | ||
|
fad34b4ca2 | ||
|
5521060e35 | ||
|
dbd3b833f6 | ||
|
d6218504e1 | ||
|
786a4465b6 | ||
|
df1c72a55e | ||
|
de1c2e70e5 | ||
|
dabc2c7cf3 | ||
|
7614380127 | ||
|
3f9cc47da5 | ||
|
547baf4e29 | ||
|
00eb95957d | ||
|
5603befe11 | ||
|
b00331402f | ||
|
1c207f456a | ||
|
48443d202e | ||
|
45562a95ea | ||
|
8d0f7eb147 | ||
|
93c75471a1 | ||
|
dd7807bbe8 | ||
|
d172ad56df | ||
|
092e4ff9cc | ||
|
2866ad08a9 | ||
|
b2c64bc170 | ||
|
9f032a4dd1 | ||
|
1e84d0cf40 | ||
|
3e806d0118 | ||
|
abfd1f7a3c | ||
|
a8fbe2f7d0 | ||
|
bf204bd05c | ||
|
425f79a837 | ||
|
afe10313c1 | ||
|
f66d4df574 | ||
|
f1c42858b9 | ||
|
4de80ff4e6 | ||
|
06ab4c6931 | ||
|
cfe243cd9f | ||
|
b0a711c00b | ||
|
90fb801e2d | ||
|
ef878d5879 | ||
|
fc4e96b217 | ||
|
82c836df4f | ||
|
a2300f015c | ||
|
41987efd35 | ||
|
6211aa085f | ||
|
a59634c7ad | ||
|
fa7d7a667f | ||
|
3ad4cd9eec | ||
|
0e0c69761a | ||
|
bd1f74741d | ||
|
9774b93857 | ||
|
b8ebd86cef | ||
|
d7b2070bda | ||
|
e6ea3d2245 | ||
|
c0cb3b8c83 | ||
|
81c1099d22 | ||
|
916b0b6174 | ||
|
49b55e4418 | ||
|
cc80d51d03 | ||
|
8785491123 | ||
|
f1c8918cb9 | ||
|
94b4866cb1 | ||
|
e68a95142e | ||
|
b21d271f65 | ||
|
a4b5bc246c | ||
|
8054b90698 | ||
|
210d423973 | ||
|
f0b9261d7f | ||
|
2477a98c3e | ||
|
435844f567 | ||
|
fc5dc09283 | ||
|
fd4816791b | ||
|
beccb7319c | ||
|
dcd79fa141 | ||
|
6454a05e7c | ||
|
f3e4db4601 | ||
|
24a1f3e5ad | ||
|
17b566eeb7 | ||
|
01fb82eb2a | ||
|
b88b690e99 | ||
|
a68f80f251 | ||
|
92e5589031 | ||
|
4ad72878af | ||
|
02e679a2cb | ||
|
03e3de416e | ||
|
c0416035c5 | ||
|
1c0d813579 | ||
|
cbbbf76aa6 | ||
|
bc5dcb8ab9 | ||
|
6a42b70e56 | ||
|
661803c9ec | ||
|
afe9007141 | ||
|
385ecb31e1 | ||
|
14e2b16bc6 | ||
|
2e69a72405 | ||
|
da757b022b | ||
|
16d0b82fa0 | ||
|
66aaa678db | ||
|
80fb0eb215 | ||
|
5b28096d31 | ||
|
fd3cb8a827 | ||
|
54343a260e | ||
|
ec78c31409 | ||
|
8176e1a6c2 | ||
|
9f543d7022 | ||
|
8673137f78 | ||
|
c7fec708f3 | ||
|
019a5f483b | ||
|
8231ca046f | ||
|
bf7bf50bd6 | ||
|
b89ee6aa37 | ||
|
00e6368892 | ||
|
2eded551ba | ||
|
8673245918 | ||
|
70d4304974 | ||
|
3af5ef810d | ||
|
88351eca17 | ||
|
08f579231c | ||
|
43e7c1c07c | ||
|
281ea25a44 | ||
|
2d2c068de8 | ||
|
c2c0bdd3e9 | ||
|
02c5ad2312 | ||
|
cd8a72707c | ||
|
8d0e46c1dd | ||
|
697359be9c | ||
|
7844705b03 | ||
|
22b2b6c555 | ||
|
edcff77f82 | ||
|
861b084429 | ||
|
63f248c769 | ||
|
16e2ebe06a | ||
|
b326f7a1f3 | ||
|
dbf2e319f0 | ||
|
d2c8c4fa7d | ||
|
83621b6351 | ||
|
8a421b9277 | ||
|
2946ed522c | ||
|
18dbe8eff6 | ||
|
5fc1085128 | ||
|
5516923e8a | ||
|
dc37d2d247 | ||
|
fe16948793 | ||
|
151146f03b | ||
|
0d5bdc87a6 | ||
|
2d7964a03e | ||
|
75d1d49ed1 | ||
|
f9193f03db | ||
|
607df771b2 | ||
|
0d44bc9b49 | ||
|
86bdd3853f | ||
|
282721418e | ||
|
3876a3bbd2 | ||
|
8fc109cc61 | ||
|
26b09b45fe | ||
|
a6a740a494 | ||
|
cd82f7526e | ||
|
2f9d2af5cb | ||
|
9b3f0beb40 | ||
|
c47e1c9c79 | ||
|
242742827f | ||
|
d52b650921 | ||
|
668d270a6c | ||
|
ed376e945e | ||
|
3deb501f86 | ||
|
65a44a8a4f | ||
|
6886e1b1f5 | ||
|
d86bf8a3f6 | ||
|
9ee335aacc | ||
|
d1164cb100 | ||
|
d410e17d18 | ||
|
ab73f9678e | ||
|
9844aa2521 | ||
|
c02b47e35d | ||
|
ee6d932acb | ||
|
e27f032aa8 | ||
|
84046f9991 | ||
|
bbf541ee2a | ||
|
d31c21c57f | ||
|
4dbc5a363f | ||
|
efde85dda2 | ||
|
915c6e367c | ||
|
5622b51825 | ||
|
727d4dbac0 | ||
|
cbbdf868bc | ||
|
91898bf786 | ||
|
be5ed8ebed | ||
|
0f6a8a0d0a | ||
|
e4dbee4f11 | ||
|
3ad669f81a | ||
|
c283f29d23 | ||
|
9015aa2eca | ||
|
afd613528f | ||
|
0c166db115 | ||
|
6ad8fc3b05 | ||
|
83b59226a4 | ||
|
0d96b1506b | ||
|
50080fa42f | ||
|
415c94ce17 | ||
|
f9311e8921 | ||
|
4e838120a7 | ||
|
afcc9028bf | ||
|
9707c8170c | ||
|
b31b12d28d | ||
|
602f4beeed | ||
|
9142077e39 | ||
|
b39454951f | ||
|
42ba34aba8 | ||
|
690bc125f9 | ||
|
6b8be2ccd7 | ||
|
219c813415 | ||
|
4c3cf36263 | ||
|
f64cede2a3 | ||
|
698fe6fd61 | ||
|
fc332cb2d6 | ||
|
9ea0a4524a | ||
|
a72833d007 | ||
|
86f9e96d9b | ||
|
f0cbd26ec9 | ||
|
64ddf77653 | ||
|
503fbe9ea2 | ||
|
5413b1c7ff | ||
|
430ef86464 | ||
|
1036d77b34 | ||
|
e98172c2eb | ||
|
aeb3bbe81d | ||
|
8241b9c052 | ||
|
2f2c65cb5f | ||
|
e48cdee8e1 | ||
|
2f512f862d | ||
|
cdddd66412 | ||
|
6d51feab15 | ||
|
7ef3787c84 | ||
|
0cb50eefdd | ||
|
4448a2938a | ||
|
881d9c6af9 | ||
|
a7ed931cae | ||
|
1edb00c58f | ||
|
59d691b886 | ||
|
aa7b217085 | ||
|
4086bd6652 | ||
|
19d3ee2f3a | ||
|
947affad48 | ||
|
747dce3620 | ||
|
3d44a5c565 | ||
|
1d7f9b6e29 | ||
|
f29934066b | ||
|
a93284a780 | ||
|
670f5a647e | ||
|
cea007d691 | ||
|
ee0d305828 | ||
|
de304c7631 | ||
|
99a2df5e19 | ||
|
ff220d4010 | ||
|
2a19e02f36 | ||
|
c52db01148 | ||
|
26f3f3bbc6 | ||
|
050c335c8d | ||
|
676377ce67 | ||
|
64e0600f23 | ||
|
c8ed7cc545 | ||
|
e9fc2c4812 | ||
|
7ddf27668f | ||
|
fb06f9b5a0 | ||
|
fc3cc33e88 | ||
|
3a506598fd | ||
|
f82fa227a5 | ||
|
3cf698c6d4 | ||
|
3e21d58a09 | ||
|
917ba181c2 | ||
|
c5698abad6 | ||
|
1d6a878ceb | ||
|
e612376427 | ||
|
ea00391739 | ||
|
d220b9ed54 | ||
|
a611e4db40 | ||
|
da951b5e08 | ||
|
1ca166dbb3 | ||
|
f993bb5835 | ||
|
ff85becd5f | ||
|
c54a50359b | ||
|
fbaa707d45 | ||
|
c2003d0dbd | ||
|
064e09cd63 | ||
|
62db354b69 | ||
|
6eee8c972d | ||
|
637624dbba | ||
|
971e0cfcfd | ||
|
c616e64688 | ||
|
c49a3fbf10 | ||
|
5ec0ed79ac | ||
|
f59a94e22e | ||
|
281c79168e | ||
|
98fc34df83 | ||
|
7f3180be8a | ||
|
a612b93de5 | ||
|
531b27a006 | ||
|
64f7ca881b | ||
|
a752a6c0e1 | ||
|
76e91e7238 | ||
|
fc77c8e352 | ||
|
c97520d23d | ||
|
208c2b7198 | ||
|
0354790826 | ||
|
8d29ee4115 | ||
|
90b0d73d63 | ||
|
e84517f515 | ||
|
cb54becff4 | ||
|
f01f5137ce |
.azdo
.depend.git_allowed_signers.git_allowed_signers.asc.github
.gitignore.skipped-commit-idsChangeLogMakefile.inPROTOCOLPROTOCOL.agentPROTOCOL.keyPROTOCOL.muxREADMEREADME.platformaclocal.m4addr.cauth-pam.cauth-pam.hauth-rhosts.cauth.cauth.hauth2-gss.cauth2-hostbased.cauth2-kbdint.cauth2-methods.cauth2-none.cauth2-passwd.cauth2-pubkey.cauth2.cauthfd.cauthfd.hauthfile.cchannels.cchannels.hcipher.ccipher.hclientloop.cclientloop.hconfig.h.inconfigureconfigure.accontrib
redhat
suse
win32
install
openssh
DockerFileOpenSSH-build.ps1OpenSSHBuildHelper.psm1Win32-OpenSSH.slnconfig.h.vslibssh.vcxprojlibssh.vcxproj.filtersopenbsd_compat.vcxprojopenbsd_compat.vcxproj.filterspaths.targetsresource.hsshd-session.vcxprojsshd-session.vcxproj.filterssshd.vcxprojsshd.vcxproj.filterssshd_configversion.rc
win32compat
50
.azdo/ci.yml
50
.azdo/ci.yml
@ -10,13 +10,6 @@ pr:
|
||||
include:
|
||||
- latestw_all
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: ComplianceRepo
|
||||
type: github
|
||||
endpoint: ComplianceGHRepo
|
||||
name: PowerShell/compliance
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
displayName: Build Win32-OpenSSH
|
||||
@ -88,36 +81,6 @@ stages:
|
||||
Write-Host "##vso[artifact.upload containerfolder=$artifactName;artifactname=$artifactName;]$configFilePath"
|
||||
displayName: Upload Win32-OpenSSH build artifacts
|
||||
|
||||
- stage: Compliance
|
||||
displayName: Compliance
|
||||
dependsOn: Build
|
||||
jobs:
|
||||
- job: ComplianceJob
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- checkout: ComplianceRepo
|
||||
clean: true
|
||||
- download: current
|
||||
artifact: 'Win32-OpenSSH'
|
||||
- template: ci-compliance.yml@ComplianceRepo
|
||||
parameters:
|
||||
# credscan
|
||||
suppressionsFile: ''
|
||||
# Documentation: https://eng.ms/docs/security-compliance-identity-and-management-scim/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/sdl-azdo-extension/security-analysis-report-build-task
|
||||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-report.SdtReport@2
|
||||
continueOnError: true
|
||||
displayName: 'Guardian Export'
|
||||
inputs:
|
||||
GdnExportVstsConsole: true
|
||||
GdnExportSarifFile: true
|
||||
GdnExportHtmlFile: true
|
||||
GdnExportAllTools: false
|
||||
GdnExportGdnToolCredScan: true
|
||||
#this didn't do anything GdnExportCustomLogsFolder: '$(Build.ArtifactStagingDirectory)/Guardian'
|
||||
|
||||
- stage: Test
|
||||
displayName: Test Win32-OpenSSH
|
||||
dependsOn: Build
|
||||
@ -126,6 +89,8 @@ stages:
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
displayName: Win32-OpenSSH On Windows
|
||||
variables:
|
||||
testFilesDrivePath: '**'
|
||||
steps:
|
||||
- powershell: |
|
||||
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
|
||||
@ -201,6 +166,17 @@ stages:
|
||||
Invoke-OpenSSHTests -OpenSSHBinPath "$env:SystemDrive/OpenSSH"
|
||||
displayName: Run tests
|
||||
|
||||
- pwsh: |
|
||||
Write-Host "##vso[task.setvariable variable=testFilesDrivePath;]$env:SystemDrive"
|
||||
displayName: Set variable
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'NUnit'
|
||||
testResultsFiles: '$(testFilesDrivePath)/OpenSSHTests/*.xml'
|
||||
failTaskOnFailedTests: true
|
||||
condition: always()
|
||||
|
||||
- pwsh: |
|
||||
Import-Module -Name "$(Build.SourcesDirectory)/contrib/win32/openssh/AzDOBuildTools" -Force
|
||||
#
|
||||
|
22
.depend
22
.depend
@ -23,12 +23,14 @@ auth2-gss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-com
|
||||
auth2-hostbased.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h kex.h mac.h crypto_api.h sshbuf.h log.h ssherr.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h canohost.h
|
||||
auth2-hostbased.o: monitor_wrap.h pathnames.h match.h
|
||||
auth2-kbdint.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h packet.h openbsd-compat/sys-queue.h dispatch.h hostfile.h auth.h auth-pam.h audit.h loginrec.h log.h ssherr.h misc.h servconf.h
|
||||
auth2-methods.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h misc.h servconf.h openbsd-compat/sys-queue.h xmalloc.h hostfile.h auth.h auth-pam.h audit.h loginrec.h
|
||||
auth2-none.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h misc.h servconf.h ssh2.h monitor_wrap.h
|
||||
auth2-passwd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h packet.h openbsd-compat/sys-queue.h dispatch.h ssherr.h log.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h monitor_wrap.h misc.h servconf.h
|
||||
auth2-pubkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h kex.h mac.h crypto_api.h sshbuf.h log.h ssherr.h misc.h servconf.h compat.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h
|
||||
auth2-pubkey.o: pathnames.h uidswap.h auth-options.h canohost.h monitor_wrap.h authfile.h match.h channels.h session.h sk-api.h
|
||||
auth2-pubkeyfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh.h log.h ssherr.h misc.h sshkey.h digest.h hostfile.h auth.h auth-pam.h audit.h loginrec.h auth-options.h authfile.h match.h
|
||||
auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h
|
||||
auth2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h atomicio.h xmalloc.h ssh2.h packet.h openbsd-compat/sys-queue.h dispatch.h log.h ssherr.h sshbuf.h misc.h servconf.h sshkey.h hostfile.h auth.h auth-pam.h audit.h loginrec.h pathnames.h monitor_wrap.h digest.h kex.h
|
||||
auth2.o: mac.h crypto_api.h
|
||||
authfd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h sshbuf.h sshkey.h authfd.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h log.h ssherr.h atomicio.h misc.h
|
||||
authfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h ssh.h log.h ssherr.h authfile.h misc.h atomicio.h sshkey.h sshbuf.h krl.h
|
||||
bitmap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h bitmap.h
|
||||
@ -59,6 +61,7 @@ gss-serv.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-comp
|
||||
hash.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h
|
||||
hmac.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshbuf.h digest.h hmac.h
|
||||
hostfile.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h match.h sshkey.h hostfile.h log.h ssherr.h misc.h pathnames.h digest.h hmac.h sshbuf.h
|
||||
kex-names.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h kex.h mac.h crypto_api.h log.h ssherr.h match.h digest.h misc.h xmalloc.h
|
||||
kex.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh.h ssh2.h atomicio.h version.h packet.h openbsd-compat/sys-queue.h dispatch.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h log.h ssherr.h
|
||||
kex.o: match.h misc.h monitor.h myproposal.h sshbuf.h digest.h xmalloc.h
|
||||
kexc25519.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshkey.h kex.h mac.h crypto_api.h sshbuf.h digest.h ssherr.h ssh2.h
|
||||
@ -81,12 +84,13 @@ monitor.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api
|
||||
monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h openbsd-compat/openssl-compat.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h
|
||||
monitor_fdpass.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h monitor_fdpass.h
|
||||
monitor_wrap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h crypto_api.h hostfile.h auth.h auth-pam.h audit.h
|
||||
monitor_wrap.o: loginrec.h auth-options.h packet.h dispatch.h log.h ssherr.h monitor.h monitor_wrap.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h
|
||||
monitor_wrap.o: loginrec.h auth-options.h packet.h dispatch.h log.h ssherr.h monitor.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h monitor_wrap.h srclimit.h
|
||||
msg.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshbuf.h ssherr.h log.h atomicio.h msg.h misc.h
|
||||
mux.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h log.h ssherr.h ssh.h ssh2.h pathnames.h misc.h match.h sshbuf.h channels.h msg.h packet.h dispatch.h monitor_fdpass.h sshpty.h sshkey.h readconf.h clientloop.h
|
||||
nchan.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h ssh2.h sshbuf.h ssherr.h packet.h dispatch.h channels.h compat.h log.h
|
||||
packet.o: channels.h ssh.h packet.h dispatch.h sshbuf.h
|
||||
packet.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h compat.h ssh2.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h digest.h log.h ssherr.h canohost.h misc.h
|
||||
platform-listen.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h misc.h
|
||||
platform-misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
platform-pledge.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
platform-tracing.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h ssherr.h
|
||||
@ -122,7 +126,7 @@ sftp-usergroup.o: includes.h config.h defines.h platform.h openbsd-compat/openbs
|
||||
sftp.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h log.h ssherr.h pathnames.h misc.h utf8.h sftp.h sshbuf.h sftp-common.h sftp-client.h openbsd-compat/glob.h sftp-usergroup.h
|
||||
sk-usbhid.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
sntrup761.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
srclimit.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h addr.h canohost.h log.h ssherr.h misc.h srclimit.h xmalloc.h
|
||||
srclimit.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h addr.h canohost.h log.h ssherr.h misc.h srclimit.h xmalloc.h servconf.h openbsd-compat/sys-queue.h match.h
|
||||
ssh-add.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h ssh.h log.h ssherr.h sshkey.h sshbuf.h authfd.h authfile.h pathnames.h misc.h digest.h ssh-sk.h sk-api.h hostfile.h
|
||||
ssh-agent.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshbuf.h sshkey.h authfd.h log.h ssherr.h misc.h digest.h match.h msg.h pathnames.h ssh-pkcs11.h sk-api.h myproposal.h
|
||||
ssh-dss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
@ -145,19 +149,21 @@ ssh-sk.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat
|
||||
ssh-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
ssh.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/openssl-compat.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h canohost.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h packet.h dispatch.h sshbuf.h channels.h
|
||||
ssh.o: sshkey.h authfd.h authfile.h pathnames.h clientloop.h log.h ssherr.h misc.h readconf.h sshconnect.h kex.h mac.h crypto_api.h sshpty.h match.h msg.h version.h myproposal.h utf8.h
|
||||
ssh_api.o: authfile.h misc.h version.h myproposal.h sshbuf.h openbsd-compat/openssl-compat.h
|
||||
ssh_api.o: authfile.h dh.h misc.h version.h myproposal.h sshbuf.h openbsd-compat/openssl-compat.h
|
||||
ssh_api.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssh_api.h openbsd-compat/sys-queue.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h ssh.h ssh2.h packet.h dispatch.h compat.h log.h ssherr.h
|
||||
sshbuf-getput-basic.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h
|
||||
sshbuf-getput-crypto.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
sshbuf-io.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h atomicio.h
|
||||
sshbuf-misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h
|
||||
sshbuf.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ssherr.h sshbuf.h misc.h
|
||||
sshconnect.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h hostfile.h ssh.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h sshkey.h sshconnect.h log.h ssherr.h misc.h readconf.h atomicio.h dns.h monitor_fdpass.h ssh2.h version.h authfile.h authfd.h
|
||||
sshconnect.o: kex.h mac.h crypto_api.h
|
||||
sshconnect.o: authfd.h kex.h mac.h crypto_api.h
|
||||
sshconnect.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h hostfile.h ssh.h sshbuf.h packet.h openbsd-compat/sys-queue.h dispatch.h sshkey.h sshconnect.h log.h ssherr.h match.h misc.h readconf.h atomicio.h dns.h monitor_fdpass.h ssh2.h version.h authfile.h
|
||||
sshconnect2.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshbuf.h packet.h dispatch.h compat.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h sshkey.h kex.h mac.h crypto_api.h
|
||||
sshconnect2.o: sshconnect.h authfile.h dh.h authfd.h log.h ssherr.h misc.h readconf.h match.h canohost.h msg.h pathnames.h uidswap.h hostfile.h utf8.h ssh-sk.h sk-api.h
|
||||
sshd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h log.h ssherr.h sshbuf.h misc.h match.h servconf.h uidswap.h compat.h cipher.h cipher-chachapoly.h chacha.h
|
||||
sshd.o: poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h crypto_api.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h sk-api.h srclimit.h dh.h
|
||||
sshd-session.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h crypto_api.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h sk-api.h srclimit.h dh.h
|
||||
sshd-session.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h xmalloc.h ssh.h ssh2.h sshpty.h packet.h dispatch.h log.h ssherr.h sshbuf.h misc.h match.h servconf.h uidswap.h compat.h cipher.h cipher-chachapoly.h
|
||||
sshd.o: audit.h loginrec.h authfd.h msg.h version.h sk-api.h addr.h srclimit.h
|
||||
sshd.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshpty.h log.h ssherr.h sshbuf.h misc.h servconf.h compat.h digest.h sshkey.h authfile.h pathnames.h canohost.h hostfile.h auth.h auth-pam.h
|
||||
ssherr.o: ssherr.h
|
||||
sshkey-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h
|
||||
sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/fnmatch.h openbsd-compat/getopt.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h match.h ssh-sk.h openbsd-compat/openssl-compat.h
|
||||
|
@ -1,4 +1,6 @@
|
||||
dtucker@dtucker.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKecyjh9aNmD4rb8WblA8v91JjRb0Cd2JtkzqxcggGeG
|
||||
dtucker@dtucker.net sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBDV81zWQ1+XVfWH5z4L4klDQ/z/6l2GLphfSTX/Rmq6kL5H8mkfzUlryxLlkN8cD9srtVJBAmwJWfJBNsCo958YAAAAEc3NoOg==
|
||||
|
||||
djm@mindrot.org sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBLnJo3ZVDENYZGXm5uO9lU7b0iDFq5gHpTu1MaHPWTEfPdvw+AjFQQ/q5YizuMJkXGsMdYmblJEJZYHpm9IS7ZkAAAAEc3NoOg==
|
||||
djm@mindrot.org sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBJoAXBTQalfg+kC5wy1vE7HkIHtVnmV6AUuuIo9KQ1P+70juHwvsFKpsGaqQbrHJkTVgYDGVP02XHj8+Fb18yBIAAAAEc3NoOg==
|
||||
djm@mindrot.org sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBH+z1I48s6ydOhP5SJmI02zVCLf0K15B+UMHgoTIKVfUIv5oDoVX7e9f+7QiRmTeEOdZfQydiaVqsfi7qPSve+0AAAAEc3NoOg==
|
||||
|
@ -1,16 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEcWi5g4FaXu9ZpK39Kj9BTnNgYLoFAmMMMiIACgkQKj9BTnNg
|
||||
YLpyGhAAhZ1RxmD62JnT0gnor1aD0inq1fGPRadaFvXH2OScPcxXMIZWx+otnyZ/
|
||||
H9s0bIti42dPHqurgh92KS2mDGVIW8Y8MvxFUr678+hdem1U7Xvjoo0uaveNhJhe
|
||||
GxuQDOvXKRmmfL2c6w3wnFChFA1o3K+JNshjCHhWz7u6+UmY0Q9yIxqbSi+vmEPP
|
||||
NfWPfGdu4h8r7q11UgTxRSUQkfZXMqpBtb367B9BLduGuKRFKEJNyi6WpjBrqy38
|
||||
BvEbAaL52KX8hEp3TKMjo38RbOK+veSoPV5zlLui0WlEwwasgljal3f4RkqCAJob
|
||||
hqpFJRogM5XNnA2e68TDTf3buJ3wRRjuK39/CusOJz5v4i6+VCdte+BET1Y4gD6y
|
||||
v8KV4pRyumcdbN3khFUkmaQsjo+fyQjWNrgOvv60J2xUWZdchn8lxHOxrfRVKnOi
|
||||
BD4bdks7tPQY/XsS5GNJIp21Ji9HGyBajjHo0BlesLodw7FEOf6YE18A3n9qzosR
|
||||
RliuP4Hs/Z4sCUuDTbpKtQiUVs40kBbkhEL8kS8FsXz3VO89hAWaUqNUYom8AkKv
|
||||
nfDjrZDBLXuVj1Mi8qNPXxqrB/1Cza2/W4U7SK4TlMFXfoXXWxxhefN5vIdMhAJB
|
||||
u9Mdz1pY9mowKbd0c0dR+3fauvjM133dzKuyeDHMqDa5JPyd59o=
|
||||
=kgnS
|
||||
iQIzBAABCgAdFiEEcWi5g4FaXu9ZpK39Kj9BTnNgYLoFAmYHnZ8ACgkQKj9BTnNg
|
||||
YLquuQ/6A8E6P2jcgn3wmbbCTXP7kmxoh3nmw/e6PC8CEua1512oT3GHOKVD5cGK
|
||||
cgYRObpWvjOjg7L1HRABftq7a9M2zfsGnY/WNe3/fbetfkyY8hG8c31vA1ePIOt2
|
||||
AjBLCWFblH0CtyH/MssoQ19JCLtXK/GmekB1Q0JzyOog7w/0r3CKuUnZ0juCYR1R
|
||||
4FBePl5l3nFSZEcFEdptGlNGeuolS5XBCqB9Y91TCzkVkH5eXUUW+shgjNhWCEhT
|
||||
pZvkxfhsmOEnwNofyPdgKVfDBVkHmvuC67EU395mJVN4c2NZ8pOztb9hOt3xr980
|
||||
q44I4kT2NpaApCx1dWIGhMy/37LJ8heI0W1B+ofTA5n34/RU8UXH3SCkj2AK6Ao5
|
||||
H2u8vbmuWKUCiECmrw35EeKGmtuK/bWJzx3KBP7fx5J9S3mWUgT4W4xlWNN9RWoU
|
||||
sSvH1ppie5ARINVaAWl5k44fk60ahTf80DbQBIOZBmQn7myZZka+yGcQbAiZZ1Gc
|
||||
0l8+Nf5Ao1ckmuyY5o8FyWdsyDeK3+MqjPn5Rr1CqbKCn2VnqrVWbI33Eyu8c96U
|
||||
bxVgU5H1BDhNjJC8UrT3LFPvJMO8p3a0IJ3eHydjk2jVOhOdBZmA0yoqUTrhPpXq
|
||||
ymIHESjDJR8TDe4TCfb46o9oEC3cdbDwgnzPqdg0n+0uIsJLYiU=
|
||||
=gl+l
|
||||
-----END PGP SIGNATURE-----
|
||||
|
12
.github/ci-status.md
vendored
12
.github/ci-status.md
vendored
@ -6,10 +6,10 @@ master :
|
||||
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh)
|
||||
[](https://scan.coverity.com/projects/openssh-portable)
|
||||
|
||||
9.4 :
|
||||
[](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_4)
|
||||
[](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_4)
|
||||
9.8 :
|
||||
[](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_8)
|
||||
[](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_8)
|
||||
|
||||
9.3 :
|
||||
[](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_3)
|
||||
[](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_3)
|
||||
9.7 :
|
||||
[](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_7)
|
||||
[](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_7)
|
||||
|
38
.github/configs
vendored
38
.github/configs
vendored
@ -108,9 +108,19 @@ case "$config" in
|
||||
SKIP_LTESTS=sftp-chroot
|
||||
;;
|
||||
gcc-11-Werror)
|
||||
CC="gcc"
|
||||
CC="gcc-11"
|
||||
# -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled
|
||||
CFLAGS="-Wall -Wextra -O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter"
|
||||
# -Wunused-result ignores (void) so is not useful. See
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
|
||||
CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result"
|
||||
CONFIGFLAGS="--with-pam --with-Werror"
|
||||
;;
|
||||
gcc-12-Werror)
|
||||
CC="gcc-12"
|
||||
# -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled
|
||||
# -Wunused-result ignores (void) so is not useful. See
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
|
||||
CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result"
|
||||
CONFIGFLAGS="--with-pam --with-Werror"
|
||||
;;
|
||||
clang*|gcc*)
|
||||
@ -154,6 +164,11 @@ case "$config" in
|
||||
libressl-*)
|
||||
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath,"
|
||||
;;
|
||||
putty-*)
|
||||
CONFIGFLAGS="--with-plink=/usr/local/bin/plink --with-puttygen=/usr/local/bin/puttygen"
|
||||
# We don't need to rerun the regular tests, just the interop ones.
|
||||
TEST_TARGET=interop-tests
|
||||
;;
|
||||
openssl-*)
|
||||
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath,"
|
||||
# OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec
|
||||
@ -193,6 +208,7 @@ case "$config" in
|
||||
# and hostbased (since valgrind won't let ssh exec keysign).
|
||||
# Slow ones are run separately to increase parallelism.
|
||||
SKIP_LTESTS="agent-timeout connection-timeout hostbased"
|
||||
SKIP_LTESTS="$SKIP_LTESTS penalty-expire"
|
||||
SKIP_LTESTS="$SKIP_LTESTS ${tests2} ${tests3} ${tests4} ${tests5}"
|
||||
;;
|
||||
valgrind-2)
|
||||
@ -259,20 +275,22 @@ case "${TARGET_HOST}" in
|
||||
;;
|
||||
minix3)
|
||||
CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key"
|
||||
# Unix domain sockets don't work quite like we expect, so also
|
||||
# disable FD passing (and thus multiplexing).
|
||||
CONFIGFLAGS="${CONFIGFLAGS} --disable-fd-passing"
|
||||
LIBCRYPTOFLAGS="--without-openssl"
|
||||
|
||||
# Minix does not have a loopback interface so we have to skip any
|
||||
# test that relies on one.
|
||||
# Also, Minix seems to be very limited in the number of select()
|
||||
# calls that can be operating concurrently, so prune additional tests for that.
|
||||
T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse
|
||||
connect connect-uri exit-status forwarding hostkey-agent
|
||||
key-options keyscan knownhosts-command login-timeout
|
||||
connect connect-uri dynamic-forward exit-status forwarding
|
||||
forward-control
|
||||
hostkey-agent key-options keyscan knownhosts-command login-timeout
|
||||
reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds
|
||||
sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data
|
||||
transfer"
|
||||
# Unix domain sockets don't work quite like we expect, so also skip any tests
|
||||
# that use multiplexing.
|
||||
T="$T connection-timeout dynamic-forward forward-control multiplex"
|
||||
transfer penalty penalty-expire"
|
||||
SKIP_LTESTS="$(echo $T)"
|
||||
TEST_TARGET=t-exec
|
||||
SUDO=""
|
||||
@ -310,6 +328,10 @@ case "$host" in
|
||||
# modern versions don't ship with libcrypto.
|
||||
LIBCRYPTOFLAGS="--without-openssl"
|
||||
TEST_TARGET=t-exec
|
||||
|
||||
# On some OS X runners we can't write to /var/empty.
|
||||
CONFIGFLAGS="${CONFIGFLAGS} --with-privsep-path=/usr/local/empty"
|
||||
|
||||
case "$host" in
|
||||
*-darwin22.*)
|
||||
# sudo -S nobody doesn't work on macos 13 for some reason.
|
||||
|
1
.github/run_test.sh
vendored
1
.github/run_test.sh
vendored
@ -9,6 +9,7 @@ set -ex
|
||||
# If we want to test hostbased auth, set up the host for it.
|
||||
if [ ! -z "$SUDO" ] && [ ! -z "$TEST_SSH_HOSTBASED_AUTH" ]; then
|
||||
sshconf=/usr/local/etc
|
||||
$SUDO mkdir -p "${sshconf}"
|
||||
hostname | $SUDO tee $sshconf/shosts.equiv >/dev/null
|
||||
echo "EnableSSHKeysign yes" | $SUDO tee $sshconf/ssh_config >/dev/null
|
||||
$SUDO mkdir -p $sshconf
|
||||
|
79
.github/setup_ci.sh
vendored
79
.github/setup_ci.sh
vendored
@ -18,8 +18,7 @@ case "$host" in
|
||||
;;
|
||||
*-darwin*)
|
||||
PACKAGER=brew
|
||||
brew install automake
|
||||
exit 0
|
||||
PACKAGES="automake"
|
||||
;;
|
||||
*)
|
||||
PACKAGER=apt
|
||||
@ -30,20 +29,30 @@ TARGETS=$@
|
||||
INSTALL_FIDO_PPA="no"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#echo "Setting up for '$TARGETS'"
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
if [ -x "`which lsb_release 2>&1`" ]; then
|
||||
lsb_release -a
|
||||
fi
|
||||
|
||||
# Ubuntu 22.04 defaults to private home dirs which prevent the
|
||||
# agent-getpeerid test from running ssh-add as nobody. See
|
||||
# https://github.com/actions/runner-images/issues/6106
|
||||
if [ ! -z "$SUDO" ] && ! "$SUDO" -u nobody test -x ~; then
|
||||
echo ~ is not executable by nobody, adding perms.
|
||||
chmod go+x ~
|
||||
if [ ! -z "$SUDO" ]; then
|
||||
# Ubuntu 22.04 defaults to private home dirs which prevent the
|
||||
# agent-getpeerid test from running ssh-add as nobody. See
|
||||
# https://github.com/actions/runner-images/issues/6106
|
||||
if ! "$SUDO" -u nobody test -x ~; then
|
||||
echo ~ is not executable by nobody, adding perms.
|
||||
chmod go+x ~
|
||||
fi
|
||||
# Some of the Mac OS X runners don't have a nopasswd sudo rule. Regular
|
||||
# sudo still works, but sudo -u doesn't. Restore the sudo rule.
|
||||
if ! "$SUDO" grep -E 'runner.*NOPASSWD' /etc/passwd >/dev/null; then
|
||||
echo "Restoring runner nopasswd rule to sudoers."
|
||||
echo 'runner ALL=(ALL) NOPASSWD: ALL' |$SUDO tee -a /etc/sudoers
|
||||
fi
|
||||
if ! "$SUDO" -u nobody -S test -x ~ </dev/null; then
|
||||
echo "Still can't sudo to nobody."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${TARGETS}" = "kitchensink" ]; then
|
||||
@ -57,6 +66,7 @@ for flag in $CONFIGFLAGS; do
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Setting up for '$TARGETS'"
|
||||
for TARGET in $TARGETS; do
|
||||
case $TARGET in
|
||||
default|without-openssl|without-zlib|c89)
|
||||
@ -87,7 +97,9 @@ for TARGET in $TARGETS; do
|
||||
esac
|
||||
;;
|
||||
*pam)
|
||||
PACKAGES="$PACKAGES libpam0g-dev"
|
||||
case "$PACKAGER" in
|
||||
apt) PACKAGES="$PACKAGES libpam0g-dev" ;;
|
||||
esac
|
||||
;;
|
||||
sk)
|
||||
INSTALL_FIDO_PPA="yes"
|
||||
@ -116,7 +128,7 @@ for TARGET in $TARGETS; do
|
||||
1.*) INSTALL_OPENSSL="OpenSSL_$(echo ${INSTALL_OPENSSL} | tr . _)" ;;
|
||||
3.*) INSTALL_OPENSSL="openssl-${INSTALL_OPENSSL}" ;;
|
||||
esac
|
||||
PACKAGES="${PACKAGES} putty-tools"
|
||||
PACKAGES="${PACKAGES} putty-tools dropbear-bin"
|
||||
;;
|
||||
libressl-*)
|
||||
INSTALL_LIBRESSL=$(echo ${TARGET} | cut -f2 -d-)
|
||||
@ -124,12 +136,16 @@ for TARGET in $TARGETS; do
|
||||
master) ;;
|
||||
*) INSTALL_LIBRESSL="$(echo ${TARGET} | cut -f2 -d-)" ;;
|
||||
esac
|
||||
PACKAGES="${PACKAGES} putty-tools"
|
||||
PACKAGES="${PACKAGES} putty-tools dropbear-bin"
|
||||
;;
|
||||
boringssl)
|
||||
INSTALL_BORINGSSL=1
|
||||
PACKAGES="${PACKAGES} cmake ninja-build"
|
||||
;;
|
||||
putty-*)
|
||||
INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-)
|
||||
PACKAGES="${PACKAGES} cmake"
|
||||
;;
|
||||
valgrind*)
|
||||
PACKAGES="$PACKAGES valgrind"
|
||||
;;
|
||||
@ -156,6 +172,13 @@ while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do
|
||||
PACKAGES=""
|
||||
fi
|
||||
;;
|
||||
brew)
|
||||
if [ ! -z "PACKAGES" ]; then
|
||||
if brew install $PACKAGES; then
|
||||
PACKAGES=""
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
setup)
|
||||
if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then
|
||||
PACKAGES=""
|
||||
@ -176,7 +199,7 @@ if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
|
||||
(cd ${HOME} &&
|
||||
git clone https://github.com/GrapheneOS/hardened_malloc.git &&
|
||||
cd ${HOME}/hardened_malloc &&
|
||||
make -j2 && sudo cp out/libhardened_malloc.so /usr/lib/)
|
||||
make && sudo cp out/libhardened_malloc.so /usr/lib/)
|
||||
fi
|
||||
|
||||
if [ ! -z "${INSTALL_OPENSSL}" ]; then
|
||||
@ -197,14 +220,14 @@ if [ ! -z "${INSTALL_LIBRESSL}" ]; then
|
||||
git checkout ${INSTALL_LIBRESSL} &&
|
||||
sh update.sh && sh autogen.sh &&
|
||||
./configure --prefix=/opt/libressl &&
|
||||
make -j2 && sudo make install)
|
||||
make && sudo make install)
|
||||
else
|
||||
LIBRESSL_URLBASE=https://cdn.openbsd.org/pub/OpenBSD/LibreSSL
|
||||
(cd ${HOME} &&
|
||||
wget ${LIBRESSL_URLBASE}/libressl-${INSTALL_LIBRESSL}.tar.gz &&
|
||||
tar xfz libressl-${INSTALL_LIBRESSL}.tar.gz &&
|
||||
cd libressl-${INSTALL_LIBRESSL} &&
|
||||
./configure --prefix=/opt/libressl && make -j2 && sudo make install)
|
||||
./configure --prefix=/opt/libressl && make && sudo make install)
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -222,3 +245,25 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then
|
||||
cd ${HOME}/zlib && ./configure && make &&
|
||||
sudo make install prefix=/opt/zlib)
|
||||
fi
|
||||
|
||||
if [ ! -z "${INSTALL_PUTTY}" ]; then
|
||||
ver="${INSTALL_PUTTY}"
|
||||
case "${INSTALL_PUTTY}" in
|
||||
snapshot)
|
||||
tarball=putty.tar.gz
|
||||
(cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball})
|
||||
;;
|
||||
*)
|
||||
tarball=putty-${ver}.tar.gz
|
||||
(cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball})
|
||||
;;
|
||||
esac
|
||||
(cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-*
|
||||
if [ -f CMakeLists.txt ]; then
|
||||
cmake . && cmake --build . && sudo cmake --build . --target install
|
||||
else
|
||||
./configure && make && sudo make install
|
||||
fi
|
||||
)
|
||||
/usr/local/bin/plink -V
|
||||
fi
|
||||
|
43
.github/workflows/c-cpp.yml
vendored
43
.github/workflows/c-cpp.yml
vendored
@ -1,10 +1,15 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
workflow_dispatch: # disable for win32-openssh fork
|
||||
# push:
|
||||
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ]
|
||||
# pull_request:
|
||||
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }} ${{ matrix.config }}"
|
||||
if: github.repository != 'openssh/openssh-portable-selfhosted'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -13,9 +18,9 @@ jobs:
|
||||
target:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
- macos-11
|
||||
- macos-12
|
||||
- macos-13
|
||||
- macos-14
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
config: [default]
|
||||
@ -44,7 +49,8 @@ jobs:
|
||||
- { target: ubuntu-20.04, config: gcc-7 }
|
||||
- { target: ubuntu-20.04, config: gcc-8 }
|
||||
- { target: ubuntu-20.04, config: gcc-10 }
|
||||
- { target: ubuntu-20.04, config: gcc-11-Werror }
|
||||
- { target: ubuntu-22.04, config: gcc-11-Werror }
|
||||
- { target: ubuntu-22.04, config: gcc-12-Werror }
|
||||
- { target: ubuntu-20.04, config: pam }
|
||||
- { target: ubuntu-20.04, config: kitchensink }
|
||||
- { target: ubuntu-22.04, config: hardenedmalloc }
|
||||
@ -58,18 +64,35 @@ jobs:
|
||||
- { target: ubuntu-latest, config: libressl-3.5.3 }
|
||||
- { target: ubuntu-latest, config: libressl-3.6.1 }
|
||||
- { target: ubuntu-latest, config: libressl-3.7.2 }
|
||||
- { target: ubuntu-latest, config: libressl-3.8.4 }
|
||||
- { target: ubuntu-latest, config: libressl-3.9.1 }
|
||||
- { target: ubuntu-latest, config: openssl-master }
|
||||
- { target: ubuntu-latest, config: openssl-noec }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1 }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1k }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1n }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1q }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1t }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1w }
|
||||
- { target: ubuntu-latest, config: openssl-3.0.0 }
|
||||
- { target: ubuntu-latest, config: openssl-3.0.7 }
|
||||
- { target: ubuntu-latest, config: openssl-3.0.13 }
|
||||
- { target: ubuntu-latest, config: openssl-3.1.0 }
|
||||
- { target: ubuntu-latest, config: openssl-3.1.5 }
|
||||
- { target: ubuntu-latest, config: openssl-3.2.1 }
|
||||
- { target: ubuntu-latest, config: openssl-3.3.0 }
|
||||
- { target: ubuntu-latest, config: openssl-1.1.1_stable }
|
||||
- { target: ubuntu-latest, config: openssl-3.0 } # stable branch
|
||||
- { target: ubuntu-latest, config: openssl-3.1 } # stable branch
|
||||
- { target: ubuntu-latest, config: openssl-3.2 } # stable branch
|
||||
- { target: ubuntu-latest, config: openssl-3.3 } # stable branch
|
||||
- { target: ubuntu-latest, config: putty-0.71 }
|
||||
- { target: ubuntu-latest, config: putty-0.72 }
|
||||
- { target: ubuntu-latest, config: putty-0.73 }
|
||||
- { target: ubuntu-latest, config: putty-0.74 }
|
||||
- { target: ubuntu-latest, config: putty-0.75 }
|
||||
- { target: ubuntu-latest, config: putty-0.76 }
|
||||
- { target: ubuntu-latest, config: putty-0.77 }
|
||||
- { target: ubuntu-latest, config: putty-0.78 }
|
||||
- { target: ubuntu-latest, config: putty-0.79 }
|
||||
- { target: ubuntu-latest, config: putty-0.80 }
|
||||
- { target: ubuntu-latest, config: putty-snapshot }
|
||||
- { target: ubuntu-latest, config: zlib-develop }
|
||||
- { target: ubuntu-22.04, config: pam }
|
||||
- { target: ubuntu-22.04, config: krb5 }
|
||||
@ -79,9 +102,9 @@ jobs:
|
||||
- { target: ubuntu-22.04, config: selinux }
|
||||
- { target: ubuntu-22.04, config: kitchensink }
|
||||
- { target: ubuntu-22.04, config: without-openssl }
|
||||
- { target: macos-11, config: pam }
|
||||
- { target: macos-12, config: pam }
|
||||
- { target: macos-13, config: pam }
|
||||
- { target: macos-14, config: pam }
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- name: set cygwin git params
|
||||
@ -105,7 +128,7 @@ jobs:
|
||||
- name: make clean
|
||||
run: make clean
|
||||
- name: make
|
||||
run: make -j2
|
||||
run: make
|
||||
- name: make tests
|
||||
run: sh ./.github/run_test.sh ${{ matrix.config }}
|
||||
env:
|
||||
|
6
.github/workflows/cifuzz.yml
vendored
6
.github/workflows/cifuzz.yml
vendored
@ -1,6 +1,10 @@
|
||||
name: CIFuzz
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_dispatch: # disable for win32-openssh fork
|
||||
# push:
|
||||
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ]
|
||||
# pull_request:
|
||||
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yaml' ]
|
||||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
|
83
.github/workflows/selfhosted.yml
vendored
83
.github/workflows/selfhosted.yml
vendored
@ -1,17 +1,27 @@
|
||||
name: C/C++ CI self-hosted
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_dispatch: # disable for win32-openssh fork
|
||||
# push:
|
||||
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/selfhosted.yml' ]
|
||||
|
||||
jobs:
|
||||
selfhosted:
|
||||
name: "${{ matrix.target }} ${{ matrix.config }}"
|
||||
if: github.repository == 'openssh/openssh-portable-selfhosted'
|
||||
runs-on: ${{ matrix.host }}
|
||||
timeout-minutes: 600
|
||||
env:
|
||||
DEBUG_ACTIONS: false
|
||||
HOST: ${{ matrix.host }}
|
||||
TARGET_HOST: ${{ matrix.target }}
|
||||
TARGET_CONFIG: ${{ matrix.config }}
|
||||
TARGET_DOMAIN: ${{ startsWith(matrix.host, 'libvirt') && format('{0}-{1}-{2}', matrix.target, matrix.config, github.run_id) || matrix.target }}
|
||||
EPHEMERAL: ${{ startsWith(matrix.host, 'libvirt') }}
|
||||
PERSISTENT: ${{ startsWith(matrix.host, 'persist') }}
|
||||
REMOTE: ${{ startsWith(matrix.host, 'remote') }}
|
||||
VM: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') }}
|
||||
SSHFS: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') || startsWith(matrix.host, 'remote') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# We use a matrix in two parts: firstly all of the VMs are tested with the
|
||||
@ -30,6 +40,7 @@ jobs:
|
||||
- fbsd10
|
||||
- fbsd12
|
||||
- fbsd13
|
||||
- fbsd14
|
||||
- minix3
|
||||
- nbsd3
|
||||
- nbsd4
|
||||
@ -37,22 +48,27 @@ jobs:
|
||||
- nbsd9
|
||||
- obsd51
|
||||
- obsd67
|
||||
- obsd69
|
||||
- obsd70
|
||||
- obsd72
|
||||
- obsd73
|
||||
- obsd74
|
||||
- obsdsnap
|
||||
- obsdsnap-i386
|
||||
- openindiana
|
||||
- sol10
|
||||
- sol11
|
||||
- ubuntu-2204
|
||||
config:
|
||||
- default
|
||||
host:
|
||||
- libvirt
|
||||
include:
|
||||
# Long-running/slow tests have access to high priority runners.
|
||||
- { target: aix51, config: default, host: libvirt-hipri }
|
||||
- { target: openindiana, config: pam, host: libvirt-hipri }
|
||||
- { target: sol10, config: default, host: libvirt-hipri }
|
||||
- { target: sol10, config: pam, host: libvirt-hipri }
|
||||
- { target: sol11, config: default, host: libvirt-hipri }
|
||||
- { target: sol11, config: pam-krb5, host: libvirt-hipri }
|
||||
- { target: sol11, config: sol64, host: libvirt-hipri }
|
||||
# Then we include extra libvirt test configs.
|
||||
- { target: aix51, config: default, host: libvirt }
|
||||
- { target: centos7, config: pam, host: libvirt }
|
||||
- { target: debian-i386, config: pam, host: libvirt }
|
||||
- { target: dfly30, config: without-openssl, host: libvirt}
|
||||
@ -63,40 +79,50 @@ jobs:
|
||||
- { target: fbsd10, config: pam, host: libvirt }
|
||||
- { target: fbsd12, config: pam, host: libvirt }
|
||||
- { target: fbsd13, config: pam, host: libvirt }
|
||||
- { target: fbsd14, config: pam, host: libvirt }
|
||||
- { target: nbsd8, config: pam, host: libvirt }
|
||||
- { target: nbsd9, config: pam, host: libvirt }
|
||||
- { target: openindiana, config: pam, host: libvirt }
|
||||
- { target: sol10, config: pam, host: libvirt }
|
||||
- { target: sol11, config: pam-krb5, host: libvirt }
|
||||
- { target: sol11, config: sol64, host: libvirt }
|
||||
- { target: nbsd10, config: pam, host: libvirt }
|
||||
# ARM64 VMs
|
||||
- { target: obsd-arm64, config: default, host: libvirt-arm64 }
|
||||
# VMs with persistent disks that have their own runner.
|
||||
- { target: win10, config: default, host: win10 }
|
||||
- { target: win10, config: cygwin-release, host: win10 }
|
||||
# Physical hosts, with either native runners or remote via ssh.
|
||||
- { target: win10, config: default, host: persist-win10 }
|
||||
- { target: win10, config: cygwin-release, host: persist-win10 }
|
||||
# Physical hosts with native runners.
|
||||
- { target: ARM, config: default, host: ARM }
|
||||
- { target: ARM64, config: default, host: ARM64 }
|
||||
- { target: ARM64, config: pam, host: ARM64 }
|
||||
- { target: debian-riscv64, config: default, host: debian-riscv64 }
|
||||
- { target: obsd-arm64, config: default, host: obsd-arm64 }
|
||||
- { target: openwrt-mips, config: default, host: openwrt-mips }
|
||||
- { target: openwrt-mipsel, config: default, host: openwrt-mipsel }
|
||||
# Physical hosts with remote runners.
|
||||
- { target: debian-riscv64, config: default, host: remote-debian-riscv64 }
|
||||
|
||||
- { target: openwrt-mips, config: default, host: remote-openwrt-mips }
|
||||
- { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel }
|
||||
steps:
|
||||
- name: shutdown VM if running
|
||||
run: vmshutdown
|
||||
- name: unmount stale workspace
|
||||
if: env.SSHFS == 'true'
|
||||
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: shutdown VM if running
|
||||
if: env.VM == 'true'
|
||||
run: vmshutdown
|
||||
- uses: actions/checkout@main
|
||||
- name: autoreconf
|
||||
run: autoreconf
|
||||
- name: startup VM
|
||||
if: env.VM == 'true'
|
||||
run: vmstartup
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: copy and mount workspace
|
||||
if: env.SSHFS == 'true'
|
||||
run: sshfs_mount
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: configure
|
||||
run: vmrun ./.github/configure.sh ${{ matrix.config }}
|
||||
- name: save config
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: ${{ matrix.target }}-${{ matrix.config }}-config
|
||||
path: config.h
|
||||
# - name: save config
|
||||
# uses: actions/upload-artifact@main
|
||||
# with:
|
||||
# name: ${{ matrix.target }}-${{ matrix.config }}-config
|
||||
# path: config.h
|
||||
- name: make clean
|
||||
run: vmrun make clean
|
||||
- name: make
|
||||
@ -115,7 +141,10 @@ jobs:
|
||||
regress/*.log
|
||||
regress/log/*
|
||||
regress/valgrind-out/
|
||||
- name: shutdown VM
|
||||
if: always()
|
||||
run: vmshutdown
|
||||
- name: unmount workspace
|
||||
if: always() && env.SSHFS == 'true'
|
||||
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: shutdown VM
|
||||
if: always() && env.VM == 'true'
|
||||
run: vmshutdown
|
||||
|
23
.github/workflows/upstream.yml
vendored
23
.github/workflows/upstream.yml
vendored
@ -1,24 +1,32 @@
|
||||
name: Upstream self-hosted
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ '**.c', '**.h', '.github/**' ]
|
||||
workflow_dispatch: # disable for win32-openssh fork
|
||||
# push:
|
||||
# branches: [ master ]
|
||||
# paths: [ '**.c', '**.h', '**.sh', '.github/configs', '.github/workflows/upstream.yml' ]
|
||||
|
||||
jobs:
|
||||
selfhosted:
|
||||
name: "upstream ${{ matrix.target }} ${{ matrix.config }}"
|
||||
if: github.repository == 'openssh/openssh-portable-selfhosted'
|
||||
runs-on: 'libvirt'
|
||||
env:
|
||||
DEBUG_ACTIONS: true
|
||||
EPHEMERAL: true
|
||||
HOST: 'libvirt'
|
||||
TARGET_HOST: ${{ matrix.target }}
|
||||
TARGET_CONFIG: ${{ matrix.config }}
|
||||
TARGET_DOMAIN: ${{ format('{0}-{1}-{2}', matrix.target, matrix.config, github.run_id) || matrix.target }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [ obsdsnap, obsdsnap-i386 ]
|
||||
config: [ default, without-openssl, ubsan ]
|
||||
steps:
|
||||
- name: unmount stale workspace
|
||||
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: shutdown VM if running
|
||||
run: vmshutdown
|
||||
working-directory: ${{ runner.temp }}
|
||||
@ -26,6 +34,9 @@ jobs:
|
||||
- name: startup VM
|
||||
run: vmstartup
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: copy and mount workspace
|
||||
run: sshfs_mount
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: update source
|
||||
run: vmrun "cd /usr/src && cvs up -dPA usr.bin/ssh regress/usr.bin/ssh"
|
||||
- name: make clean
|
||||
@ -33,7 +44,7 @@ jobs:
|
||||
- name: make
|
||||
run: vmrun "cd /usr/src/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
|
||||
- name: make install
|
||||
run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install"
|
||||
run: vmrun "cd /usr/src/usr.bin/ssh && sudo make install && sudo /etc/rc.d/sshd -f restart"
|
||||
- name: make tests`
|
||||
run: vmrun "cd /usr/src/regress/usr.bin/ssh && case ${{ matrix.config }} in without-openssl) make OPENSSL=no;; ubsan) make DEBUG='-fsanitize-minimal-runtime -fsanitize=undefined';; *) make; esac"
|
||||
env:
|
||||
@ -47,6 +58,10 @@ jobs:
|
||||
path: |
|
||||
/usr/obj/regress/usr.bin/ssh/obj/*.log
|
||||
/usr/obj/regress/usr.bin/ssh/obj/log/*
|
||||
- name: unmount workspace
|
||||
if: always()
|
||||
run: fusermount -u ${GITHUB_WORKSPACE} || true
|
||||
working-directory: ${{ runner.temp }}
|
||||
- name: shutdown VM
|
||||
if: always()
|
||||
run: vmshutdown
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -2,23 +2,21 @@
|
||||
Makefile
|
||||
buildpkg.sh
|
||||
config.h
|
||||
config.h.in
|
||||
config.h.in~
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
aclocal.m4
|
||||
openbsd-compat/Makefile
|
||||
openbsd-compat/regress/Makefile
|
||||
openssh.xml
|
||||
opensshd.init
|
||||
survey.sh
|
||||
**/*.0
|
||||
**/*.o
|
||||
**/*.lo
|
||||
**/*.so
|
||||
**/*.out
|
||||
**/*.a
|
||||
**/*.un~
|
||||
**/.*.swp
|
||||
autom4te.cache/
|
||||
scp
|
||||
sftp
|
||||
|
@ -1,3 +1,4 @@
|
||||
509bb19bb9762a4b3b589af98bac2e730541b6d4 clean sshd random relinking kit
|
||||
5317f294d63a876bfc861e19773b1575f96f027d remove libssh from makefiles
|
||||
a337e886a49f96701ccbc4832bed086a68abfa85 Makefile changes
|
||||
f2c9feb26963615c4fece921906cf72e248b61ee more Makefile
|
||||
@ -27,6 +28,15 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile
|
||||
f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update
|
||||
1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes
|
||||
e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks
|
||||
5a636f6ca7f25bfe775df4952f7aac90a7fcbbee moduli update
|
||||
ef9341d5a50f0d33e3a6fbe995e92964bc7ef2d3 Makefile relinking changes
|
||||
2fe8d707ae35ba23c7916adcb818bb5b66837ba0 ssh-agent relink kit
|
||||
866cfcc1955aef8f3fc32da0b70c353a1b859f2e ssh-agent relink changes
|
||||
8b3820adb4da4e139c4b3cffbcc0bde9f08bf0c6 sshd-session relink kit
|
||||
6d2ded4cd91d4d727c2b26e099b91ea935bed504 relink kit
|
||||
fb39324748824cb0387e9d67c41d1bef945c54ea Makefile change
|
||||
5f378c38ad8976d507786dc4db9283a879ec8cd0 Makefile change
|
||||
112aacedd3b61cc5c34b1fa6d9fb759214179172 Makefile change
|
||||
|
||||
Old upstream tree:
|
||||
|
||||
|
39
Makefile.in
39
Makefile.in
@ -24,6 +24,7 @@ SSH_PROGRAM=@bindir@/ssh
|
||||
ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
|
||||
SFTP_SERVER=$(libexecdir)/sftp-server
|
||||
SSH_KEYSIGN=$(libexecdir)/ssh-keysign
|
||||
SSHD_SESSION=$(libexecdir)/sshd-session
|
||||
SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
|
||||
SSH_SK_HELPER=$(libexecdir)/ssh-sk-helper
|
||||
PRIVSEP_PATH=@PRIVSEP_PATH@
|
||||
@ -37,6 +38,7 @@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \
|
||||
-D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
|
||||
-D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
|
||||
-D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \
|
||||
-D_PATH_SSHD_SESSION=\"$(SSHD_SESSION)\" \
|
||||
-D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
|
||||
-D_PATH_SSH_SK_HELPER=\"$(SSH_SK_HELPER)\" \
|
||||
-D_PATH_SSH_PIDDIR=\"$(piddir)\" \
|
||||
@ -69,7 +71,7 @@ MKDIR_P=@MKDIR_P@
|
||||
|
||||
.SUFFIXES: .lo
|
||||
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT)
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT)
|
||||
|
||||
XMSS_OBJS=\
|
||||
ssh-xmss.o \
|
||||
@ -107,7 +109,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
|
||||
poly1305.o chacha.o cipher-chachapoly.o cipher-chachapoly-libcrypto.o \
|
||||
ssh-ed25519.o digest-openssl.o digest-libc.o \
|
||||
hmac.o ed25519.o hash.o \
|
||||
kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
|
||||
kex.o kex-names.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
|
||||
kexgexc.o kexgexs.o \
|
||||
kexsntrup761x25519.o sntrup761.o kexgen.o \
|
||||
sftp-realpath.o platform-pledge.o platform-tracing.o platform-misc.o \
|
||||
@ -118,17 +120,23 @@ SKOBJS= ssh-sk-client.o
|
||||
SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
|
||||
sshconnect.o sshconnect2.o mux.o $(SKOBJS)
|
||||
|
||||
SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o \
|
||||
SSHDOBJS=sshd.o \
|
||||
platform-listen.o \
|
||||
servconf.o sshpty.o srclimit.o groupaccess.o auth2-methods.o \
|
||||
dns.o fatal.o compat.o utf8.o authfd.o canohost.o \
|
||||
$(SKOBJS)
|
||||
|
||||
SSHD_SESSION_OBJS=sshd-session.o auth-rhosts.o auth-passwd.o \
|
||||
audit.o audit-bsm.o audit-linux.o platform.o \
|
||||
sshpty.o sshlogin.o servconf.o serverloop.o \
|
||||
auth.o auth2.o auth-options.o session.o \
|
||||
auth.o auth2.o auth2-methods.o auth-options.o session.o \
|
||||
auth2-chall.o groupaccess.o \
|
||||
auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
|
||||
auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-pubkeyfile.o \
|
||||
monitor.o monitor_wrap.o auth-krb5.o \
|
||||
auth2-gss.o gss-serv.o gss-serv-krb5.o \
|
||||
loginrec.o auth-pam.o auth-shadow.o auth-sia.o \
|
||||
srclimit.o sftp-server.o sftp-common.o \
|
||||
sftp-server.o sftp-common.o \
|
||||
sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
|
||||
sandbox-seccomp-filter.o sandbox-capsicum.o sandbox-pledge.o \
|
||||
sandbox-solaris.o uidswap.o $(SKOBJS)
|
||||
@ -207,7 +215,10 @@ ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
|
||||
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(GSSLIBS) $(CHANNELLIBS)
|
||||
|
||||
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
|
||||
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) $(CHANNELLIBS)
|
||||
$(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS)
|
||||
|
||||
sshd-session$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHD_SESSION_OBJS)
|
||||
$(LD) -o $@ $(SSHD_SESSION_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) $(CHANNELLIBS)
|
||||
|
||||
scp$(EXEEXT): $(LIBCOMPAT) libssh.a $(SCP_OBJS)
|
||||
$(LD) -o $@ $(SCP_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
||||
@ -399,6 +410,7 @@ install-files:
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) sshd-session$(EXEEXT) $(DESTDIR)$(SSHD_SESSION)$(EXEEXT)
|
||||
$(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) ssh-sk-helper$(EXEEXT) $(DESTDIR)$(SSH_SK_HELPER)$(EXEEXT)
|
||||
@ -715,7 +727,7 @@ regress-unit-binaries: regress-prep $(REGRESSLIBS) \
|
||||
regress/unittests/sshsig/test_sshsig$(EXEEXT) \
|
||||
regress/unittests/utf8/test_utf8$(EXEEXT)
|
||||
|
||||
tests: file-tests t-exec interop-tests unit
|
||||
tests: file-tests t-exec interop-tests extra-tests unit
|
||||
echo all tests passed
|
||||
|
||||
unit: regress-unit-binaries
|
||||
@ -726,7 +738,7 @@ unit: regress-unit-binaries
|
||||
OBJ="$(BUILDDIR)/regress" \
|
||||
$@ && echo $@ tests passed
|
||||
|
||||
interop-tests t-exec file-tests: regress-prep regress-binaries $(TARGETS)
|
||||
interop-tests t-exec file-tests extra-tests: regress-prep regress-binaries $(TARGETS)
|
||||
cd $(srcdir)/regress || exit $$?; \
|
||||
EGREP='@EGREP@' \
|
||||
OPENSSL_BIN='@OPENSSL_BIN@' \
|
||||
@ -741,6 +753,7 @@ interop-tests t-exec file-tests: regress-prep regress-binaries $(TARGETS)
|
||||
TEST_SSH_SCP="$(BUILDDIR)/scp" \
|
||||
TEST_SSH_SSH="$(BUILDDIR)/ssh" \
|
||||
TEST_SSH_SSHD="$(BUILDDIR)/sshd" \
|
||||
TEST_SSH_SSHD_SESSION="$(BUILDDIR)/sshd-session" \
|
||||
TEST_SSH_SSHAGENT="$(BUILDDIR)/ssh-agent" \
|
||||
TEST_SSH_SSHADD="$(BUILDDIR)/ssh-add" \
|
||||
TEST_SSH_SSHKEYGEN="$(BUILDDIR)/ssh-keygen" \
|
||||
@ -751,9 +764,13 @@ interop-tests t-exec file-tests: regress-prep regress-binaries $(TARGETS)
|
||||
TEST_SSH_SK_HELPER="$(BUILDDIR)/ssh-sk-helper" \
|
||||
TEST_SSH_SFTPSERVER="$(BUILDDIR)/sftp-server" \
|
||||
TEST_SSH_MODULI_FILE="$(abs_top_srcdir)/moduli" \
|
||||
TEST_SSH_PLINK="plink" \
|
||||
TEST_SSH_PUTTYGEN="puttygen" \
|
||||
TEST_SSH_CONCH="conch" \
|
||||
TEST_SSH_PLINK="@PLINK@" \
|
||||
TEST_SSH_PUTTYGEN="@PUTTYGEN@" \
|
||||
TEST_SSH_CONCH="@CONCH@" \
|
||||
TEST_SSH_DROPBEAR="@DROPBEAR@" \
|
||||
TEST_SSH_DROPBEARKEY="@DROPBEARKEY@" \
|
||||
TEST_SSH_DROPBEARCONVERT="@DROPBEARCONVERT@" \
|
||||
TEST_SSH_DBCLIENT="@DBCLIENT@" \
|
||||
TEST_SSH_IPV6="@TEST_SSH_IPV6@" \
|
||||
TEST_SSH_UTF8="@TEST_SSH_UTF8@" \
|
||||
TEST_SHELL="$(TEST_SHELL)" \
|
||||
|
52
PROTOCOL
52
PROTOCOL
@ -137,24 +137,51 @@ than as a named global or channel request to allow pings with very
|
||||
short packet lengths, which would not be possible with other
|
||||
approaches.
|
||||
|
||||
1.9 transport: strict key exchange extension
|
||||
1.10 transport: strict key exchange extension
|
||||
|
||||
OpenSSH supports a number of transport-layer hardening measures under
|
||||
a "strict KEX" feature. This feature is signalled similarly to the
|
||||
RFC8305 ext-info feature: by including a additional algorithm in the
|
||||
SSH2_MSG_KEXINIT kex_algorithms field. The client may append
|
||||
RFC8308 ext-info feature: by including a additional algorithm in the
|
||||
initial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
|
||||
"kex-strict-c-v00@openssh.com" to its kex_algorithms and the server
|
||||
may append "kex-strict-s-v00@openssh.com".
|
||||
may append "kex-strict-s-v00@openssh.com". These pseudo-algorithms
|
||||
are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
|
||||
if they are present in subsequent SSH2_MSG_KEXINIT packets.
|
||||
|
||||
When endpoint that supports this extension observes this algorithm
|
||||
When an endpoint that supports this extension observes this algorithm
|
||||
name in a peer's KEXINIT packet, it MUST make the following changes to
|
||||
the the protocol:
|
||||
the protocol:
|
||||
|
||||
a) During initial KEX, terminate the connection if any unexpected or
|
||||
out-of-sequence packet is received. This includes terminating the
|
||||
connection if the first packet received is not SSH2_MSG_KEXINIT.
|
||||
b) At each SSH2_MSG_NEWKEYS message, reset the packet sequence number
|
||||
to zero.
|
||||
a) During initial KEX, terminate the connection if out-of-sequence
|
||||
packet or any message that is not strictly required by KEX is
|
||||
received. This includes terminating the connection if the first
|
||||
packet received is not SSH2_MSG_KEXINIT. Unexpected packets for
|
||||
the purpose of strict KEX include messages that are otherwise
|
||||
valid at any time during the connection such as SSH2_MSG_DEBUG,
|
||||
SSH2_MSG_IGNORE or SSH2_MSG_UNIMPLEMENTED.
|
||||
b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the
|
||||
packet sequence number to zero. This behaviour persists for the
|
||||
duration of the connection (i.e. not just the first
|
||||
SSH2_MSG_NEWKEYS).
|
||||
|
||||
1.11 transport: SSH2_MSG_EXT_INFO during user authentication
|
||||
|
||||
This protocol extension allows the SSH2_MSG_EXT_INFO to be sent
|
||||
during user authentication. RFC8308 does allow a second
|
||||
SSH2_MSG_EXT_INFO notification, but it may only be sent at the end
|
||||
of user authentication and this is too late to signal per-user
|
||||
server signature algorithms.
|
||||
|
||||
Support for receiving the SSH2_MSG_EXT_INFO message during user
|
||||
authentication is signalled by the client including a
|
||||
"ext-info-in-auth@openssh.com" key via its initial SSH2_MSG_EXT_INFO
|
||||
set after the SSH2_MSG_NEWKEYS message.
|
||||
|
||||
A server that supports this extension MAY send a second
|
||||
SSH2_MSG_EXT_INFO message any time after the client's first
|
||||
SSH2_MSG_USERAUTH_REQUEST, regardless of whether it succeed or fails.
|
||||
The client SHOULD be prepared to update the server-sig-algs that
|
||||
it received during an earlier SSH2_MSG_EXT_INFO with the later one.
|
||||
|
||||
2. Connection protocol changes
|
||||
|
||||
@ -709,6 +736,7 @@ identifiers:
|
||||
The server will reply with a SSH_FXP_EXTENDED_REPLY:
|
||||
|
||||
byte SSH_FXP_EXTENDED_REPLY
|
||||
uint32 id
|
||||
string usernames
|
||||
string groupnames
|
||||
|
||||
@ -764,4 +792,4 @@ master instance and later clients.
|
||||
OpenSSH extends the usual agent protocol. These changes are documented
|
||||
in the PROTOCOL.agent file.
|
||||
|
||||
$OpenBSD: PROTOCOL,v 1.49 2023/08/28 03:28:43 djm Exp $
|
||||
$OpenBSD: PROTOCOL,v 1.55 2024/01/08 05:05:15 djm Exp $
|
||||
|
@ -49,10 +49,13 @@ Where a constraint consists of:
|
||||
|
||||
string from_username (must be empty)
|
||||
string from_hostname
|
||||
string reserved
|
||||
keyspec[] from_hostkeys
|
||||
string to_username
|
||||
string to_hostname
|
||||
string reserved
|
||||
keyspec[] to_hostkeys
|
||||
string reserved
|
||||
|
||||
And a keyspec consists of:
|
||||
|
||||
@ -81,4 +84,35 @@ the constraint is:
|
||||
|
||||
This option is only valid for XMSS keys.
|
||||
|
||||
$OpenBSD: PROTOCOL.agent,v 1.20 2023/10/03 23:56:10 djm Exp $
|
||||
3. associated-certs-v00@openssh.com key constraint extension
|
||||
|
||||
The key constraint extension allows certificates to be associated
|
||||
with private keys as they are loaded from a PKCS#11 token.
|
||||
|
||||
byte SSH_AGENT_CONSTRAIN_EXTENSION (0xff)
|
||||
string associated-certs-v00@openssh.com
|
||||
bool certs_only
|
||||
string certsblob
|
||||
|
||||
Where "certsblob" consists of one or more certificates encoded as public
|
||||
key blobs:
|
||||
|
||||
string[] certificates
|
||||
|
||||
This extension is only valid for SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED
|
||||
requests. When an agent receives this extension, it will attempt to match
|
||||
each certificate in the request with a corresponding private key loaded
|
||||
from the requested PKCS#11 token. When a matching key is found, the
|
||||
agent will graft the certificate contents to the token-hosted private key
|
||||
and store the result for subsequent use by regular agent operations.
|
||||
|
||||
If the "certs_only" flag is set, then this extension will cause ONLY
|
||||
the resultant certificates to be loaded to the agent. The default
|
||||
behaviour is to load the PKCS#11-hosted private key as well as the
|
||||
resultant certificate.
|
||||
|
||||
A SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED will return SSH_AGENT_SUCCESS
|
||||
if any key (plain private or certificate) was successfully loaded, or
|
||||
SSH_AGENT_FAILURE if no key was loaded.
|
||||
|
||||
$OpenBSD: PROTOCOL.agent,v 1.23 2024/04/30 05:45:56 djm Exp $
|
||||
|
@ -40,7 +40,7 @@ of the cipher block size.
|
||||
byte[] privatekey2
|
||||
string comment2
|
||||
...
|
||||
string privatekeyN
|
||||
byte[] privatekeyN
|
||||
string commentN
|
||||
byte 1
|
||||
byte 2
|
||||
@ -68,4 +68,4 @@ For unencrypted keys the cipher "none" and the KDF "none"
|
||||
are used with empty passphrases. The options if the KDF "none"
|
||||
are the empty string.
|
||||
|
||||
$OpenBSD: PROTOCOL.key,v 1.3 2022/07/01 04:45:50 djm Exp $
|
||||
$OpenBSD: PROTOCOL.key,v 1.4 2024/03/30 05:56:22 djm Exp $
|
||||
|
@ -188,8 +188,6 @@ For dynamically allocated listen port the server replies with
|
||||
|
||||
7. Requesting closure of port forwards
|
||||
|
||||
Note: currently unimplemented (server will always reply with MUX_S_FAILURE).
|
||||
|
||||
A client may request the master to close a port forward:
|
||||
|
||||
uint32 MUX_C_CLOSE_FWD
|
||||
@ -295,4 +293,4 @@ XXX session inspection via master
|
||||
XXX signals via mux request
|
||||
XXX list active connections via mux
|
||||
|
||||
$OpenBSD: PROTOCOL.mux,v 1.13 2022/01/01 01:55:30 jsg Exp $
|
||||
$OpenBSD: PROTOCOL.mux,v 1.14 2024/01/08 05:11:18 djm Exp $
|
||||
|
2
README
2
README
@ -1,4 +1,4 @@
|
||||
See https://www.openssh.com/releasenotes.html#9.5p1 for the release
|
||||
See https://www.openssh.com/releasenotes.html#9.8p1 for the release
|
||||
notes.
|
||||
|
||||
Please read https://www.openssh.com/report.html for bug reporting
|
||||
|
@ -53,11 +53,12 @@ Darwin does not provide a tun(4) driver required for OpenSSH-based
|
||||
virtual private networks. The BSD manpage still exists, but the driver
|
||||
has been removed in recent releases of Darwin and MacOS X.
|
||||
|
||||
Nevertheless, tunnel support is known to work with Darwin 8 and
|
||||
MacOS X 10.4 in Point-to-Point (Layer 3) and Ethernet (Layer 2) mode
|
||||
using a third party driver. More information is available at:
|
||||
http://www-user.rhrk.uni-kl.de/~nissler/tuntap/
|
||||
Tunnel support is known to work with Darwin 8 and MacOS X 10.4 in
|
||||
Point-to-Point (Layer 3) and Ethernet (Layer 2) mode using a third
|
||||
party driver. More information is available at:
|
||||
https://tuntaposx.sourceforge.net
|
||||
|
||||
Recent Darwin/MacOS X versions are likely unsupported.
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
15
aclocal.m4
vendored
Normal file
15
aclocal.m4
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_include([m4/openssh.m4])
|
12
addr.c
12
addr.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: addr.c,v 1.7 2023/03/27 03:31:05 djm Exp $ */
|
||||
/* $OpenBSD: addr.c,v 1.8 2024/04/02 09:29:31 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
|
||||
@ -27,6 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "addr.h"
|
||||
|
||||
@ -457,8 +458,9 @@ int
|
||||
addr_pton_cidr(const char *p, struct xaddr *n, u_int *l)
|
||||
{
|
||||
struct xaddr tmp;
|
||||
long unsigned int masklen = 999;
|
||||
char addrbuf[64], *mp, *cp;
|
||||
u_int masklen = 999;
|
||||
char addrbuf[64], *mp;
|
||||
const char *errstr;
|
||||
|
||||
/* Don't modify argument */
|
||||
if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) >= sizeof(addrbuf))
|
||||
@ -467,8 +469,8 @@ addr_pton_cidr(const char *p, struct xaddr *n, u_int *l)
|
||||
if ((mp = strchr(addrbuf, '/')) != NULL) {
|
||||
*mp = '\0';
|
||||
mp++;
|
||||
masklen = strtoul(mp, &cp, 10); // CodeQL [SM02313]: strtoul will initialize cp
|
||||
if (*mp < '0' || *mp > '9' || *cp != '\0' || masklen > 128)
|
||||
masklen = (u_int)strtonum(mp, 0, INT_MAX, &errstr);
|
||||
if (errstr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
54
auth-pam.c
54
auth-pam.c
@ -67,11 +67,6 @@
|
||||
#include <pam/pam_appl.h>
|
||||
#endif
|
||||
|
||||
#if !defined(SSHD_PAM_SERVICE)
|
||||
extern char *__progname;
|
||||
# define SSHD_PAM_SERVICE __progname
|
||||
#endif
|
||||
|
||||
/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
|
||||
#ifdef PAM_SUN_CODEBASE
|
||||
# define sshpam_const /* Solaris, HP-UX, SunOS */
|
||||
@ -105,6 +100,7 @@ extern char *__progname;
|
||||
#include "ssh-gss.h"
|
||||
#endif
|
||||
#include "monitor_wrap.h"
|
||||
#include "srclimit.h"
|
||||
|
||||
extern ServerOptions options;
|
||||
extern struct sshbuf *loginmsg;
|
||||
@ -171,13 +167,13 @@ sshpam_sigchld_handler(int sig)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (WIFSIGNALED(sshpam_thread_status) &&
|
||||
WTERMSIG(sshpam_thread_status) == SIGTERM)
|
||||
return; /* terminated by pthread_cancel */
|
||||
if (!WIFEXITED(sshpam_thread_status))
|
||||
sigdie("PAM: authentication thread exited unexpectedly");
|
||||
if (WEXITSTATUS(sshpam_thread_status) != 0)
|
||||
sigdie("PAM: authentication thread exited uncleanly");
|
||||
if (sshpam_thread_status == -1)
|
||||
return;
|
||||
if (WIFSIGNALED(sshpam_thread_status)) {
|
||||
if (signal_is_crash(WTERMSIG(sshpam_thread_status)))
|
||||
_exit(EXIT_CHILD_CRASH);
|
||||
} else if (!WIFEXITED(sshpam_thread_status))
|
||||
_exit(EXIT_CHILD_CRASH);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -668,7 +664,7 @@ static struct pam_conv store_conv = { sshpam_store_conv, NULL };
|
||||
void
|
||||
sshpam_cleanup(void)
|
||||
{
|
||||
if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor()))
|
||||
if (sshpam_handle == NULL || !mm_is_monitor())
|
||||
return;
|
||||
debug("PAM: cleanup");
|
||||
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv);
|
||||
@ -694,6 +690,8 @@ sshpam_init(struct ssh *ssh, Authctxt *authctxt)
|
||||
const char **ptr_pam_user = &pam_user;
|
||||
int r;
|
||||
|
||||
if (options.pam_service_name == NULL)
|
||||
fatal_f("internal error: NULL PAM service name");
|
||||
#if defined(PAM_SUN_CODEBASE) && defined(PAM_MAX_RESP_SIZE)
|
||||
/* Protect buggy PAM implementations from excessively long usernames */
|
||||
if (strlen(user) >= PAM_MAX_RESP_SIZE)
|
||||
@ -705,7 +703,8 @@ sshpam_init(struct ssh *ssh, Authctxt *authctxt)
|
||||
fatal("%s: called initially with no "
|
||||
"packet context", __func__);
|
||||
}
|
||||
} if (sshpam_handle != NULL) {
|
||||
}
|
||||
if (sshpam_handle != NULL) {
|
||||
/* We already have a PAM context; check if the user matches */
|
||||
sshpam_err = pam_get_item(sshpam_handle,
|
||||
PAM_USER, (sshpam_const void **)ptr_pam_user);
|
||||
@ -714,9 +713,10 @@ sshpam_init(struct ssh *ssh, Authctxt *authctxt)
|
||||
pam_end(sshpam_handle, sshpam_err);
|
||||
sshpam_handle = NULL;
|
||||
}
|
||||
debug("PAM: initializing for \"%s\"", user);
|
||||
sshpam_err =
|
||||
pam_start(SSHD_PAM_SERVICE, user, &store_conv, &sshpam_handle);
|
||||
debug("PAM: initializing for \"%s\" with service \"%s\"", user,
|
||||
options.pam_service_name);
|
||||
sshpam_err = pam_start(options.pam_service_name, user,
|
||||
&store_conv, &sshpam_handle);
|
||||
sshpam_authctxt = authctxt;
|
||||
|
||||
if (sshpam_err != PAM_SUCCESS) {
|
||||
@ -1101,20 +1101,15 @@ do_pam_account(void)
|
||||
}
|
||||
|
||||
void
|
||||
do_pam_setcred(int init)
|
||||
do_pam_setcred(void)
|
||||
{
|
||||
sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,
|
||||
(const void *)&store_conv);
|
||||
if (sshpam_err != PAM_SUCCESS)
|
||||
fatal("PAM: failed to set PAM_CONV: %s",
|
||||
pam_strerror(sshpam_handle, sshpam_err));
|
||||
if (init) {
|
||||
debug("PAM: establishing credentials");
|
||||
sshpam_err = pam_setcred(sshpam_handle, PAM_ESTABLISH_CRED);
|
||||
} else {
|
||||
debug("PAM: reinitializing credentials");
|
||||
sshpam_err = pam_setcred(sshpam_handle, PAM_REINITIALIZE_CRED);
|
||||
}
|
||||
debug("PAM: establishing credentials");
|
||||
sshpam_err = pam_setcred(sshpam_handle, PAM_ESTABLISH_CRED);
|
||||
if (sshpam_err == PAM_SUCCESS) {
|
||||
sshpam_cred_established = 1;
|
||||
return;
|
||||
@ -1127,6 +1122,7 @@ do_pam_setcred(int init)
|
||||
pam_strerror(sshpam_handle, sshpam_err));
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int
|
||||
sshpam_tty_conv(int n, sshpam_const struct pam_message **msg,
|
||||
struct pam_response **resp, void *data)
|
||||
@ -1182,6 +1178,7 @@ sshpam_tty_conv(int n, sshpam_const struct pam_message **msg,
|
||||
}
|
||||
|
||||
static struct pam_conv tty_conv = { sshpam_tty_conv, NULL };
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX this should be done in the authentication phase, but ssh1 doesn't
|
||||
@ -1190,8 +1187,8 @@ static struct pam_conv tty_conv = { sshpam_tty_conv, NULL };
|
||||
void
|
||||
do_pam_chauthtok(void)
|
||||
{
|
||||
if (use_privsep)
|
||||
fatal("Password expired (unable to change with privsep)");
|
||||
fatal("Password expired");
|
||||
#if 0
|
||||
sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,
|
||||
(const void *)&tty_conv);
|
||||
if (sshpam_err != PAM_SUCCESS)
|
||||
@ -1202,6 +1199,7 @@ do_pam_chauthtok(void)
|
||||
if (sshpam_err != PAM_SUCCESS)
|
||||
fatal("PAM: pam_chauthtok(): %s",
|
||||
pam_strerror(sshpam_handle, sshpam_err));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -1375,6 +1373,8 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password)
|
||||
fatal("PAM: %s: failed to set PAM_CONV: %s", __func__,
|
||||
pam_strerror(sshpam_handle, sshpam_err));
|
||||
|
||||
expose_authinfo(__func__);
|
||||
|
||||
sshpam_err = pam_authenticate(sshpam_handle, flags);
|
||||
sshpam_password = NULL;
|
||||
free(fake);
|
||||
|
@ -31,7 +31,7 @@ void start_pam(struct ssh *);
|
||||
void finish_pam(void);
|
||||
u_int do_pam_account(void);
|
||||
void do_pam_session(struct ssh *);
|
||||
void do_pam_setcred(int );
|
||||
void do_pam_setcred(void);
|
||||
void do_pam_chauthtok(void);
|
||||
int do_pam_putenv(char *, char *);
|
||||
char ** fetch_pam_environment(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth-rhosts.c,v 1.57 2022/12/09 00:17:40 dtucker Exp $ */
|
||||
/* $OpenBSD: auth-rhosts.c,v 1.58 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -46,7 +46,6 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern int use_privsep;
|
||||
|
||||
/*
|
||||
* This function processes an rhosts-style file (.rhosts, .shosts, or
|
||||
|
110
auth.c
110
auth.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth.c,v 1.160 2023/03/05 05:34:09 dtucker Exp $ */
|
||||
/* $OpenBSD: auth.c,v 1.161 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -85,7 +85,6 @@
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct include_list includes;
|
||||
extern int use_privsep;
|
||||
extern struct sshbuf *loginmsg;
|
||||
extern struct passwd *privsep_pw;
|
||||
extern struct sshauthopt *auth_opts;
|
||||
@ -285,7 +284,7 @@ auth_log(struct ssh *ssh, int authenticated, int partial,
|
||||
const char *authmsg;
|
||||
char *extra = NULL;
|
||||
|
||||
if (use_privsep && !mm_is_monitor() && !authctxt->postponed)
|
||||
if (!mm_is_monitor() && !authctxt->postponed)
|
||||
return;
|
||||
|
||||
/* Raise logging level */
|
||||
@ -494,11 +493,11 @@ getpwnamallow(struct ssh *ssh, const char *user)
|
||||
struct connection_info *ci;
|
||||
u_int i;
|
||||
|
||||
ci = get_connection_info(ssh, 1, options.use_dns);
|
||||
ci = server_get_connection_info(ssh, 1, options.use_dns);
|
||||
#ifdef WINDOWS
|
||||
/* getpwname - normalizes the incoming user and makes it lowercase
|
||||
/* it must be duped as the server matching routines may use getpwnam() and
|
||||
* and free the name being assigned to the connection info structure
|
||||
* and free the name being assigned to the connection info structure
|
||||
*/
|
||||
pw = getpwnam(user);
|
||||
ci->user = pw? xstrdup(pw->pw_name): user;
|
||||
@ -510,7 +509,7 @@ getpwnamallow(struct ssh *ssh, const char *user)
|
||||
log_verbose_reset();
|
||||
for (i = 0; i < options.num_log_verbose; i++)
|
||||
log_verbose_add(options.log_verbose[i]);
|
||||
process_permitopen(ssh, &options);
|
||||
server_process_permitopen(ssh);
|
||||
|
||||
#if defined(_AIX) && defined(HAVE_SETAUTHDB)
|
||||
aix_setauthdb(user);
|
||||
@ -669,97 +668,6 @@ fakepw(void)
|
||||
return (&fake);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the remote DNS hostname as a string. The returned string must not
|
||||
* be freed. NB. this will usually trigger a DNS query the first time it is
|
||||
* called.
|
||||
* This function does additional checks on the hostname to mitigate some
|
||||
* attacks on based on conflation of hostnames and IP addresses.
|
||||
*/
|
||||
|
||||
static char *
|
||||
remote_hostname(struct ssh *ssh)
|
||||
{
|
||||
struct sockaddr_storage from;
|
||||
socklen_t fromlen;
|
||||
struct addrinfo hints, *ai, *aitop;
|
||||
char name[NI_MAXHOST], ntop2[NI_MAXHOST];
|
||||
const char *ntop = ssh_remote_ipaddr(ssh);
|
||||
|
||||
/* Get IP address of client. */
|
||||
fromlen = sizeof(from);
|
||||
memset(&from, 0, sizeof(from));
|
||||
if (getpeername(ssh_packet_get_connection_in(ssh),
|
||||
(struct sockaddr *)&from, &fromlen) == -1) {
|
||||
debug("getpeername failed: %.100s", strerror(errno));
|
||||
return xstrdup(ntop);
|
||||
}
|
||||
|
||||
ipv64_normalise_mapped(&from, &fromlen);
|
||||
if (from.ss_family == AF_INET6)
|
||||
fromlen = sizeof(struct sockaddr_in6);
|
||||
|
||||
debug3("Trying to reverse map address %.100s.", ntop);
|
||||
/* Map the IP address to a host name. */
|
||||
if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
|
||||
NULL, 0, NI_NAMEREQD) != 0) {
|
||||
/* Host name not found. Use ip address. */
|
||||
return xstrdup(ntop);
|
||||
}
|
||||
|
||||
/*
|
||||
* if reverse lookup result looks like a numeric hostname,
|
||||
* someone is trying to trick us by PTR record like following:
|
||||
* 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5
|
||||
*/
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
|
||||
logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
|
||||
name, ntop);
|
||||
freeaddrinfo(ai);
|
||||
return xstrdup(ntop);
|
||||
}
|
||||
|
||||
/* Names are stored in lowercase. */
|
||||
lowercase(name);
|
||||
|
||||
/*
|
||||
* Map it back to an IP address and check that the given
|
||||
* address actually is an address of this host. This is
|
||||
* necessary because anyone with access to a name server can
|
||||
* define arbitrary names for an IP address. Mapping from
|
||||
* name to IP address can be trusted better (but can still be
|
||||
* fooled if the intruder has access to the name server of
|
||||
* the domain).
|
||||
*/
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = from.ss_family;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
|
||||
logit("reverse mapping checking getaddrinfo for %.700s "
|
||||
"[%s] failed.", name, ntop);
|
||||
return xstrdup(ntop);
|
||||
}
|
||||
/* Look for the address from the list of addresses. */
|
||||
for (ai = aitop; ai; ai = ai->ai_next) {
|
||||
if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
|
||||
sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
|
||||
(strcmp(ntop, ntop2) == 0))
|
||||
break;
|
||||
}
|
||||
freeaddrinfo(aitop);
|
||||
/* If we reached the end of the list, the address was not there. */
|
||||
if (ai == NULL) {
|
||||
/* Address not found for the host name. */
|
||||
logit("Address %.100s maps to %.600s, but this does not "
|
||||
"map back to the address.", ntop, name);
|
||||
return xstrdup(ntop);
|
||||
}
|
||||
return xstrdup(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the canonical name of the host in the other side of the current
|
||||
* connection. The host name is cached, so it is efficient to call this
|
||||
@ -773,12 +681,10 @@ auth_get_canonical_hostname(struct ssh *ssh, int use_dns)
|
||||
|
||||
if (!use_dns)
|
||||
return ssh_remote_ipaddr(ssh);
|
||||
else if (dnsname != NULL)
|
||||
if (dnsname != NULL)
|
||||
return dnsname;
|
||||
else {
|
||||
dnsname = remote_hostname(ssh);
|
||||
return dnsname;
|
||||
}
|
||||
dnsname = ssh_remote_hostname(ssh);
|
||||
return dnsname;
|
||||
}
|
||||
|
||||
/* These functions link key/cert options to the auth framework */
|
||||
|
15
auth.h
15
auth.h
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth.h,v 1.106 2022/06/15 16:08:25 djm Exp $ */
|
||||
/* $OpenBSD: auth.h,v 1.108 2024/05/17 06:42:04 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
@ -108,11 +108,15 @@ struct Authctxt {
|
||||
* the client.
|
||||
*/
|
||||
|
||||
struct authmethod_cfg {
|
||||
const char *name;
|
||||
const char *synonym;
|
||||
int *enabled;
|
||||
};
|
||||
|
||||
struct Authmethod {
|
||||
char *name;
|
||||
char *synonym;
|
||||
struct authmethod_cfg *cfg;
|
||||
int (*userauth)(struct ssh *, const char *);
|
||||
int *enabled;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -155,8 +159,6 @@ void auth2_record_info(Authctxt *authctxt, const char *, ...)
|
||||
void auth2_update_session_info(Authctxt *, const char *, const char *);
|
||||
|
||||
#ifdef KRB5
|
||||
int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *);
|
||||
int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt);
|
||||
int auth_krb5_password(Authctxt *authctxt, const char *password);
|
||||
void krb5_cleanup_proc(Authctxt *authctxt);
|
||||
#endif /* KRB5 */
|
||||
@ -215,7 +217,6 @@ int sshd_hostkey_sign(struct ssh *, struct sshkey *, struct sshkey *,
|
||||
u_char **, size_t *, const u_char *, size_t, const char *);
|
||||
|
||||
/* Key / cert options linkage to auth layer */
|
||||
const struct sshauthopt *auth_options(struct ssh *);
|
||||
int auth_activate_options(struct ssh *, struct sshauthopt *);
|
||||
void auth_restrict_session(struct ssh *);
|
||||
void auth_log_authopts(const char *, const struct sshauthopt *, int);
|
||||
|
41
auth2-gss.c
41
auth2-gss.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-gss.c,v 1.34 2023/03/31 04:22:27 djm Exp $ */
|
||||
/* $OpenBSD: auth2-gss.c,v 1.36 2024/05/17 04:42:13 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
|
||||
@ -51,6 +51,7 @@
|
||||
#define SSH_GSSAPI_MAX_MECHS 2048
|
||||
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_gssapi;
|
||||
|
||||
static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh);
|
||||
static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh);
|
||||
@ -116,7 +117,7 @@ userauth_gssapi(struct ssh *ssh, const char *method)
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &goid)))) {
|
||||
if (GSS_ERROR(mm_ssh_gssapi_server_ctx(&ctxt, &goid))) {
|
||||
if (ctxt != NULL)
|
||||
ssh_gssapi_delete_ctx(&ctxt);
|
||||
free(doid);
|
||||
@ -153,7 +154,7 @@ input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh)
|
||||
size_t len;
|
||||
int r;
|
||||
|
||||
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
||||
if (authctxt == NULL)
|
||||
fatal("No authentication or GSSAPI context");
|
||||
|
||||
gssctxt = authctxt->methoddata;
|
||||
@ -163,8 +164,8 @@ input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh)
|
||||
|
||||
recv_tok.value = p;
|
||||
recv_tok.length = len;
|
||||
maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
|
||||
&send_tok, &flags));
|
||||
maj_status = mm_ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
|
||||
&send_tok, &flags);
|
||||
|
||||
free(p);
|
||||
|
||||
@ -217,7 +218,7 @@ input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh)
|
||||
u_char *p;
|
||||
size_t len;
|
||||
|
||||
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
||||
if (authctxt == NULL)
|
||||
fatal("No authentication or GSSAPI context");
|
||||
|
||||
gssctxt = authctxt->methoddata;
|
||||
@ -228,8 +229,8 @@ input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh)
|
||||
recv_tok.length = len;
|
||||
|
||||
/* Push the error token into GSSAPI to see what it says */
|
||||
maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
|
||||
&send_tok, NULL));
|
||||
maj_status = mm_ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
|
||||
&send_tok, NULL);
|
||||
|
||||
free(recv_tok.value);
|
||||
|
||||
@ -254,9 +255,8 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh)
|
||||
{
|
||||
Authctxt *authctxt = ssh->authctxt;
|
||||
int r, authenticated;
|
||||
const char *displayname;
|
||||
|
||||
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
||||
if (authctxt == NULL)
|
||||
fatal("No authentication or GSSAPI context");
|
||||
|
||||
/*
|
||||
@ -267,11 +267,7 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh)
|
||||
if ((r = sshpkt_get_end(ssh)) != 0)
|
||||
fatal_fr(r, "parse packet");
|
||||
|
||||
authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
|
||||
|
||||
if ((!use_privsep || mm_is_monitor()) &&
|
||||
(displayname = ssh_gssapi_displayname()) != NULL)
|
||||
auth2_record_info(authctxt, "%s", displayname);
|
||||
authenticated = mm_ssh_gssapi_userok(authctxt->user);
|
||||
|
||||
authctxt->postponed = 0;
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||
@ -290,11 +286,10 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
|
||||
int r, authenticated = 0;
|
||||
struct sshbuf *b;
|
||||
gss_buffer_desc mic, gssbuf;
|
||||
const char *displayname;
|
||||
u_char *p;
|
||||
size_t len;
|
||||
|
||||
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
||||
if (authctxt == NULL)
|
||||
fatal("No authentication or GSSAPI context");
|
||||
|
||||
gssctxt = authctxt->methoddata;
|
||||
@ -312,18 +307,14 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
|
||||
fatal_f("sshbuf_mutable_ptr failed");
|
||||
gssbuf.length = sshbuf_len(b);
|
||||
|
||||
if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic))))
|
||||
authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
|
||||
if (!GSS_ERROR(mm_ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic)))
|
||||
authenticated = mm_ssh_gssapi_userok(authctxt->user);
|
||||
else
|
||||
logit("GSSAPI MIC check failed");
|
||||
|
||||
sshbuf_free(b);
|
||||
free(mic.value);
|
||||
|
||||
if ((!use_privsep || mm_is_monitor()) &&
|
||||
(displayname = ssh_gssapi_displayname()) != NULL)
|
||||
auth2_record_info(authctxt, "%s", displayname);
|
||||
|
||||
authctxt->postponed = 0;
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
||||
@ -334,10 +325,8 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
|
||||
}
|
||||
|
||||
Authmethod method_gssapi = {
|
||||
"gssapi-with-mic",
|
||||
NULL,
|
||||
&methodcfg_gssapi,
|
||||
userauth_gssapi,
|
||||
&options.gss_authentication
|
||||
};
|
||||
|
||||
#endif /* GSSAPI */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-hostbased.c,v 1.52 2023/03/05 05:34:09 dtucker Exp $ */
|
||||
/* $OpenBSD: auth2-hostbased.c,v 1.53 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -54,6 +54,7 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_hostbased;
|
||||
|
||||
static int
|
||||
userauth_hostbased(struct ssh *ssh, const char *method)
|
||||
@ -145,10 +146,10 @@ userauth_hostbased(struct ssh *ssh, const char *method)
|
||||
|
||||
/* test for allowed key and correct signature */
|
||||
authenticated = 0;
|
||||
if (PRIVSEP(hostbased_key_allowed(ssh, authctxt->pw, cuser,
|
||||
chost, key)) &&
|
||||
PRIVSEP(sshkey_verify(key, sig, slen,
|
||||
sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat, NULL)) == 0)
|
||||
if (mm_hostbased_key_allowed(ssh, authctxt->pw, cuser,
|
||||
chost, key) &&
|
||||
mm_sshkey_verify(key, sig, slen,
|
||||
sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat, NULL) == 0)
|
||||
authenticated = 1;
|
||||
|
||||
auth2_record_key(authctxt, authenticated, key);
|
||||
@ -252,8 +253,6 @@ hostbased_key_allowed(struct ssh *ssh, struct passwd *pw,
|
||||
}
|
||||
|
||||
Authmethod method_hostbased = {
|
||||
"hostbased",
|
||||
NULL,
|
||||
&methodcfg_hostbased,
|
||||
userauth_hostbased,
|
||||
&options.hostbased_authentication
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-kbdint.c,v 1.14 2021/12/19 22:12:07 djm Exp $ */
|
||||
/* $OpenBSD: auth2-kbdint.c,v 1.15 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -42,6 +42,7 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_kbdint;
|
||||
|
||||
static int
|
||||
userauth_kbdint(struct ssh *ssh, const char *method)
|
||||
@ -65,8 +66,6 @@ userauth_kbdint(struct ssh *ssh, const char *method)
|
||||
}
|
||||
|
||||
Authmethod method_kbdint = {
|
||||
"keyboard-interactive",
|
||||
NULL,
|
||||
&methodcfg_kbdint,
|
||||
userauth_kbdint,
|
||||
&options.kbd_interactive_authentication
|
||||
};
|
||||
|
134
auth2-methods.c
Normal file
134
auth2-methods.c
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (c) 2012,2023 Damien Miller <djm@mindrot.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "misc.h"
|
||||
#include "servconf.h"
|
||||
#include "xmalloc.h"
|
||||
#include "hostfile.h"
|
||||
#include "auth.h"
|
||||
|
||||
extern ServerOptions options;
|
||||
|
||||
/*
|
||||
* Configuration of enabled authentication methods. Separate from the rest of
|
||||
* auth2-*.c because we want to query it during server configuration validity
|
||||
* checking in the sshd listener process without pulling all the auth code in
|
||||
* too.
|
||||
*/
|
||||
|
||||
/* "none" is allowed only one time and it is cleared by userauth_none() later */
|
||||
int none_enabled = 1;
|
||||
struct authmethod_cfg methodcfg_none = {
|
||||
"none",
|
||||
NULL,
|
||||
&none_enabled
|
||||
};
|
||||
struct authmethod_cfg methodcfg_pubkey = {
|
||||
"publickey",
|
||||
"publickey-hostbound-v00@openssh.com",
|
||||
&options.pubkey_authentication
|
||||
};
|
||||
#ifdef GSSAPI
|
||||
struct authmethod_cfg methodcfg_gssapi = {
|
||||
"gssapi-with-mic",
|
||||
NULL,
|
||||
&options.gss_authentication
|
||||
};
|
||||
#endif
|
||||
struct authmethod_cfg methodcfg_passwd = {
|
||||
"password",
|
||||
NULL,
|
||||
&options.password_authentication
|
||||
};
|
||||
struct authmethod_cfg methodcfg_kbdint = {
|
||||
"keyboard-interactive",
|
||||
NULL,
|
||||
&options.kbd_interactive_authentication
|
||||
};
|
||||
struct authmethod_cfg methodcfg_hostbased = {
|
||||
"hostbased",
|
||||
NULL,
|
||||
&options.hostbased_authentication
|
||||
};
|
||||
|
||||
static struct authmethod_cfg *authmethod_cfgs[] = {
|
||||
&methodcfg_none,
|
||||
&methodcfg_pubkey,
|
||||
#ifdef GSSAPI
|
||||
&methodcfg_gssapi,
|
||||
#endif
|
||||
&methodcfg_passwd,
|
||||
&methodcfg_kbdint,
|
||||
&methodcfg_hostbased,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Check a comma-separated list of methods for validity. If need_enable is
|
||||
* non-zero, then also require that the methods are enabled.
|
||||
* Returns 0 on success or -1 if the methods list is invalid.
|
||||
*/
|
||||
int
|
||||
auth2_methods_valid(const char *_methods, int need_enable)
|
||||
{
|
||||
char *methods, *omethods, *method, *p;
|
||||
u_int i, found;
|
||||
int ret = -1;
|
||||
const struct authmethod_cfg *cfg;
|
||||
|
||||
if (*_methods == '\0') {
|
||||
error("empty authentication method list");
|
||||
return -1;
|
||||
}
|
||||
omethods = methods = xstrdup(_methods);
|
||||
while ((method = strsep(&methods, ",")) != NULL) {
|
||||
for (found = i = 0; !found && authmethod_cfgs[i] != NULL; i++) {
|
||||
cfg = authmethod_cfgs[i];
|
||||
if ((p = strchr(method, ':')) != NULL)
|
||||
*p = '\0';
|
||||
if (strcmp(method, cfg->name) != 0)
|
||||
continue;
|
||||
if (need_enable) {
|
||||
if (cfg->enabled == NULL ||
|
||||
*(cfg->enabled) == 0) {
|
||||
error("Disabled method \"%s\" in "
|
||||
"AuthenticationMethods list \"%s\"",
|
||||
method, _methods);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
if (!found) {
|
||||
error("Unknown authentication method \"%s\" in list",
|
||||
method);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
out:
|
||||
free(omethods);
|
||||
return ret;
|
||||
}
|
12
auth2-none.c
12
auth2-none.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-none.c,v 1.25 2023/03/05 05:34:09 dtucker Exp $ */
|
||||
/* $OpenBSD: auth2-none.c,v 1.26 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -53,9 +53,9 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_none;
|
||||
|
||||
/* "none" is allowed only one time */
|
||||
static int none_enabled = 1;
|
||||
extern int none_enabled;
|
||||
|
||||
static int
|
||||
userauth_none(struct ssh *ssh, const char *method)
|
||||
@ -66,13 +66,11 @@ userauth_none(struct ssh *ssh, const char *method)
|
||||
if ((r = sshpkt_get_end(ssh)) != 0)
|
||||
fatal_fr(r, "parse packet");
|
||||
if (options.permit_empty_passwd && options.password_authentication)
|
||||
return (PRIVSEP(auth_password(ssh, "")));
|
||||
return mm_auth_password(ssh, "");
|
||||
return (0);
|
||||
}
|
||||
|
||||
Authmethod method_none = {
|
||||
"none",
|
||||
NULL,
|
||||
&methodcfg_none,
|
||||
userauth_none,
|
||||
&none_enabled
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-passwd.c,v 1.21 2022/05/27 04:29:40 dtucker Exp $ */
|
||||
/* $OpenBSD: auth2-passwd.c,v 1.22 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -47,6 +47,7 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_passwd;
|
||||
|
||||
static int
|
||||
userauth_passwd(struct ssh *ssh, const char *method)
|
||||
@ -66,15 +67,13 @@ userauth_passwd(struct ssh *ssh, const char *method)
|
||||
|
||||
if (change)
|
||||
logit("password change not supported");
|
||||
else if (PRIVSEP(auth_password(ssh, password)) == 1) // CodeQL [SM01714] false positive: password is null terminated
|
||||
else if (mm_auth_password(ssh, password) == 1)
|
||||
authenticated = 1;
|
||||
freezero(password, len);
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
Authmethod method_passwd = {
|
||||
"password",
|
||||
NULL,
|
||||
&methodcfg_passwd,
|
||||
userauth_passwd,
|
||||
&options.password_authentication
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-pubkey.c,v 1.119 2023/07/27 22:25:17 djm Exp $ */
|
||||
/* $OpenBSD: auth2-pubkey.c,v 1.120 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||
@ -72,6 +72,7 @@
|
||||
|
||||
/* import */
|
||||
extern ServerOptions options;
|
||||
extern struct authmethod_cfg methodcfg_pubkey;
|
||||
|
||||
static char *
|
||||
format_key(const struct sshkey *key)
|
||||
@ -219,11 +220,11 @@ userauth_pubkey(struct ssh *ssh, const char *method)
|
||||
#endif
|
||||
/* test for correct signature */
|
||||
authenticated = 0;
|
||||
if (PRIVSEP(user_key_allowed(ssh, pw, key, 1, &authopts)) &&
|
||||
PRIVSEP(sshkey_verify(key, sig, slen,
|
||||
if (mm_user_key_allowed(ssh, pw, key, 1, &authopts) &&
|
||||
mm_sshkey_verify(key, sig, slen,
|
||||
sshbuf_ptr(b), sshbuf_len(b),
|
||||
(ssh->compat & SSH_BUG_SIGTYPE) == 0 ? pkalg : NULL,
|
||||
ssh->compat, &sig_details)) == 0) {
|
||||
ssh->compat, &sig_details) == 0) {
|
||||
authenticated = 1;
|
||||
}
|
||||
if (authenticated == 1 && sig_details != NULL) {
|
||||
@ -281,7 +282,7 @@ userauth_pubkey(struct ssh *ssh, const char *method)
|
||||
* if a user is not allowed to login. is this an
|
||||
* issue? -markus
|
||||
*/
|
||||
if (PRIVSEP(user_key_allowed(ssh, pw, key, 0, NULL))) {
|
||||
if (mm_user_key_allowed(ssh, pw, key, 0, NULL)) {
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_PK_OK))
|
||||
!= 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, pkalg)) != 0 ||
|
||||
@ -813,8 +814,6 @@ user_key_allowed(struct ssh *ssh, struct passwd *pw, struct sshkey *key,
|
||||
}
|
||||
|
||||
Authmethod method_pubkey = {
|
||||
"publickey",
|
||||
"publickey-hostbound-v00@openssh.com",
|
||||
&methodcfg_pubkey,
|
||||
userauth_pubkey,
|
||||
&options.pubkey_authentication
|
||||
};
|
||||
|
97
auth2.c
97
auth2.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2.c,v 1.167 2023/08/28 09:48:11 djm Exp $ */
|
||||
/* $OpenBSD: auth2.c,v 1.169 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -57,6 +57,7 @@
|
||||
#endif
|
||||
#include "monitor_wrap.h"
|
||||
#include "digest.h"
|
||||
#include "kex.h"
|
||||
#ifdef WINDOWS
|
||||
#include "sshTelemetry.h"
|
||||
#endif
|
||||
@ -158,7 +159,7 @@ userauth_banner(struct ssh *ssh)
|
||||
if (options.banner == NULL)
|
||||
return;
|
||||
|
||||
if ((banner = PRIVSEP(auth2_read_banner())) == NULL)
|
||||
if ((banner = mm_auth2_read_banner()) == NULL)
|
||||
goto done;
|
||||
userauth_send_banner(ssh, banner);
|
||||
|
||||
@ -175,6 +176,8 @@ do_authentication2(struct ssh *ssh)
|
||||
Authctxt *authctxt = ssh->authctxt;
|
||||
|
||||
ssh_dispatch_init(ssh, &dispatch_protocol_error);
|
||||
if (ssh->kex->ext_info_c)
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_input_ext_info);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request);
|
||||
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success);
|
||||
ssh->authctxt = NULL;
|
||||
@ -214,6 +217,7 @@ input_service_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||
debug("bad service request %s", service);
|
||||
ssh_packet_disconnect(ssh, "bad service request %s", service);
|
||||
}
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &dispatch_protocol_error);
|
||||
r = 0;
|
||||
out:
|
||||
free(service);
|
||||
@ -290,7 +294,7 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||
auth_maxtries_exceeded(ssh);
|
||||
if (authctxt->attempt++ == 0) {
|
||||
/* setup auth context */
|
||||
authctxt->pw = PRIVSEP(getpwnamallow(ssh, user));
|
||||
authctxt->pw = mm_getpwnamallow(ssh, user);
|
||||
authctxt->user = xstrdup(user);
|
||||
if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
|
||||
authctxt->valid = 1;
|
||||
@ -300,22 +304,22 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||
/* Invalid user, fake password information */
|
||||
authctxt->pw = fakepw();
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
PRIVSEP(audit_event(ssh, SSH_INVALID_USER));
|
||||
mm_audit_event(ssh, SSH_INVALID_USER);
|
||||
#endif
|
||||
}
|
||||
#ifdef USE_PAM
|
||||
if (options.use_pam)
|
||||
PRIVSEP(start_pam(ssh));
|
||||
mm_start_pam(ssh);
|
||||
#endif
|
||||
ssh_packet_set_log_preamble(ssh, "%suser %s",
|
||||
authctxt->valid ? "authenticating " : "invalid ", user);
|
||||
setproctitle("%s%s", authctxt->valid ? user : "unknown",
|
||||
use_privsep ? " [net]" : "");
|
||||
setproctitle("%s [net]", authctxt->valid ? user : "unknown");
|
||||
authctxt->service = xstrdup(service);
|
||||
authctxt->style = style ? xstrdup(style) : NULL;
|
||||
if (use_privsep)
|
||||
mm_inform_authserv(service, style);
|
||||
mm_inform_authserv(service, style);
|
||||
userauth_banner(ssh);
|
||||
if ((r = kex_server_update_ext_info(ssh)) != 0)
|
||||
fatal_fr(r, "kex_server_update_ext_info failed");
|
||||
if (auth2_setup_methods_lists(authctxt) != 0)
|
||||
ssh_packet_disconnect(ssh,
|
||||
"no authentication methods enabled");
|
||||
@ -376,7 +380,7 @@ userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method,
|
||||
/* prefer primary authmethod name to possible synonym */
|
||||
if ((m = authmethod_byname(method)) == NULL)
|
||||
fatal("INTERNAL ERROR: bad method %s", method);
|
||||
method = m->name;
|
||||
method = m->cfg->name;
|
||||
}
|
||||
|
||||
/* Special handling for root */
|
||||
@ -384,7 +388,7 @@ userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method,
|
||||
!auth_root_allowed(ssh, method)) {
|
||||
authenticated = 0;
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
PRIVSEP(audit_event(ssh, SSH_LOGIN_ROOT_DENIED));
|
||||
mm_audit_event(ssh, SSH_LOGIN_ROOT_DENIED);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -407,7 +411,7 @@ userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method,
|
||||
|
||||
#ifdef USE_PAM
|
||||
if (options.use_pam && authenticated) {
|
||||
int r, success = PRIVSEP(do_pam_account());
|
||||
int r, success = mm_do_pam_account();
|
||||
|
||||
/* If PAM returned a message, send it to the user. */
|
||||
if (sshbuf_len(loginmsg) > 0) {
|
||||
@ -445,7 +449,7 @@ userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method,
|
||||
authctxt->failures++;
|
||||
if (authctxt->failures >= options.max_authtries) {
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
PRIVSEP(audit_event(ssh, SSH_LOGIN_EXCEED_MAXTRIES));
|
||||
mm_audit_event(ssh, SSH_LOGIN_EXCEED_MAXTRIES);
|
||||
#endif
|
||||
auth_maxtries_exceeded(ssh);
|
||||
}
|
||||
@ -500,16 +504,16 @@ authmethods_get(Authctxt *authctxt)
|
||||
if ((b = sshbuf_new()) == NULL)
|
||||
fatal_f("sshbuf_new failed");
|
||||
for (i = 0; authmethods[i] != NULL; i++) {
|
||||
if (strcmp(authmethods[i]->name, "none") == 0)
|
||||
if (strcmp(authmethods[i]->cfg->name, "none") == 0)
|
||||
continue;
|
||||
if (authmethods[i]->enabled == NULL ||
|
||||
*(authmethods[i]->enabled) == 0)
|
||||
if (authmethods[i]->cfg->enabled == NULL ||
|
||||
*(authmethods[i]->cfg->enabled) == 0)
|
||||
continue;
|
||||
if (!auth2_method_allowed(authctxt, authmethods[i]->name,
|
||||
if (!auth2_method_allowed(authctxt, authmethods[i]->cfg->name,
|
||||
NULL))
|
||||
continue;
|
||||
if ((r = sshbuf_putf(b, "%s%s", sshbuf_len(b) ? "," : "",
|
||||
authmethods[i]->name)) != 0)
|
||||
authmethods[i]->cfg->name)) != 0)
|
||||
fatal_fr(r, "buffer error");
|
||||
}
|
||||
if ((list = sshbuf_dup_string(b)) == NULL)
|
||||
@ -526,9 +530,9 @@ authmethod_byname(const char *name)
|
||||
if (name == NULL)
|
||||
fatal_f("NULL authentication method name");
|
||||
for (i = 0; authmethods[i] != NULL; i++) {
|
||||
if (strcmp(name, authmethods[i]->name) == 0 ||
|
||||
(authmethods[i]->synonym != NULL &&
|
||||
strcmp(name, authmethods[i]->synonym) == 0))
|
||||
if (strcmp(name, authmethods[i]->cfg->name) == 0 ||
|
||||
(authmethods[i]->cfg->synonym != NULL &&
|
||||
strcmp(name, authmethods[i]->cfg->synonym) == 0))
|
||||
return authmethods[i];
|
||||
}
|
||||
debug_f("unrecognized authentication method name: %s", name);
|
||||
@ -543,11 +547,11 @@ authmethod_lookup(Authctxt *authctxt, const char *name)
|
||||
if ((method = authmethod_byname(name)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if (method->enabled == NULL || *(method->enabled) == 0) {
|
||||
if (method->cfg->enabled == NULL || *(method->cfg->enabled) == 0) {
|
||||
debug3_f("method %s not enabled", name);
|
||||
return NULL;
|
||||
}
|
||||
if (!auth2_method_allowed(authctxt, method->name, NULL)) {
|
||||
if (!auth2_method_allowed(authctxt, method->cfg->name, NULL)) {
|
||||
debug3_f("method %s not allowed "
|
||||
"by AuthenticationMethods", name);
|
||||
return NULL;
|
||||
@ -555,53 +559,6 @@ authmethod_lookup(Authctxt *authctxt, const char *name)
|
||||
return method;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check a comma-separated list of methods for validity. Is need_enable is
|
||||
* non-zero, then also require that the methods are enabled.
|
||||
* Returns 0 on success or -1 if the methods list is invalid.
|
||||
*/
|
||||
int
|
||||
auth2_methods_valid(const char *_methods, int need_enable)
|
||||
{
|
||||
char *methods, *omethods, *method, *p;
|
||||
u_int i, found;
|
||||
int ret = -1;
|
||||
|
||||
if (*_methods == '\0') {
|
||||
error("empty authentication method list");
|
||||
return -1;
|
||||
}
|
||||
omethods = methods = xstrdup(_methods);
|
||||
while ((method = strsep(&methods, ",")) != NULL) {
|
||||
for (found = i = 0; !found && authmethods[i] != NULL; i++) {
|
||||
if ((p = strchr(method, ':')) != NULL)
|
||||
*p = '\0';
|
||||
if (strcmp(method, authmethods[i]->name) != 0)
|
||||
continue;
|
||||
if (need_enable) {
|
||||
if (authmethods[i]->enabled == NULL ||
|
||||
*(authmethods[i]->enabled) == 0) {
|
||||
error("Disabled method \"%s\" in "
|
||||
"AuthenticationMethods list \"%s\"",
|
||||
method, _methods);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
if (!found) {
|
||||
error("Unknown authentication method \"%s\" in list",
|
||||
method);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
out:
|
||||
free(omethods);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prune the AuthenticationMethods supplied in the configuration, removing
|
||||
* any methods lists that include disabled methods. Note that this might
|
||||
|
40
authfd.c
40
authfd.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: authfd.c,v 1.133 2023/03/09 21:06:24 jcs Exp $ */
|
||||
/* $OpenBSD: authfd.c,v 1.134 2023/12/18 14:46:56 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -504,9 +504,10 @@ encode_dest_constraint(struct sshbuf *m, const struct dest_constraint *dc)
|
||||
}
|
||||
|
||||
static int
|
||||
encode_constraints(struct sshbuf *m, u_int life, u_int confirm, u_int maxsign,
|
||||
const char *provider, struct dest_constraint **dest_constraints,
|
||||
size_t ndest_constraints)
|
||||
encode_constraints(struct sshbuf *m, u_int life, u_int confirm,
|
||||
u_int maxsign, const char *provider,
|
||||
struct dest_constraint **dest_constraints, size_t ndest_constraints,
|
||||
int cert_only, struct sshkey **certs, size_t ncerts)
|
||||
{
|
||||
int r;
|
||||
struct sshbuf *b = NULL;
|
||||
@ -550,6 +551,27 @@ encode_constraints(struct sshbuf *m, u_int life, u_int confirm, u_int maxsign,
|
||||
"restrict-destination-v00@openssh.com")) != 0 ||
|
||||
(r = sshbuf_put_stringb(m, b)) != 0)
|
||||
goto out;
|
||||
sshbuf_free(b);
|
||||
b = NULL;
|
||||
}
|
||||
if (ncerts != 0) {
|
||||
if ((b = sshbuf_new()) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto out;
|
||||
}
|
||||
for (i = 0; i < ncerts; i++) {
|
||||
if ((r = sshkey_puts(certs[i], b)) != 0)
|
||||
goto out;
|
||||
}
|
||||
if ((r = sshbuf_put_u8(m,
|
||||
SSH_AGENT_CONSTRAIN_EXTENSION)) != 0 ||
|
||||
(r = sshbuf_put_cstring(m,
|
||||
"associated-certs-v00@openssh.com")) != 0 ||
|
||||
(r = sshbuf_put_u8(m, cert_only != 0)) != 0 ||
|
||||
(r = sshbuf_put_stringb(m, b)) != 0)
|
||||
goto out;
|
||||
sshbuf_free(b);
|
||||
b = NULL;
|
||||
}
|
||||
r = 0;
|
||||
out:
|
||||
@ -607,7 +629,7 @@ ssh_add_identity_constrained(int sock, struct sshkey *key,
|
||||
}
|
||||
if (constrained &&
|
||||
(r = encode_constraints(msg, life, confirm, maxsign,
|
||||
provider, dest_constraints, ndest_constraints)) != 0)
|
||||
provider, dest_constraints, ndest_constraints, 0, NULL, 0)) != 0)
|
||||
goto out;
|
||||
if ((r = ssh_request_reply_decode(sock, msg)) != 0)
|
||||
goto out;
|
||||
@ -662,10 +684,11 @@ ssh_remove_identity(int sock, const struct sshkey *key)
|
||||
int
|
||||
ssh_update_card(int sock, int add, const char *reader_id, const char *pin,
|
||||
u_int life, u_int confirm,
|
||||
struct dest_constraint **dest_constraints, size_t ndest_constraints)
|
||||
struct dest_constraint **dest_constraints, size_t ndest_constraints,
|
||||
int cert_only, struct sshkey **certs, size_t ncerts)
|
||||
{
|
||||
struct sshbuf *msg;
|
||||
int r, constrained = (life || confirm || dest_constraints);
|
||||
int r, constrained = (life || confirm || dest_constraints || certs);
|
||||
u_char type;
|
||||
|
||||
if (add) {
|
||||
@ -683,7 +706,8 @@ ssh_update_card(int sock, int add, const char *reader_id, const char *pin,
|
||||
goto out;
|
||||
if (constrained &&
|
||||
(r = encode_constraints(msg, life, confirm, 0, NULL,
|
||||
dest_constraints, ndest_constraints)) != 0)
|
||||
dest_constraints, ndest_constraints,
|
||||
cert_only, certs, ncerts)) != 0)
|
||||
goto out;
|
||||
if ((r = ssh_request_reply_decode(sock, msg)) != 0)
|
||||
goto out;
|
||||
|
5
authfd.h
5
authfd.h
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: authfd.h,v 1.51 2021/12/19 22:10:24 djm Exp $ */
|
||||
/* $OpenBSD: authfd.h,v 1.52 2023/12/18 14:46:56 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@ -56,7 +56,8 @@ int ssh_remove_identity(int sock, const struct sshkey *key);
|
||||
int ssh_update_card(int sock, int add, const char *reader_id,
|
||||
const char *pin, u_int life, u_int confirm,
|
||||
struct dest_constraint **dest_constraints,
|
||||
size_t ndest_constraints);
|
||||
size_t ndest_constraints,
|
||||
int cert_only, struct sshkey **certs, size_t ncerts);
|
||||
int ssh_remove_all_identities(int sock, int version);
|
||||
|
||||
int ssh_agent_sign(int sock, const struct sshkey *key,
|
||||
|
@ -515,11 +515,19 @@ sshkey_save_public(const struct sshkey *key, const char *path,
|
||||
|
||||
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
|
||||
return SSH_ERR_SYSTEM_ERROR;
|
||||
#ifdef WINDOWS
|
||||
/* Windows POSIX adapter does not support fdopen() on open(file)
|
||||
but still want file created with same owner as upstream */
|
||||
close(fd);
|
||||
if ((f = fopen(path, "w")) == NULL)
|
||||
return SSH_ERR_SYSTEM_ERROR;
|
||||
#else /* WINDOWS */
|
||||
if ((f = fdopen(fd, "w")) == NULL) {
|
||||
r = SSH_ERR_SYSTEM_ERROR;
|
||||
close(fd);
|
||||
goto fail;
|
||||
}
|
||||
#endif /* WINDOWS */
|
||||
if ((r = sshkey_write(key, f)) != 0)
|
||||
goto fail;
|
||||
fprintf(f, " %s\n", comment);
|
||||
|
133
channels.c
133
channels.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: channels.c,v 1.433 2023/09/04 00:01:46 djm Exp $ */
|
||||
/* $OpenBSD: channels.c,v 1.438 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -93,13 +93,6 @@
|
||||
/* -- agent forwarding */
|
||||
#define NUM_SOCKS 10
|
||||
|
||||
/* -- tcp forwarding */
|
||||
/* special-case port number meaning allow any port */
|
||||
#define FWD_PERMIT_ANY_PORT 0
|
||||
|
||||
/* special-case wildcard meaning allow any host */
|
||||
#define FWD_PERMIT_ANY_HOST "*"
|
||||
|
||||
/* -- X11 forwarding */
|
||||
/* Maximum number of fake X11 displays to try. */
|
||||
#define MAX_DISPLAYS 1000
|
||||
@ -214,6 +207,9 @@ struct ssh_channels {
|
||||
/* Channel timeouts by type */
|
||||
struct ssh_channel_timeout *timeouts;
|
||||
size_t ntimeouts;
|
||||
/* Global timeout for all OPEN channels */
|
||||
int global_deadline;
|
||||
time_t lastused;
|
||||
};
|
||||
|
||||
/* helper */
|
||||
@ -316,6 +312,11 @@ channel_add_timeout(struct ssh *ssh, const char *type_pattern,
|
||||
{
|
||||
struct ssh_channels *sc = ssh->chanctxt;
|
||||
|
||||
if (strcmp(type_pattern, "global") == 0) {
|
||||
debug2_f("global channel timeout %d seconds", timeout_secs);
|
||||
sc->global_deadline = timeout_secs;
|
||||
return;
|
||||
}
|
||||
debug2_f("channel type \"%s\" timeout %d seconds",
|
||||
type_pattern, timeout_secs);
|
||||
sc->timeouts = xrecallocarray(sc->timeouts, sc->ntimeouts,
|
||||
@ -376,6 +377,38 @@ channel_set_xtype(struct ssh *ssh, int id, const char *xctype)
|
||||
c->inactive_deadline);
|
||||
}
|
||||
|
||||
/*
|
||||
* update "last used" time on a channel.
|
||||
* NB. nothing else should update lastused except to clear it.
|
||||
*/
|
||||
static void
|
||||
channel_set_used_time(struct ssh *ssh, Channel *c)
|
||||
{
|
||||
ssh->chanctxt->lastused = monotime();
|
||||
if (c != NULL)
|
||||
c->lastused = ssh->chanctxt->lastused;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the time at which a channel is due to time out for inactivity.
|
||||
* Returns 0 if the channel is not due to time out ever.
|
||||
*/
|
||||
static time_t
|
||||
channel_get_expiry(struct ssh *ssh, Channel *c)
|
||||
{
|
||||
struct ssh_channels *sc = ssh->chanctxt;
|
||||
time_t expiry = 0, channel_expiry;
|
||||
|
||||
if (sc->lastused != 0 && sc->global_deadline != 0)
|
||||
expiry = sc->lastused + sc->global_deadline;
|
||||
if (c->lastused != 0 && c->inactive_deadline != 0) {
|
||||
channel_expiry = c->lastused + c->inactive_deadline;
|
||||
if (expiry == 0 || channel_expiry < expiry)
|
||||
expiry = channel_expiry;
|
||||
}
|
||||
return expiry;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register filedescriptors for a channel, used when allocating a channel or
|
||||
* when the channel consumer/producer is ready, e.g. shell exec'd
|
||||
@ -441,6 +474,8 @@ channel_register_fds(struct ssh *ssh, Channel *c, int rfd, int wfd, int efd,
|
||||
if (efd != -1)
|
||||
set_nonblock(efd);
|
||||
}
|
||||
/* channel might be entering a larval state, so reset global timeout */
|
||||
channel_set_used_time(ssh, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -898,6 +933,23 @@ channel_still_open(struct ssh *ssh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns true if a channel with a TTY is open. */
|
||||
int
|
||||
channel_tty_open(struct ssh *ssh)
|
||||
{
|
||||
u_int i;
|
||||
Channel *c;
|
||||
|
||||
for (i = 0; i < ssh->chanctxt->channels_alloc; i++) {
|
||||
c = ssh->chanctxt->channels[i];
|
||||
if (c == NULL || c->type != SSH_CHANNEL_OPEN)
|
||||
continue;
|
||||
if (c->client_tty)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns the id of an open channel suitable for keepaliving */
|
||||
int
|
||||
channel_find_open(struct ssh *ssh)
|
||||
@ -1180,7 +1232,7 @@ channel_set_fds(struct ssh *ssh, int id, int rfd, int wfd, int efd,
|
||||
|
||||
channel_register_fds(ssh, c, rfd, wfd, efd, extusage, nonblock, is_tty);
|
||||
c->type = SSH_CHANNEL_OPEN;
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
c->local_window = c->local_window_max = window_max;
|
||||
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_CHANNEL_WINDOW_ADJUST)) != 0 ||
|
||||
@ -1352,7 +1404,7 @@ channel_pre_x11_open(struct ssh *ssh, Channel *c)
|
||||
|
||||
if (ret == 1) {
|
||||
c->type = SSH_CHANNEL_OPEN;
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
channel_pre_open(ssh, c);
|
||||
} else if (ret == -1) {
|
||||
logit("X11 connection rejected because of wrong "
|
||||
@ -2008,7 +2060,7 @@ channel_post_connecting(struct ssh *ssh, Channel *c)
|
||||
c->self, c->connect_ctx.host, c->connect_ctx.port);
|
||||
channel_connect_ctx_free(&c->connect_ctx);
|
||||
c->type = SSH_CHANNEL_OPEN;
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
if (isopen) {
|
||||
/* no message necessary */
|
||||
} else {
|
||||
@ -2100,7 +2152,7 @@ channel_handle_rfd(struct ssh *ssh, Channel *c)
|
||||
goto rfail;
|
||||
}
|
||||
if (nr != 0)
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -2126,7 +2178,7 @@ channel_handle_rfd(struct ssh *ssh, Channel *c)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
if (c->input_filter != NULL) {
|
||||
if (c->input_filter(ssh, c, buf, len) == -1) {
|
||||
debug2("channel %d: filter stops", c->self);
|
||||
@ -2207,7 +2259,7 @@ channel_handle_wfd(struct ssh *ssh, Channel *c)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
#ifndef BROKEN_TCGETATTR_ICANON
|
||||
if (c->isatty && dlen >= 1 && buf[0] != '\r') {
|
||||
if (tcgetattr(c->wfd, &tio) == 0 &&
|
||||
@ -2256,7 +2308,7 @@ channel_handle_efd_write(struct ssh *ssh, Channel *c)
|
||||
if ((r = sshbuf_consume(c->extended, len)) != 0)
|
||||
fatal_fr(r, "channel %i: consume", c->self);
|
||||
c->local_consumed += len;
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -2283,7 +2335,7 @@ channel_handle_efd_read(struct ssh *ssh, Channel *c)
|
||||
channel_close_fd(ssh, c, &c->efd);
|
||||
return 1;
|
||||
}
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
if (c->extended_usage == CHAN_EXTENDED_IGNORE)
|
||||
debug3("channel %d: discard efd", c->self);
|
||||
else if ((r = sshbuf_put(c->extended, buf, len)) != 0)
|
||||
@ -2573,10 +2625,9 @@ channel_handler(struct ssh *ssh, int table, struct timespec *timeout)
|
||||
continue;
|
||||
}
|
||||
if (ftab[c->type] != NULL) {
|
||||
if (table == CHAN_PRE &&
|
||||
c->type == SSH_CHANNEL_OPEN &&
|
||||
c->inactive_deadline != 0 && c->lastused != 0 &&
|
||||
now >= c->lastused + c->inactive_deadline) {
|
||||
if (table == CHAN_PRE && c->type == SSH_CHANNEL_OPEN &&
|
||||
channel_get_expiry(ssh, c) != 0 &&
|
||||
now >= channel_get_expiry(ssh, c)) {
|
||||
/* channel closed for inactivity */
|
||||
verbose("channel %d: closing after %u seconds "
|
||||
"of inactivity", c->self,
|
||||
@ -2588,10 +2639,9 @@ channel_handler(struct ssh *ssh, int table, struct timespec *timeout)
|
||||
/* inactivity timeouts must interrupt poll() */
|
||||
if (timeout != NULL &&
|
||||
c->type == SSH_CHANNEL_OPEN &&
|
||||
c->lastused != 0 &&
|
||||
c->inactive_deadline != 0) {
|
||||
channel_get_expiry(ssh, c) != 0) {
|
||||
ptimeout_deadline_monotime(timeout,
|
||||
c->lastused + c->inactive_deadline);
|
||||
channel_get_expiry(ssh, c));
|
||||
}
|
||||
} else if (timeout != NULL) {
|
||||
/*
|
||||
@ -3197,9 +3247,8 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
|
||||
goto out;
|
||||
}
|
||||
/* Record that connection to this host/port is permitted. */
|
||||
permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>", -1,
|
||||
listen_host, NULL, (int)listen_port, downstream);
|
||||
listen_host = NULL;
|
||||
permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>",
|
||||
-1, listen_host, NULL, (int)listen_port, downstream);
|
||||
break;
|
||||
case SSH2_MSG_CHANNEL_CLOSE:
|
||||
if (have < 4)
|
||||
@ -3399,11 +3448,20 @@ channel_input_data(int type, u_int32_t seq, struct ssh *ssh)
|
||||
return 0;
|
||||
}
|
||||
if (win_len > c->local_window) {
|
||||
logit("channel %d: rcvd too much data %zu, win %u",
|
||||
c->self, win_len, c->local_window);
|
||||
return 0;
|
||||
c->local_window_exceeded += win_len - c->local_window;
|
||||
logit("channel %d: rcvd too much data %zu, win %u/%u "
|
||||
"(excess %u)", c->self, win_len, c->local_window,
|
||||
c->local_window_max, c->local_window_exceeded);
|
||||
c->local_window = 0;
|
||||
/* Allow 10% grace before bringing the hammer down */
|
||||
if (c->local_window_exceeded > (c->local_window_max / 10)) {
|
||||
ssh_packet_disconnect(ssh, "channel %d: peer ignored "
|
||||
"channel window", c->self);
|
||||
}
|
||||
} else {
|
||||
c->local_window -= win_len;
|
||||
c->local_window_exceeded = 0;
|
||||
}
|
||||
c->local_window -= win_len;
|
||||
|
||||
if (c->datagram) {
|
||||
if ((r = sshbuf_put_string(c->output, data, data_len)) != 0)
|
||||
@ -3541,7 +3599,7 @@ channel_input_open_confirmation(int type, u_int32_t seq, struct ssh *ssh)
|
||||
c->open_confirm(ssh, c->self, 1, c->open_confirm_ctx);
|
||||
debug2_f("channel %d: callback done", c->self);
|
||||
}
|
||||
c->lastused = monotime();
|
||||
channel_set_used_time(ssh, c);
|
||||
debug2("channel %d: open confirm rwindow %u rmax %u", c->self,
|
||||
c->remote_window, c->remote_maxpacket);
|
||||
return 0;
|
||||
@ -4523,19 +4581,6 @@ channel_update_permission(struct ssh *ssh, int idx, int newport)
|
||||
}
|
||||
}
|
||||
|
||||
/* returns port number, FWD_PERMIT_ANY_PORT or -1 on error */
|
||||
int
|
||||
permitopen_port(const char *p)
|
||||
{
|
||||
int port;
|
||||
|
||||
if (strcmp(p, "*") == 0)
|
||||
return FWD_PERMIT_ANY_PORT;
|
||||
if ((port = a2port(p)) > 0)
|
||||
return port;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Try to start non-blocking connect to next host in cctx list */
|
||||
static int
|
||||
connect_next(struct channel_connect *cctx)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: channels.h,v 1.152 2023/09/04 00:01:46 djm Exp $ */
|
||||
/* $OpenBSD: channels.h,v 1.156 2024/05/23 23:47:16 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@ -85,7 +85,6 @@
|
||||
struct ssh;
|
||||
struct Channel;
|
||||
typedef struct Channel Channel;
|
||||
struct fwd_perm_list;
|
||||
|
||||
typedef void channel_open_fn(struct ssh *, int, int, void *);
|
||||
typedef void channel_callback_fn(struct ssh *, int, int, void *);
|
||||
@ -170,6 +169,7 @@ struct Channel {
|
||||
u_int remote_window;
|
||||
u_int remote_maxpacket;
|
||||
u_int local_window;
|
||||
u_int local_window_exceeded;
|
||||
u_int local_window_max;
|
||||
u_int local_consumed;
|
||||
u_int local_maxpacket;
|
||||
@ -324,7 +324,6 @@ int channel_input_ieof(int, u_int32_t, struct ssh *);
|
||||
int channel_input_oclose(int, u_int32_t, struct ssh *);
|
||||
int channel_input_open_confirmation(int, u_int32_t, struct ssh *);
|
||||
int channel_input_open_failure(int, u_int32_t, struct ssh *);
|
||||
int channel_input_port_open(int, u_int32_t, struct ssh *);
|
||||
int channel_input_window_adjust(int, u_int32_t, struct ssh *);
|
||||
int channel_input_status_confirm(int, u_int32_t, struct ssh *);
|
||||
|
||||
@ -340,6 +339,7 @@ int channel_output_poll(struct ssh *);
|
||||
int channel_not_very_much_buffered_data(struct ssh *);
|
||||
void channel_close_all(struct ssh *);
|
||||
int channel_still_open(struct ssh *);
|
||||
int channel_tty_open(struct ssh *);
|
||||
const char *channel_format_extended_usage(const Channel *);
|
||||
char *channel_open_message(struct ssh *);
|
||||
int channel_find_open(struct ssh *);
|
||||
|
25
cipher.c
25
cipher.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cipher.c,v 1.119 2021/04/03 06:18:40 djm Exp $ */
|
||||
/* $OpenBSD: cipher.c,v 1.121 2024/05/17 02:39:11 jsg Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -372,7 +372,7 @@ cipher_crypt(struct sshcipher_ctx *cc, u_int seqnr, u_char *dest,
|
||||
if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
|
||||
1, lastiv))
|
||||
return SSH_ERR_LIBCRYPTO_ERROR;
|
||||
/* set tag on decyption */
|
||||
/* set tag on decryption */
|
||||
if (!cc->encrypt &&
|
||||
!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_TAG,
|
||||
authlen, (u_char *)src + aadlen + len))
|
||||
@ -434,27 +434,6 @@ cipher_free(struct sshcipher_ctx *cc)
|
||||
freezero(cc, sizeof(*cc));
|
||||
}
|
||||
|
||||
/*
|
||||
* Exports an IV from the sshcipher_ctx required to export the key
|
||||
* state back from the unprivileged child to the privileged parent
|
||||
* process.
|
||||
*/
|
||||
int
|
||||
cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
|
||||
{
|
||||
const struct sshcipher *c = cc->cipher;
|
||||
|
||||
if ((c->flags & CFLAG_CHACHAPOLY) != 0)
|
||||
return 0;
|
||||
else if ((c->flags & CFLAG_AESCTR) != 0)
|
||||
return sizeof(cc->ac_ctx.ctr);
|
||||
#ifdef WITH_OPENSSL
|
||||
return EVP_CIPHER_CTX_iv_length(cc->evp);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len)
|
||||
{
|
||||
|
3
cipher.h
3
cipher.h
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cipher.h,v 1.55 2020/01/23 10:24:29 dtucker Exp $ */
|
||||
/* $OpenBSD: cipher.h,v 1.56 2023/10/10 06:49:54 tb Exp $ */
|
||||
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@ -73,6 +73,5 @@ u_int cipher_ctx_is_plaintext(struct sshcipher_ctx *);
|
||||
|
||||
int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, size_t);
|
||||
int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *, size_t);
|
||||
int cipher_get_keyiv_len(const struct sshcipher_ctx *);
|
||||
|
||||
#endif /* CIPHER_H */
|
||||
|
110
clientloop.c
110
clientloop.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: clientloop.c,v 1.398 2023/09/10 03:51:55 djm Exp $ */
|
||||
/* $OpenBSD: clientloop.c,v 1.408 2024/07/01 04:31:17 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -156,7 +156,6 @@ static time_t control_persist_exit_time = 0;
|
||||
volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */
|
||||
static int last_was_cr; /* Last character was a newline. */
|
||||
static int exit_status; /* Used to store the command exit status. */
|
||||
static struct sshbuf *stderr_buffer; /* Used for final exit message. */
|
||||
static int connection_in; /* Connection to server (input). */
|
||||
static int connection_out; /* Connection to server (output). */
|
||||
static int need_rekeying; /* Set to non-zero if rekeying is requested. */
|
||||
@ -194,23 +193,24 @@ TAILQ_HEAD(global_confirms, global_confirm);
|
||||
static struct global_confirms global_confirms =
|
||||
TAILQ_HEAD_INITIALIZER(global_confirms);
|
||||
|
||||
void ssh_process_session2_setup(int, int, int, struct sshbuf *);
|
||||
static void quit_message(const char *fmt, ...)
|
||||
__attribute__((__format__ (printf, 1, 2)));
|
||||
|
||||
static void
|
||||
quit_message(const char *fmt, ...)
|
||||
{
|
||||
char *msg;
|
||||
char *msg, *fmt2;
|
||||
va_list args;
|
||||
int r;
|
||||
xasprintf(&fmt2, "%s\r\n", fmt);
|
||||
|
||||
va_start(args, fmt);
|
||||
xvasprintf(&msg, fmt, args);
|
||||
xvasprintf(&msg, fmt2, args);
|
||||
va_end(args);
|
||||
|
||||
if ((r = sshbuf_putf(stderr_buffer, "%s\r\n", msg)) != 0)
|
||||
fatal_fr(r, "sshbuf_putf");
|
||||
(void)atomicio(vwrite, STDERR_FILENO, msg, strlen(msg));
|
||||
free(msg);
|
||||
free(fmt2);
|
||||
|
||||
quit_pending = 1;
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ send_chaff(struct ssh *ssh)
|
||||
{
|
||||
int r;
|
||||
|
||||
if ((ssh->kex->flags & KEX_HAS_PING) == 0)
|
||||
if (ssh->kex == NULL || (ssh->kex->flags & KEX_HAS_PING) == 0)
|
||||
return 0;
|
||||
/* XXX probabilistically send chaff? */
|
||||
/*
|
||||
@ -597,7 +597,7 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
|
||||
if (options.obscure_keystroke_timing_interval <= 0)
|
||||
return 1; /* disabled in config */
|
||||
|
||||
if (!channel_still_open(ssh) || quit_pending) {
|
||||
if (!channel_tty_open(ssh) || quit_pending) {
|
||||
/* Stop if no channels left of we're waiting for one to close */
|
||||
stop_reason = "no active channels";
|
||||
} else if (ssh_packet_is_rekeying(ssh)) {
|
||||
@ -615,8 +615,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
|
||||
if (timespeccmp(&now, &chaff_until, >=)) {
|
||||
/* Stop if there have been no keystrokes for a while */
|
||||
stop_reason = "chaff time expired";
|
||||
} else if (timespeccmp(&now, &next_interval, >=)) {
|
||||
/* Otherwise if we were due to send, then send chaff */
|
||||
} else if (timespeccmp(&now, &next_interval, >=) &&
|
||||
!ssh_packet_have_data_to_write(ssh)) {
|
||||
/* If due to send but have no data, then send chaff */
|
||||
if (send_chaff(ssh))
|
||||
nchaff++;
|
||||
}
|
||||
@ -689,7 +690,7 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
|
||||
static void
|
||||
client_wait_until_can_do_something(struct ssh *ssh, struct pollfd **pfdp,
|
||||
u_int *npfd_allocp, u_int *npfd_activep, int channel_did_enqueue,
|
||||
int *conn_in_readyp, int *conn_out_readyp)
|
||||
sigset_t *sigsetp, int *conn_in_readyp, int *conn_out_readyp)
|
||||
{
|
||||
struct timespec timeout;
|
||||
int ret, oready;
|
||||
@ -736,7 +737,7 @@ client_wait_until_can_do_something(struct ssh *ssh, struct pollfd **pfdp,
|
||||
ssh_packet_get_rekey_timeout(ssh));
|
||||
}
|
||||
|
||||
ret = ppoll(*pfdp, *npfd_activep, ptimeout_get_tsp(&timeout), NULL);
|
||||
ret = ppoll(*pfdp, *npfd_activep, ptimeout_get_tsp(&timeout), sigsetp);
|
||||
|
||||
if (ret == -1) {
|
||||
/*
|
||||
@ -1453,9 +1454,10 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
struct pollfd *pfd = NULL;
|
||||
u_int npfd_alloc = 0, npfd_active = 0;
|
||||
double start_time, total_time;
|
||||
int channel_did_enqueue = 0, r, len;
|
||||
int channel_did_enqueue = 0, r;
|
||||
u_int64_t ibytes, obytes;
|
||||
int conn_in_ready, conn_out_ready;
|
||||
sigset_t bsigset, osigset;
|
||||
|
||||
debug("Entering interactive session.");
|
||||
session_ident = ssh2_chan_id;
|
||||
@ -1504,10 +1506,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
|
||||
quit_pending = 0;
|
||||
|
||||
/* Initialize buffer. */
|
||||
if ((stderr_buffer = sshbuf_new()) == NULL)
|
||||
fatal_f("sshbuf_new failed");
|
||||
|
||||
client_init_dispatch(ssh);
|
||||
|
||||
/*
|
||||
@ -1541,6 +1539,13 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
|
||||
schedule_server_alive_check();
|
||||
|
||||
if (sigemptyset(&bsigset) == -1 ||
|
||||
sigaddset(&bsigset, SIGHUP) == -1 ||
|
||||
sigaddset(&bsigset, SIGINT) == -1 ||
|
||||
sigaddset(&bsigset, SIGQUIT) == -1 ||
|
||||
sigaddset(&bsigset, SIGTERM) == -1)
|
||||
error_f("bsigset setup: %s", strerror(errno));
|
||||
|
||||
/* Main loop of the client for the interactive session mode. */
|
||||
while (!quit_pending) {
|
||||
channel_did_enqueue = 0;
|
||||
@ -1572,17 +1577,20 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
* message about it to the server if so.
|
||||
*/
|
||||
client_check_window_change(ssh);
|
||||
|
||||
if (quit_pending)
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* Wait until we have something to do (something becomes
|
||||
* available on one of the descriptors).
|
||||
*/
|
||||
if (sigprocmask(SIG_BLOCK, &bsigset, &osigset) == -1)
|
||||
error_f("bsigset sigprocmask: %s", strerror(errno));
|
||||
if (quit_pending)
|
||||
break;
|
||||
client_wait_until_can_do_something(ssh, &pfd, &npfd_alloc,
|
||||
&npfd_active, channel_did_enqueue,
|
||||
&npfd_active, channel_did_enqueue, &osigset,
|
||||
&conn_in_ready, &conn_out_ready);
|
||||
if (sigprocmask(SIG_SETMASK, &osigset, NULL) == -1)
|
||||
error_f("osigset sigprocmask: %s", strerror(errno));
|
||||
|
||||
if (quit_pending)
|
||||
break;
|
||||
@ -1628,6 +1636,14 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
|
||||
/* Terminate the session. */
|
||||
|
||||
/*
|
||||
* In interactive mode (with pseudo tty) display a message indicating
|
||||
* that the connection has been closed.
|
||||
*/
|
||||
if (have_pty && options.log_level >= SYSLOG_LEVEL_INFO)
|
||||
quit_message("Connection to %s closed.", host);
|
||||
|
||||
|
||||
/* Stop watching for window change. */
|
||||
ssh_signal(SIGWINCH, SIG_DFL);
|
||||
|
||||
@ -1660,27 +1676,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
|
||||
cleanup_exit(255);
|
||||
}
|
||||
|
||||
/*
|
||||
* In interactive mode (with pseudo tty) display a message indicating
|
||||
* that the connection has been closed.
|
||||
*/
|
||||
if (have_pty && options.log_level >= SYSLOG_LEVEL_INFO)
|
||||
quit_message("Connection to %s closed.", host);
|
||||
|
||||
/* Output any buffered data for stderr. */
|
||||
if (sshbuf_len(stderr_buffer) > 0) {
|
||||
len = atomicio(vwrite, fileno(stderr),
|
||||
(u_char *)sshbuf_ptr(stderr_buffer),
|
||||
sshbuf_len(stderr_buffer));
|
||||
if (len < 0 || (u_int)len != sshbuf_len(stderr_buffer))
|
||||
error("Write failed flushing stderr buffer.");
|
||||
else if ((r = sshbuf_consume(stderr_buffer, len)) != 0)
|
||||
fatal_fr(r, "sshbuf_consume");
|
||||
}
|
||||
|
||||
/* Clear and free any buffers. */
|
||||
sshbuf_free(stderr_buffer);
|
||||
|
||||
/* Report bytes transferred, and transfer rates. */
|
||||
total_time = monotime_double() - start_time;
|
||||
ssh_packet_get_bytes(ssh, &ibytes, &obytes);
|
||||
@ -1809,7 +1804,7 @@ client_request_x11(struct ssh *ssh, const char *request_type, int rchan)
|
||||
sock = x11_connect_display(ssh);
|
||||
if (sock < 0)
|
||||
return NULL;
|
||||
c = channel_new(ssh, "x11",
|
||||
c = channel_new(ssh, "x11-connection",
|
||||
SSH_CHANNEL_X11_OPEN, sock, sock, -1,
|
||||
CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, "x11", 1);
|
||||
c->force_drain = 1;
|
||||
@ -1844,7 +1839,7 @@ client_request_agent(struct ssh *ssh, const char *request_type, int rchan)
|
||||
else
|
||||
debug2_fr(r, "ssh_agent_bind_hostkey");
|
||||
|
||||
c = channel_new(ssh, "authentication agent connection",
|
||||
c = channel_new(ssh, "agent-connection",
|
||||
SSH_CHANNEL_OPEN, sock, sock, -1,
|
||||
CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0,
|
||||
"authentication agent connection", 1);
|
||||
@ -1872,7 +1867,7 @@ client_request_tun_fwd(struct ssh *ssh, int tun_mode,
|
||||
}
|
||||
debug("Tunnel forwarding using interface %s", ifname);
|
||||
|
||||
c = channel_new(ssh, "tun", SSH_CHANNEL_OPENING, fd, fd, -1,
|
||||
c = channel_new(ssh, "tun-connection", SSH_CHANNEL_OPENING, fd, fd, -1,
|
||||
CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
|
||||
c->datagram = 1;
|
||||
|
||||
@ -2437,25 +2432,6 @@ client_global_hostkeys_prove_confirm(struct ssh *ssh, int type,
|
||||
client_repledge();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns non-zero if the key is accepted by HostkeyAlgorithms.
|
||||
* Made slightly less trivial by the multiple RSA signature algorithm names.
|
||||
*/
|
||||
static int
|
||||
key_accepted_by_hostkeyalgs(const struct sshkey *key)
|
||||
{
|
||||
const char *ktype = sshkey_ssh_name(key);
|
||||
const char *hostkeyalgs = options.hostkeyalgorithms;
|
||||
|
||||
if (key->type == KEY_UNSPEC)
|
||||
return 0;
|
||||
if (key->type == KEY_RSA &&
|
||||
(match_pattern_list("rsa-sha2-256", hostkeyalgs, 0) == 1 ||
|
||||
match_pattern_list("rsa-sha2-512", hostkeyalgs, 0) == 1))
|
||||
return 1;
|
||||
return match_pattern_list(ktype, hostkeyalgs, 0) == 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle hostkeys-00@openssh.com global request to inform the client of all
|
||||
* the server's hostkeys. The keys are checked against the user's
|
||||
@ -2500,7 +2476,7 @@ client_input_hostkeys(struct ssh *ssh)
|
||||
debug3_f("received %s key %s", sshkey_type(key), fp); // CodeQL [SM02311]: debug3_f can accept NULL value for fp
|
||||
free(fp);
|
||||
|
||||
if (!key_accepted_by_hostkeyalgs(key)) {
|
||||
if (!hostkey_accepted_by_hostkeyalgs(key)) {
|
||||
debug3_f("%s key not permitted by "
|
||||
"HostkeyAlgorithms", sshkey_ssh_name(key));
|
||||
continue;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: clientloop.h,v 1.37 2020/04/03 02:40:32 djm Exp $ */
|
||||
/* $OpenBSD: clientloop.h,v 1.38 2024/05/17 06:42:04 jsg Exp $ */
|
||||
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
@ -43,7 +43,6 @@ struct ssh;
|
||||
int client_loop(struct ssh *, int, int, int);
|
||||
int client_x11_get_proto(struct ssh *, const char *, const char *,
|
||||
u_int, u_int, char **, char **);
|
||||
void client_global_request_reply_fwd(int, u_int32_t, void *);
|
||||
void client_session2_setup(struct ssh *, int, int, int,
|
||||
const char *, struct termios *, int, struct sshbuf *, char **);
|
||||
char *client_request_tun_fwd(struct ssh *, int, int, int,
|
||||
|
2051
config.h.in
Normal file
2051
config.h.in
Normal file
File diff suppressed because it is too large
Load Diff
130
configure.ac
130
configure.ac
@ -149,6 +149,7 @@ fi
|
||||
|
||||
use_stack_protector=1
|
||||
use_toolchain_hardening=1
|
||||
use_retpoline=1
|
||||
AC_ARG_WITH([stackprotect],
|
||||
[ --without-stackprotect Don't use compiler's stack protection], [
|
||||
if test "x$withval" = "xno"; then
|
||||
@ -159,6 +160,11 @@ AC_ARG_WITH([hardening],
|
||||
if test "x$withval" = "xno"; then
|
||||
use_toolchain_hardening=0
|
||||
fi ])
|
||||
AC_ARG_WITH([retpoline],
|
||||
[ --without-retpoline Enable retpoline spectre mitigation], [
|
||||
if test "x$withval" = "xno"; then
|
||||
use_retpoline=0
|
||||
fi ])
|
||||
|
||||
# We use -Werror for the tests only so that we catch warnings like "this is
|
||||
# on by default" for things like -fPIE.
|
||||
@ -189,10 +195,11 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
||||
AC_MSG_CHECKING([clang version])
|
||||
ver="`$CC -v 2>&1`"
|
||||
if echo "$ver" | grep "Apple" >/dev/null; then
|
||||
CLANG_VER="apple-`echo "$ver" | \
|
||||
awk '/Apple LLVM/ {print $4"-"$5}'`"
|
||||
CLANG_VER=apple-`echo "$ver" | grep 'clang version' | \
|
||||
$SED 's/.*clang version //g' | $AWK '{print $1}'`
|
||||
else
|
||||
CLANG_VER=`echo "$ver" | $AWK '/clang version /{print $3}'`
|
||||
CLANG_VER=`echo "$ver" | grep 'clang version' | \
|
||||
$SED 's/.*clang version //g' | $AWK '{print $1}'`
|
||||
fi
|
||||
AC_MSG_RESULT([$CLANG_VER])
|
||||
|
||||
@ -215,8 +222,6 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
||||
OSSH_CHECK_CFLAG_COMPILE([-Wbitwise-instead-of-logical])
|
||||
OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
|
||||
if test "x$use_toolchain_hardening" = "x1"; then
|
||||
OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang
|
||||
OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt])
|
||||
OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2])
|
||||
OSSH_CHECK_LDFLAG_LINK([-Wl,-z,relro])
|
||||
OSSH_CHECK_LDFLAG_LINK([-Wl,-z,now])
|
||||
@ -230,12 +235,19 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
||||
# clang 15 seems to have a bug in -fzero-call-used-regs=all. See
|
||||
# https://bugzilla.mindrot.org/show_bug.cgi?id=3475 and
|
||||
# https://github.com/llvm/llvm-project/issues/59242
|
||||
# clang 17 has a different bug that causes an ICE when using this
|
||||
# flag at all (https://bugzilla.mindrot.org/show_bug.cgi?id=3629)
|
||||
case "$CLANG_VER" in
|
||||
15.*|apple*) OSSH_CHECK_CFLAG_COMPILE([-fzero-call-used-regs=used]) ;;
|
||||
*) OSSH_CHECK_CFLAG_COMPILE([-fzero-call-used-regs=all]) ;;
|
||||
apple-15*) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
|
||||
17*) ;;
|
||||
*) OSSH_CHECK_CFLAG_LINK([-fzero-call-used-regs=used]) ;;
|
||||
esac
|
||||
OSSH_CHECK_CFLAG_COMPILE([-ftrivial-auto-var-init=zero])
|
||||
fi
|
||||
if test "x$use_retpoline" = "x1"; then
|
||||
OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang
|
||||
OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if $CC accepts -fno-builtin-memset])
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
@ -903,6 +915,7 @@ int main(void) { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
|
||||
AC_DEFINE([_PATH_BTMP], ["/var/log/btmp"], [log for bad login attempts])
|
||||
AC_DEFINE([USE_BTMP])
|
||||
AC_DEFINE([LINUX_OOM_ADJUST], [1], [Adjust Linux out-of-memory killer])
|
||||
AC_DEFINE([SYSTEMD_NOTIFY], [1], [Have sshd notify systemd on start/reload])
|
||||
inet6_default_4in6=yes
|
||||
case `uname -r` in
|
||||
1.*|2.0.*)
|
||||
@ -1335,6 +1348,13 @@ EOD
|
||||
AC_DEFINE([BROKEN_SETVBUF], [1],
|
||||
[LynxOS has broken setvbuf() implementation])
|
||||
;;
|
||||
*-*-gnu*)
|
||||
dnl GNU Hurd. Needs to be after the linux and the other *-gnu entries.
|
||||
dnl Target SUSv3/POSIX.1-2001 plus BSD specifics.
|
||||
dnl _DEFAULT_SOURCE is the new name for _BSD_SOURCE
|
||||
dnl _GNU_SOURCE is needed for setres*id prototypes.
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([compiler and flags for sanity])
|
||||
@ -2063,6 +2083,16 @@ AC_ARG_WITH([security-key-builtin],
|
||||
[ enable_sk_internal=$withval ]
|
||||
)
|
||||
|
||||
enable_dsa=
|
||||
AC_ARG_ENABLE([dsa-keys],
|
||||
[ --enable-dsa-keys enable DSA key support [no]],
|
||||
[
|
||||
if test "x$enableval" != "xno" ; then
|
||||
enable_dsa=1
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
AC_CHECK_FUNCS([dlopen])
|
||||
AC_CHECK_DECL([RTLD_NOW], [], [], [#include <dlfcn.h>])
|
||||
@ -2719,7 +2749,15 @@ AC_ARG_WITH([ssl-dir],
|
||||
else
|
||||
CPPFLAGS="-I${withval} ${CPPFLAGS}"
|
||||
fi
|
||||
openssl_bin_PATH="${PATH}${PATH_SEPARATOR}${withval}/bin${PATH_SEPARATOR}${withval}/apps"
|
||||
dnl Ensure specified openssl binary works, eg it can
|
||||
dnl find its runtime libraries, before trying to use.
|
||||
if test -x "${withval}/bin/openssl" && \
|
||||
"${withval}/bin/openssl" version >/dev/null 2>&1; then
|
||||
openssl_bin_PATH="${withval}/bin${PATH_SEPARATOR}${PATH}"
|
||||
elif test -x "${withval}/apps/openssl" && \
|
||||
"${withval}/apps/openssl" version >/dev/null 2>&1; then
|
||||
openssl_bin_PATH="${withval}/apps${PATH_SEPARATOR}${PATH}"
|
||||
fi
|
||||
fi
|
||||
]
|
||||
)
|
||||
@ -2786,8 +2824,8 @@ if test "x$openssl" = "xyes" ; then
|
||||
AC_MSG_RESULT([$ssl_header_ver])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([OpenSSL version header not found.])
|
||||
AC_MSG_RESULT([failed])
|
||||
AC_MSG_ERROR([OpenSSL version test program failed.])
|
||||
],
|
||||
[
|
||||
AC_MSG_WARN([cross compiling: not checking])
|
||||
@ -2851,12 +2889,9 @@ if test "x$openssl" = "xyes" ; then
|
||||
*) ;; # Assume all other versions are good.
|
||||
esac
|
||||
;;
|
||||
300*)
|
||||
30*)
|
||||
# OpenSSL 3; we use the 1.1x API
|
||||
CPPFLAGS="$CPPFLAGS -DOPENSSL_API_COMPAT=0x10100000L"
|
||||
;;
|
||||
301*|302*)
|
||||
# OpenSSL development branch; request 1.1x API
|
||||
# https://openssl.org/policies/general/versioning-policy.html
|
||||
CPPFLAGS="$CPPFLAGS -DOPENSSL_API_COMPAT=0x10100000L"
|
||||
;;
|
||||
*)
|
||||
@ -2990,7 +3025,7 @@ if test "x$openssl" = "xyes" ; then
|
||||
fi
|
||||
|
||||
# Check for OpenSSL without EVP_aes_{192,256}_cbc
|
||||
AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
|
||||
AC_MSG_CHECKING([whether OpenSSL lacks support for AES 192/256])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
@ -3140,6 +3175,50 @@ if test "x$openssl" = "xyes" ; then
|
||||
ecdsa-sha2-nistp521 \
|
||||
ecdsa-sha2-nistp521-cert-v01@openssh.com"
|
||||
fi
|
||||
|
||||
# Check libcrypto ED25519 support
|
||||
AC_CHECK_FUNCS([EVP_PKEY_get_raw_public_key])
|
||||
AC_CHECK_FUNCS([EVP_PKEY_get_raw_private_key])
|
||||
AC_MSG_CHECKING([whether OpenSSL has ED25519 support])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <string.h>
|
||||
#include <openssl/evp.h>
|
||||
]], [[
|
||||
unsigned char buf[64];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
exit(EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL,
|
||||
buf, sizeof(buf)) == NULL);
|
||||
]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([OPENSSL_HAS_ED25519], [1],
|
||||
[libcrypto has ed25519 support])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
]
|
||||
)
|
||||
|
||||
openssl_dsa=no
|
||||
if test ! -z "$enable_dsa" ; then
|
||||
AC_CHECK_DECLS([OPENSSL_NO_DSA], [], [
|
||||
AC_CHECK_DECLS([OPENSSL_IS_BORINGSSL], [],
|
||||
[ openssl_dsa=yes ],
|
||||
[ #include <openssl/opensslconf.h> ]
|
||||
)
|
||||
],
|
||||
[ #include <openssl/opensslconf.h> ]
|
||||
)
|
||||
AC_MSG_CHECKING([whether to enable DSA key support])
|
||||
if test "x$openssl_dsa" = "xno"; then
|
||||
AC_MSG_ERROR([DSA requested but not supported by OpenSSL])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([WITH_DSA], [1],
|
||||
[DSA keys explicitly enabled])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# PKCS11/U2F depend on OpenSSL and dlopen().
|
||||
@ -5265,6 +5344,16 @@ AC_DEFINE_UNQUOTED([_PATH_SSH_PIDDIR], ["$piddir"],
|
||||
[Specify location of ssh.pid])
|
||||
AC_SUBST([piddir])
|
||||
|
||||
|
||||
AC_ARG_ENABLE([fd-passing],
|
||||
[ --disable-fd-passing disable file descriptor passsing [no]],
|
||||
[
|
||||
if test "x$enableval" = "xno" ; then
|
||||
AC_DEFINE([DISABLE_FD_PASSING])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
dnl allow user to disable some login recording features
|
||||
AC_ARG_ENABLE([lastlog],
|
||||
[ --disable-lastlog disable use of lastlog even if detected [no]],
|
||||
@ -5552,6 +5641,15 @@ AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
|
||||
AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
|
||||
AC_SUBST([DEPEND], [$(cat $srcdir/.depend)])
|
||||
|
||||
# Binaries for interop tests.
|
||||
AC_PATH_PROG([PLINK], [plink])
|
||||
AC_PATH_PROG([PUTTYGEN], [puttygen])
|
||||
AC_PATH_PROG([CONCH], [conch])
|
||||
AC_PATH_PROG([DROPBEAR], [dropbear])
|
||||
AC_PATH_PROG([DBCLIENT], [dbclient])
|
||||
AC_PATH_PROG([DROPBEARKEY], [dropbearkey])
|
||||
AC_PATH_PROG([DROPBEARCONVERT], [dropbearconvert])
|
||||
|
||||
CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
|
||||
LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
%global ver 9.5p1
|
||||
%global ver 9.8p1
|
||||
%global rel 1%{?dist}
|
||||
|
||||
# OpenSSH privilege separation requires a user & group ID
|
||||
@ -31,10 +31,13 @@
|
||||
%global build6x 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 26
|
||||
%global compat_openssl 1
|
||||
%else
|
||||
%global compat_openssl 0
|
||||
%global without_openssl 0
|
||||
# build without openssl where 1.1.1 is not available
|
||||
%if 0%{?fedora} <= 28
|
||||
%global without_openssl 1
|
||||
%endif
|
||||
%if 0%{?rhel} <= 7
|
||||
%global without_openssl 1
|
||||
%endif
|
||||
|
||||
# Do we want kerberos5 support (1=yes 0=no)
|
||||
@ -96,11 +99,8 @@ PreReq: initscripts >= 5.00
|
||||
Requires: initscripts >= 5.20
|
||||
%endif
|
||||
BuildRequires: perl
|
||||
%if %{compat_openssl}
|
||||
BuildRequires: compat-openssl10-devel
|
||||
%else
|
||||
BuildRequires: openssl-devel >= 1.0.1
|
||||
BuildRequires: openssl-devel < 1.1
|
||||
%if ! %{without_openssl}
|
||||
BuildRequires: openssl-devel >= 1.1.1
|
||||
%endif
|
||||
BuildRequires: /bin/login
|
||||
%if ! %{build6x}
|
||||
@ -214,6 +214,9 @@ CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS
|
||||
--mandir=%{_mandir} \
|
||||
--with-mantype=man \
|
||||
--disable-strip \
|
||||
%if %{without_openssl}
|
||||
--without-openssl \
|
||||
%endif
|
||||
%if %{scard}
|
||||
--with-smartcard \
|
||||
%endif
|
||||
@ -272,11 +275,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT/etc/pam.d/
|
||||
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
|
||||
%if %{build6x}
|
||||
install -m644 contrib/redhat/sshd.pam.old $RPM_BUILD_ROOT/etc/pam.d/sshd
|
||||
%else
|
||||
install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
|
||||
%endif
|
||||
install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
|
||||
install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
|
||||
|
||||
%if ! %{no_x11_askpass}
|
||||
@ -394,6 +393,7 @@ fi
|
||||
%defattr(-,root,root)
|
||||
%dir %attr(0111,root,root) %{_var}/empty/sshd
|
||||
%attr(0755,root,root) %{_sbindir}/sshd
|
||||
%attr(0755,root,root) %{_libexecdir}/openssh/sshd-session
|
||||
%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
|
||||
%attr(0644,root,root) %{_mandir}/man8/sshd.8*
|
||||
%attr(0644,root,root) %{_mandir}/man5/moduli.5*
|
||||
@ -423,6 +423,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Oct 16 2023 Fabio Pedretti <pedretti.fabio@gmail.com>
|
||||
- Remove reference of dropped sshd.pam.old file
|
||||
- Update openssl-devel dependency to require >= 1.1.1
|
||||
- Build with --without-openssl elsewhere
|
||||
|
||||
* Thu Oct 28 2021 Damien Miller <djm@mindrot.org>
|
||||
- Remove remaining traces of --with-md5-passwords
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
|
||||
Name: openssh
|
||||
Version: 9.5p1
|
||||
Version: 9.8p1
|
||||
URL: https://www.openssh.com/
|
||||
Release: 1
|
||||
Source0: openssh-%{version}.tar.gz
|
||||
@ -211,6 +211,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(0755,root,root) %{_sbindir}/sshd
|
||||
%attr(0755,root,root) %dir %{_libdir}/ssh
|
||||
%attr(0755,root,root) %{_libdir}/ssh/sftp-server
|
||||
%attr(0755,root,root) %{_libdir}/ssh/sshd-session
|
||||
%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign
|
||||
%attr(0755,root,root) %{_libdir}/ssh/ssh-pkcs11-helper
|
||||
%attr(0755,root,root) %{_libdir}/ssh/ssh-sk-helper
|
||||
|
@ -3,7 +3,6 @@
|
||||
<!-- KeyPath is necessary for multi-file components to identify the key file - preferrably versioned. -->
|
||||
<ComponentGroup Id="Client" Directory="INSTALLFOLDER">
|
||||
<ComponentGroupRef Id="Shared" />
|
||||
<ComponentGroupRef Id="Manifest" />
|
||||
<Component>
|
||||
<File Name="ssh.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
|
@ -38,11 +38,7 @@
|
||||
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.ProgramFilesFolder)" Name="Program Files">
|
||||
<Directory Id="INSTALLFOLDER" Name="OpenSSH" >
|
||||
<Directory Id="MANIFESTFOLDER" Name="_manifest" >
|
||||
<Directory Id="SPDXFOLDER" Name="spdx_2.2" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="INSTALLFOLDER" Name="OpenSSH" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Product>
|
||||
|
@ -3,13 +3,15 @@
|
||||
<!-- KeyPath is necessary for multi-file components to identify the key file - preferrably versioned. -->
|
||||
<ComponentGroup Id="Server" Directory="INSTALLFOLDER">
|
||||
<ComponentGroupRef Id="Shared" />
|
||||
<ComponentGroupRef Id="Manifest" />
|
||||
<Component>
|
||||
<File Name="sftp-server.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component>
|
||||
<File Name="ssh-shellhost.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component>
|
||||
<File Name="sshd-session.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component>
|
||||
<File Id="sshd.exe" Name="sshd.exe" KeyPath="yes" />
|
||||
<RegistryKey Root="HKLM" Key="SOFTWARE\OpenSSH" ForceCreateOnInstall="yes">
|
||||
|
@ -70,15 +70,6 @@
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
|
||||
<ComponentGroup Id="Manifest" Directory="SPDXFOLDER">
|
||||
<Component>
|
||||
<File Name="manifest.spdx.json" Source="_manifest\spdx_2.2\manifest.spdx.json" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component>
|
||||
<File Name="manifest.spdx.json.sha256" Source="_manifest\spdx_2.2\manifest.spdx.json.sha256" KeyPath="yes" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
|
||||
<!-- Automatically add custom actions if referencing the Shared component group. -->
|
||||
<SetProperty Id="SetPrivilegesOnSshAgent" Value=""[SystemFolder]sc.exe" privs ssh-agent SeAssignPrimaryTokenPrivilege/SeTcbPrivilege/SeBackupPrivilege/SeRestorePrivilege/SeImpersonatePrivilege" Sequence="execute" Before="SetPrivilegesOnSshAgent" />
|
||||
<CustomAction Id="SetPrivilegesOnSshAgent" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
|
||||
|
@ -1,10 +0,0 @@
|
||||
# escape=`
|
||||
#0.3.6 (no powershell 6)
|
||||
FROM balu1202/openssh-dockerbuildimage-ltsc2019-new:latest
|
||||
|
||||
SHELL ["PowerShell.exe", "-command"]
|
||||
RUN Set-ExecutionPolicy Unrestricted
|
||||
|
||||
COPY ./OpenSSH-build.ps1 /OpenSSH-build.ps1
|
||||
|
||||
ENTRYPOINT ["powershell", "-executionpolicy", "unrestricted"]
|
@ -1,7 +1,7 @@
|
||||
[cmdletbinding()]
|
||||
# PowerShell Script to clone, build and package PowerShell from specified fork and branch
|
||||
param (
|
||||
[string] $repolocation = "$pwd\openssh-portable",
|
||||
[string] $repolocation = "$PSScriptRoot\..\..\..",
|
||||
[string] $destination = "$env:WORKSPACE",
|
||||
[ValidateSet('x86', 'x64', 'arm64', 'arm')]
|
||||
[String]$NativeHostArch = 'x64',
|
||||
|
@ -317,7 +317,7 @@ function Start-OpenSSHPackage
|
||||
}
|
||||
|
||||
$buildDir = Join-Path $repositoryRoot ("bin\" + $folderName + "\" + $Configuration)
|
||||
$payload = "sshd.exe", "ssh.exe", "ssh-agent.exe", "ssh-add.exe", "sftp.exe"
|
||||
$payload = "sshd.exe", "sshd-session.exe", "ssh.exe", "ssh-agent.exe", "ssh-add.exe", "sftp.exe"
|
||||
$payload += "sftp-server.exe", "scp.exe", "ssh-shellhost.exe", "ssh-keygen.exe", "ssh-keyscan.exe", "ssh-sk-helper.exe", "ssh-pkcs11-helper.exe"
|
||||
$payload += "sshd_config_default", "install-sshd.ps1", "uninstall-sshd.ps1"
|
||||
$payload += "FixHostFilePermissions.ps1", "FixUserFilePermissions.ps1", "OpenSSHUtils.psm1", "OpenSSHUtils.psd1"
|
||||
|
@ -1,13 +1,13 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27027.1
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.35027.167
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh", "ssh.vcxproj", "{74E69D5E-A1EF-46EA-9173-19A412774104}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh", "libssh.vcxproj", "{05E1115F-8529-46D0-AAAF-52A404CE79A7}"
|
||||
@ -23,33 +23,33 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-keygen", "keygen.vcxproj", "{47496135-131B-41D6-BF2B-EE7144873DD0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sftp", "sftp.vcxproj", "{BBEFF9D7-0BC3-41D1-908B-8052158B5052}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sftp-server", "sftp-server.vcxproj", "{6657614F-7821-4D55-96EF-7C3C4B551880}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sshd", "sshd.vcxproj", "{F58FF6BA-098B-4DB9-9609-A030DFB4D03F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcxproj", "{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}"
|
||||
@ -68,72 +68,72 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-agent", "ssh-agent.vcxproj", "{F6644EC5-D6B6-42A1-828C-75E2977470E0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-add", "ssh-add.vcxproj", "{029797FF-C986-43DE-95CD-2E771E86AEBC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scp", "scp.vcxproj", "{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-bitmap", "unittest-bitmap.vcxproj", "{D901596E-76C7-4608-9CFA-2B42A9FD7250}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-kex", "unittest-kex.vcxproj", "{8EC56B06-5A9A-4D6D-804D-037FE26FD43E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-sshbuf", "unittest-sshbuf.vcxproj", "{CD9740CE-C96E-49B3-823F-012E09D17806}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-win32compat", "unittest-win32compat.vcxproj", "{BF295BA9-4BF8-43F8-8CBF-FAE84815466C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-hostkeys", "unittest-hostkeys.vcxproj", "{890C6129-286F-4CD8-8252-FB8D3B4E6E1B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-sshkey", "unittest-sshkey.vcxproj", "{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{17322AAF-808F-4646-AD37-5B0EDDCB8F3E}"
|
||||
@ -143,41 +143,49 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-match", "unittest-match.vcxproj", "{484A8CDE-B949-4BDA-B447-74685C8E032F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-misc", "unittest-misc.vcxproj", "{0B527504-2AF5-4E6E-A84F-10BADFAEDA88}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-keyscan", "ssh-keyscan.vcxproj", "{7D0A75FC-F366-4B60-B72F-B37C3EA07CCA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-sk-helper", "ssh-sk-helper.vcxproj", "{7D0A75FC-F366-4B60-B72F-B37C3EA07CCB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-pkcs11-helper", "ssh-pkcs11-helper.vcxproj", "{21D772C3-0EB0-47B7-A93C-FF624675A58D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sshd-session", "sshd-session.vcxproj", "{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
@ -576,6 +584,22 @@ Global
|
||||
{21D772C3-0EB0-47B7-A93C-FF624675A58D}.Release|x64.Build.0 = Release|x64
|
||||
{21D772C3-0EB0-47B7-A93C-FF624675A58D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{21D772C3-0EB0-47B7-A93C-FF624675A58D}.Release|x86.Build.0 = Release|Win32
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|x64.Build.0 = Debug|x64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Debug|x86.Build.0 = Debug|Win32
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|ARM.Build.0 = Release|ARM
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|x64.ActiveCfg = Release|x64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|x64.Build.0 = Release|x64
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|x86.ActiveCfg = Release|Win32
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -605,6 +629,7 @@ Global
|
||||
{7D0A75FC-F366-4B60-B72F-B37C3EA07CCA} = {17322AAF-808F-4646-AD37-5B0EDDCB8F3E}
|
||||
{7D0A75FC-F366-4B60-B72F-B37C3EA07CCB} = {17322AAF-808F-4646-AD37-5B0EDDCB8F3E}
|
||||
{21D772C3-0EB0-47B7-A93C-FF624675A58D} = {17322AAF-808F-4646-AD37-5B0EDDCB8F3E}
|
||||
{86D5F580-EFB0-4BEA-96B7-7181F9BC6171} = {17322AAF-808F-4646-AD37-5B0EDDCB8F3E}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0AC224E8-C215-4270-954A-A2ACEE06DE58}
|
||||
|
@ -102,7 +102,7 @@
|
||||
|
||||
/* Define if your platform needs to skip post auth
|
||||
file descriptor passing */
|
||||
/* #undef DISABLE_FD_PASSING */
|
||||
#define DISABLE_FD_PASSING
|
||||
|
||||
/* Define if you don't want to use lastlog */
|
||||
/* #undef DISABLE_LASTLOG */
|
||||
@ -207,13 +207,13 @@
|
||||
/* #undef HAVE_ADDR_V6_IN_UTMPX */
|
||||
|
||||
/* Define to 1 if you have the `arc4random' function. */
|
||||
#define HAVE_ARC4RANDOM 1
|
||||
/* #undef HAVE_ARC4RANDOM */
|
||||
|
||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||
#define HAVE_ARC4RANDOM_BUF 1
|
||||
/* #undef HAVE_ARC4RANDOM_BUF */
|
||||
|
||||
/* Define to 1 if you have the `arc4random_uniform' function. */
|
||||
#define HAVE_ARC4RANDOM_UNIFORM 1
|
||||
/* #undef HAVE_ARC4RANDOM_UNIFORM */
|
||||
|
||||
/* Define to 1 if you have the `asprintf' function. */
|
||||
/* #undef HAVE_ASPRINTF */
|
||||
@ -349,7 +349,7 @@
|
||||
/* #undef HAVE_DEV_PTS_AND_PTC */
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
/* #undef HAVE_DIRENT_H
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
|
||||
/* Define to 1 if you have the `dirfd' function. */
|
||||
/* #undef HAVE_DIRFD */
|
||||
@ -1698,7 +1698,7 @@
|
||||
|
||||
#define HAVE_BZERO 1
|
||||
#define PATH_MAX 32768
|
||||
#define S_IFIFO 0x1000
|
||||
#define S_IFIFO 0x1000
|
||||
#define HAVE_EXPLICIT_BZERO
|
||||
#define HAVE_MBTOWC 1
|
||||
#define HAVE_LLABS 1
|
||||
@ -1713,7 +1713,7 @@
|
||||
#define __STDC__ 1
|
||||
|
||||
#define umac128_new umac_new
|
||||
#define umac128_update umac_update
|
||||
#define umac128_update umac_update
|
||||
#define umac_final umac128_final
|
||||
#define umac_delete umac128_delete
|
||||
|
||||
@ -1727,7 +1727,6 @@
|
||||
#define _PATH_LS "dir"
|
||||
#define _PATH_DEVNULL "NUL"
|
||||
#define FORK_NOT_SUPPORTED
|
||||
#define HAVE_FREEZERO
|
||||
#define FILESYSTEM_NO_BACKSLASH
|
||||
#define HAVE_LOCALTIME_R
|
||||
#define HAVE_DECL_MEMMEM 0
|
||||
|
@ -450,6 +450,7 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-io.c" />
|
||||
<ClCompile Include="..\..\..\cipher-chachapoly-libcrypto.c" />
|
||||
<ClCompile Include="..\..\..\kex-names.c" />
|
||||
<ClCompile Include="..\win32compat\spawn-ext.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -22,8 +22,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)ed25519.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)entropy.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)fatal.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)fe25519.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)ge25519.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-genr.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)hash.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)hmac.c" />
|
||||
@ -42,7 +40,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)nchan.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)packet.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)poly1305.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sc25519.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)smult_curve25519_ref.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)ssh-dss.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)ssh-ecdsa.c" />
|
||||
@ -70,7 +67,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)progressmeter.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)readpass.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)rijndael.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)verify.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)xmalloc.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)kexgexs.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)platform-misc.c" />
|
||||
@ -84,6 +80,7 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-io.c" />
|
||||
<ClCompile Include="..\win32compat\spawn-ext.c" />
|
||||
<ClCompile Include="..\..\..\cipher-chachapoly-libcrypto.c" />
|
||||
<ClCompile Include="..\..\..\kex-names.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)addrmatch.c">
|
||||
@ -119,9 +116,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)cipher-chachapoly.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)cipher-ctr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)cipher.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -58,6 +58,7 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-waitpid.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\daemon.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\dirname.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\freezero.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\explicit_bzero.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\fake-rfc2553.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\fmt_scaled.c" />
|
||||
@ -102,7 +103,10 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\glob.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\strcasestr.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\strndup.c" />
|
||||
<ClCompile Include="..\..\..\openbsd-compat\arc4random_uniform.c" />
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-getentropy.c" />
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-pselect.c" />
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-timegm.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\base64.h" />
|
||||
@ -136,6 +140,7 @@
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\sys-queue.h" />
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\sys-tree.h" />
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\vis.h" />
|
||||
<ClInclude Include="..\..\..\openbsd-compat\arc4random_win.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DD483F7D-C553-4740-BC1A-903805AD0174}</ProjectGuid>
|
||||
|
@ -75,6 +75,9 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\dirname.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\freezero.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\explicit_bzero.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -216,6 +219,15 @@
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-pselect.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-timegm.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\openbsd-compat\arc4random_uniform.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\openbsd-compat\bsd-getentropy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\base64.h">
|
||||
@ -311,5 +323,8 @@
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)openbsd-compat\vis.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\openbsd-compat\arc4random_win.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -4,11 +4,11 @@
|
||||
<OpenSSH-Src-Path>$(SolutionDir)..\..\..\</OpenSSH-Src-Path>
|
||||
<OpenSSH-Bin-Path>$(SolutionDir)..\..\..\bin\</OpenSSH-Bin-Path>
|
||||
<OpenSSH-Lib-Path>$(SolutionDir)lib\</OpenSSH-Lib-Path>
|
||||
<LibreSSLVersion>3.8.2.0</LibreSSLVersion>
|
||||
<ZLibVersion>1.3</ZLibVersion>
|
||||
<fido2Version>1.14.0</fido2Version>
|
||||
<LibreSSLVersion>4.0.0.0</LibreSSLVersion>
|
||||
<ZLibVersion>1.3.1</ZLibVersion>
|
||||
<fido2Version>1.15.0</fido2Version>
|
||||
<!--libcbor version is not used in the build; it is needed for pipeline compliance tasks-->
|
||||
<libcborVersion>0.10.1</libcborVersion>
|
||||
<libcborVersion>0.11.0</libcborVersion>
|
||||
<LibreSSL-Path>$(SolutionDir)\LibreSSL\sdk\</LibreSSL-Path>
|
||||
<LibreSSL-x86-Path>$(SolutionDir)\LibreSSL\bin\desktop\x86\</LibreSSL-x86-Path>
|
||||
<LibreSSL-x64-Path>$(SolutionDir)\LibreSSL\bin\desktop\x64\</LibreSSL-x64-Path>
|
||||
|
Binary file not shown.
484
contrib/win32/openssh/sshd-session.vcxproj
Normal file
484
contrib/win32/openssh/sshd-session.vcxproj
Normal file
@ -0,0 +1,484 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="paths.targets" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{86D5F580-EFB0-4BEA-96B7-7181F9BC6171}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>keygen</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>
|
||||
<ProjectName>sshd-session</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);$(ZLib-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /ignore:4098 /CETCOMPAT %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);$(ZLib-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /ignore:4098 /CETCOMPAT %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-arm64-Path);$(ZLib-arm64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /ignore:4098 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-arm-Path);$(ZLib-arm-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /ignore:4098 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);$(ZLib-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /CETCOMPAT %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);$(ZLib-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 /CETCOMPAT %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-arm64-Path);$(ZLib-arm64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_DECLARE_NONSTDC_NAMES=0;_WIN32_WINNT=0x601;;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(ZLib-Path);$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
<AdditionalOptions>/Gy /ZH:SHA_256 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;zlib.lib;$(SSLLib)$(AdditionalDependentLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-arm-Path);$(ZLib-arm-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<AdditionalOptions>/debug /debugtype:cv,fixup /opt:ref /opt:icf /incremental:no /ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-bsm.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-linux.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-bsdauth.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-krb5.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-options.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-pam.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-passwd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-rhosts.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-shadow.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-sia.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-chall.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-gss.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-hostbased.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-kbdint.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-none.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-passwd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-pubkey.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv-krb5.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)loginrec.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor_wrap.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)platform.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-capsicum.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-darwin.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-null.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-rlimit.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-seccomp-filter.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-systrace.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)servconf.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)serverloop.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)session.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sftp-common.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshd-session.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshlogin.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_groupaccess.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_sshpty.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\w32-doexec.c" />
|
||||
<ClCompile Include="..\..\..\auth2-methods.c" />
|
||||
<ClCompile Include="..\..\..\auth2-pubkeyfile.c" />
|
||||
<ClCompile Include="..\..\..\misc.c" />
|
||||
<ClCompile Include="..\..\..\srclimit.c" />
|
||||
<ClCompile Include="..\..\..\ssh-sk-client.c" />
|
||||
<ClCompile Include="..\..\..\sshkey.c" />
|
||||
<ClCompile Include="..\win32compat\win32-utf8.c" />
|
||||
<ClCompile Include="..\win32compat\wmain_sshd-session.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="version.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
171
contrib/win32/openssh/sshd-session.vcxproj.filters
Normal file
171
contrib/win32/openssh/sshd-session.vcxproj.filters
Normal file
@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-bsm.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-linux.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-bsdauth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-krb5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-options.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-pam.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-passwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-rhosts.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-shadow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-sia.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-chall.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-gss.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-hostbased.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-kbdint.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-none.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-passwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-pubkey.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv-krb5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)loginrec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor_wrap.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)platform.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-capsicum.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-darwin.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-null.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-rlimit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-seccomp-filter.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-systrace.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)servconf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)serverloop.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)session.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sftp-common.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshd-session.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshlogin.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_sshpty.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_groupaccess.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\w32-doexec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\win32compat\win32-utf8.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\srclimit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\ssh-sk-client.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\auth2-pubkeyfile.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\misc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshkey.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\auth2-methods.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\win32compat\wmain_sshd-session.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="version.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -428,28 +428,9 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-bsm.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit-linux.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-bsdauth.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-krb5.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-options.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-pam.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-passwd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-rhosts.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-shadow.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-sia.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-chall.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-gss.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-hostbased.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-kbdint.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-none.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-passwd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-pubkey.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv-krb5.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)loginrec.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor_wrap.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)platform.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-capsicum.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-darwin.c" />
|
||||
@ -458,17 +439,15 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-seccomp-filter.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-systrace.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)servconf.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)serverloop.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)session.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sftp-common.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sshlogin.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_groupaccess.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_sshpty.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\wmain_sshd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\w32-doexec.c" />
|
||||
<ClCompile Include="..\..\..\auth2-pubkeyfile.c" />
|
||||
<ClCompile Include="..\..\..\auth2-methods.c" />
|
||||
<ClCompile Include="..\..\..\misc.c" />
|
||||
<ClCompile Include="..\..\..\platform-listen.c" />
|
||||
<ClCompile Include="..\..\..\srclimit.c" />
|
||||
<ClCompile Include="..\..\..\ssh-sk-client.c" />
|
||||
<ClCompile Include="..\..\..\sshkey.c" />
|
||||
|
@ -24,57 +24,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)audit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-bsdauth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-krb5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-options.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-pam.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-passwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-rhosts.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-shadow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth-sia.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-chall.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-gss.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-hostbased.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-kbdint.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-none.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-passwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2-pubkey.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)auth2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)gss-serv-krb5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -84,12 +33,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)loginrec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)monitor_wrap.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)platform.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -114,12 +57,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)servconf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)serverloop.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)session.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)sftp-common.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -138,9 +75,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32_groupaccess.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\w32-doexec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\win32compat\win32-utf8.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -150,15 +84,18 @@
|
||||
<ClCompile Include="..\..\..\ssh-sk-client.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\auth2-pubkeyfile.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\misc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshkey.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\auth2-methods.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\platform-listen.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="version.rc">
|
||||
|
@ -12,7 +12,6 @@
|
||||
#ListenAddress ::
|
||||
|
||||
#HostKey __PROGRAMDATA__/ssh/ssh_host_rsa_key
|
||||
#HostKey __PROGRAMDATA__/ssh/ssh_host_dsa_key
|
||||
#HostKey __PROGRAMDATA__/ssh/ssh_host_ecdsa_key
|
||||
#HostKey __PROGRAMDATA__/ssh/ssh_host_ed25519_key
|
||||
|
||||
@ -61,12 +60,11 @@ AuthorizedKeysFile .ssh/authorized_keys
|
||||
#PrintMotd yes
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
#PermitUserEnvironment no
|
||||
#Compression delayed
|
||||
#ClientAliveInterval 0
|
||||
#ClientAliveCountMax 3
|
||||
#UseDNS no
|
||||
#PidFile /var/run/sshd.pid
|
||||
#MaxStartups 10:30:100
|
||||
#PermitTunnel no
|
||||
#ChrootDirectory none
|
||||
|
@ -51,8 +51,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 9,5,0,0
|
||||
PRODUCTVERSION 9,5,0,0
|
||||
FILEVERSION 9,8,2,0
|
||||
PRODUCTVERSION 9,8,2,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,9 +67,9 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "9.5.0.0"
|
||||
VALUE "FileVersion", "9.8.2.0"
|
||||
VALUE "ProductName", "OpenSSH for Windows"
|
||||
VALUE "ProductVersion", "OpenSSH_9.5p1 for Windows"
|
||||
VALUE "ProductVersion", "OpenSSH_9.8p2 for Windows"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -435,14 +435,20 @@ file_in_chroot_jail(HANDLE handle) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return file_in_chroot_jail_helper(final_path);
|
||||
}
|
||||
|
||||
/* returns 1 if true, 0 otherwise */
|
||||
int
|
||||
file_in_chroot_jail_helper(wchar_t* final_path) {
|
||||
/* ensure final path is within chroot */
|
||||
to_wlower_case(final_path);
|
||||
if ((wcslen(final_path) < wcslen(chroot_pathw)) ||
|
||||
memcmp(final_path, chroot_pathw, 2 * wcslen(chroot_pathw)) != 0 ||
|
||||
final_path[wcslen(chroot_pathw)] != '\\') {
|
||||
memcmp(final_path, chroot_pathw, 2 * wcslen(chroot_pathw)) != 0 ||
|
||||
final_path[wcslen(chroot_pathw)] != '\\') {
|
||||
debug3("access denied due to attempt to escape chroot jail");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1268,6 +1274,7 @@ fileio_symlink(const char *target, const char *linkpath)
|
||||
DWORD ret = -1;
|
||||
char target_modified[PATH_MAX] = { 0 };
|
||||
char *linkpath_resolved = NULL, *target_resolved = NULL;
|
||||
wchar_t *linkpath_utf16 = NULL, *resolved_target_utf16 = NULL, *resolved_target_chroot = NULL;
|
||||
|
||||
if (target == NULL || linkpath == NULL) {
|
||||
errno = EFAULT;
|
||||
@ -1301,13 +1308,21 @@ fileio_symlink(const char *target, const char *linkpath)
|
||||
strcpy_s(target_modified, _countof(target_modified), target_resolved);
|
||||
}
|
||||
|
||||
wchar_t *linkpath_utf16 = resolved_path_utf16(linkpath);
|
||||
wchar_t *resolved_target_utf16 = utf8_to_utf16(target_modified);
|
||||
if (resolved_target_utf16 == NULL || linkpath_utf16 == NULL) {
|
||||
if ((linkpath_utf16 = resolved_path_utf16(linkpath)) == NULL ||
|
||||
(resolved_target_utf16 = utf8_to_utf16(target_modified)) == NULL) {
|
||||
errno = ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* if chroot, get full path for target, similar to behavior in realpath() in misc.c
|
||||
note: _wfullpath() is required to resolve paths containing unicode characters */
|
||||
if (chroot_pathw != NULL &&
|
||||
(resolved_target_chroot = _wfullpath(NULL, resolved_target_utf16, 0)) != NULL &&
|
||||
file_in_chroot_jail_helper(resolved_target_chroot) != 1) {
|
||||
errno = EPERM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* unlike other platforms, we need to know whether the symbolic link target is
|
||||
* a file or a directory. the only way we can confidently do this is to
|
||||
* get the attributes of the target. therefore, our symlink() has the
|
||||
@ -1338,15 +1353,18 @@ fileio_symlink(const char *target, const char *linkpath)
|
||||
ret = 0;
|
||||
cleanup:
|
||||
|
||||
if (linkpath_resolved)
|
||||
free(linkpath_resolved);
|
||||
|
||||
if (linkpath_utf16)
|
||||
free(linkpath_utf16);
|
||||
|
||||
if (resolved_target_chroot)
|
||||
free(resolved_target_chroot);
|
||||
|
||||
if (resolved_target_utf16)
|
||||
free(resolved_target_utf16);
|
||||
|
||||
if (linkpath_resolved)
|
||||
free(linkpath_resolved);
|
||||
|
||||
if (target_resolved)
|
||||
free(target_resolved);
|
||||
|
||||
|
@ -808,7 +808,7 @@ done:
|
||||
OM_uint32
|
||||
gss_accept_sec_context(_Out_ OM_uint32 * minor_status, _Inout_opt_ gss_ctx_id_t * context_handle,
|
||||
_In_opt_ gss_cred_id_t acceptor_cred_handle, _In_ gss_buffer_t input_token_buffer, _In_opt_ gss_channel_bindings_t input_chan_bindings,
|
||||
_Out_opt_ gss_name_t * src_name, _Out_opt_ gss_OID * mech_type, _Outptr_ gss_buffer_t output_token,
|
||||
_Out_opt_ gss_name_t * src_name, _Out_opt_ gss_OID * mech_type, _Out_ gss_buffer_t output_token,
|
||||
_Out_ OM_uint32 * ret_flags, _Out_opt_ OM_uint32 * time_rec, _Outptr_opt_ gss_cred_id_t * delegated_cred_handle)
|
||||
{
|
||||
OM_uint32 ret = GSS_S_FAILURE;
|
||||
|
@ -177,7 +177,7 @@ OM_uint32
|
||||
gss_accept_sec_context(_Out_ OM_uint32 * minor_status, _Inout_opt_ gss_ctx_id_t * context_handle,
|
||||
_In_opt_ gss_cred_id_t acceptor_cred_handle, _In_ gss_buffer_t input_token_buffer,
|
||||
_In_opt_ gss_channel_bindings_t input_chan_bindings, _Out_opt_ gss_name_t * src_name,
|
||||
_Out_opt_ gss_OID * mech_type, _Outptr_ gss_buffer_t output_token, _Out_ OM_uint32 * ret_flags,
|
||||
_Out_opt_ gss_OID * mech_type, _Out_ gss_buffer_t output_token, _Out_ OM_uint32 * ret_flags,
|
||||
_Out_opt_ OM_uint32 * time_rec, _Outptr_opt_ gss_cred_id_t * delegated_cred_handle);
|
||||
|
||||
OM_uint32
|
||||
|
@ -33,6 +33,9 @@
|
||||
#define W32_SIGKILL 17
|
||||
#define W32_SIGUSR1 18
|
||||
#define W32_SIGUSR2 19
|
||||
#define W32_SIGBUS 20
|
||||
#define W32_SIGTRAP 21
|
||||
#define W32_SIGSYS 22
|
||||
|
||||
/* singprocmask "how" codes*/
|
||||
#define SIG_BLOCK 0
|
||||
@ -96,6 +99,9 @@ int sigaction(int signum, const struct sigaction * act, struct sigaction * oldac
|
||||
#define SIGKILL W32_SIGKILL
|
||||
#define SIGUSR1 W32_SIGUSR1
|
||||
#define SIGUSR2 W32_SIGUSR2
|
||||
#define SIGBUS W32_SIGBUS
|
||||
#define SIGTRAP W32_SIGTRAP
|
||||
#define SIGSYS W32_SIGSYS
|
||||
|
||||
#define SIG_DFL W32_SIG_DFL
|
||||
#define SIG_IGN W32_SIG_IGN
|
||||
|
@ -27,7 +27,7 @@ typedef struct w32_fd_set_ {
|
||||
#define FD_SETSIZE MAX_FDS
|
||||
|
||||
int w32_select(int fds, w32_fd_set * , w32_fd_set * , w32_fd_set * ,
|
||||
const struct timeval *);
|
||||
const struct w32_timeval *);
|
||||
#define select(a,b,c,d,e) w32_select((a), (b), (c), (d), (e))
|
||||
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
#pragma once
|
||||
#include <sys\utime.h>
|
||||
|
||||
#define utimbuf _utimbuf
|
||||
#define utimes w32_utimes
|
||||
|
||||
#define timeval w32_timeval
|
||||
struct timeval
|
||||
{
|
||||
long long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
|
||||
int usleep(unsigned int);
|
||||
int gettimeofday(struct timeval *, void *);
|
||||
int nanosleep(const struct timespec *, struct timespec *);
|
||||
|
@ -191,7 +191,7 @@ nanosleep(const struct timespec *req, struct timespec *rem)
|
||||
* Copyright (c) 2009, 2010 NoMachine
|
||||
* All rights reserved
|
||||
*/
|
||||
static int
|
||||
int
|
||||
gettimeofday(struct timeval *tv, void *tz)
|
||||
{
|
||||
union {
|
||||
@ -207,13 +207,13 @@ gettimeofday(struct timeval *tv, void *tz)
|
||||
us = (timehelper.ns - EPOCH_DELTA) / 10;
|
||||
|
||||
/* Stuff result into the timeval */
|
||||
tv->tv_sec = (long)(us / USEC_IN_SEC);
|
||||
tv->tv_sec = (long long)(us / USEC_IN_SEC);
|
||||
tv->tv_usec = (long)(us % USEC_IN_SEC);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
explicit_bzero(void *b, size_t len)
|
||||
{
|
||||
SecureZeroMemory(b, len);
|
||||
@ -1419,7 +1419,7 @@ is_absolute_path(const char *path)
|
||||
|
||||
/* return -1 - in case of failure, 0 - success */
|
||||
int
|
||||
create_directory_withsddl(wchar_t *path_w, wchar_t *sddl_w)
|
||||
create_directory_withsddl(wchar_t *path_w, wchar_t *sddl_w, BOOL check_permissions)
|
||||
{
|
||||
if (GetFileAttributesW(path_w) == INVALID_FILE_ATTRIBUTES) {
|
||||
PSECURITY_DESCRIPTOR pSD = NULL;
|
||||
@ -1444,12 +1444,9 @@ create_directory_withsddl(wchar_t *path_w, wchar_t *sddl_w)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else if (check_permissions) {
|
||||
// directory already exists; need to confirm permissions are correct
|
||||
if (check_secure_folder_permission(path_w, 1) != 0) {
|
||||
error("Directory already exists but folder permissions are invalid");
|
||||
return -1;
|
||||
}
|
||||
check_secure_folder_permission(path_w, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1512,15 +1509,6 @@ w32_ctime(const time_t* sourceTime)
|
||||
return ctime_s(destTime, 26, sourceTime) == 0 ? destTime : NULL;
|
||||
}
|
||||
|
||||
void
|
||||
freezero(void *ptr, size_t sz)
|
||||
{
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
explicit_bzero(ptr, sz);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
int
|
||||
setenv(const char *name, const char *value, int rewrite)
|
||||
{
|
||||
|
@ -67,9 +67,10 @@ void to_lower_case(char *s);
|
||||
void to_wlower_case(wchar_t *s);
|
||||
HANDLE get_user_token(const char* user, int impersonation);
|
||||
int load_user_profile(HANDLE user_token, char* user);
|
||||
int create_directory_withsddl(wchar_t *path, wchar_t *sddl);
|
||||
int create_directory_withsddl(wchar_t *path, wchar_t *sddl, BOOL check_permissions);
|
||||
int is_absolute_path(const char *);
|
||||
int file_in_chroot_jail(HANDLE);
|
||||
int file_in_chroot_jail_helper(wchar_t*);
|
||||
PSID lookup_sid(const wchar_t* name_utf16, PSID psid, DWORD * psid_len);
|
||||
PSID get_sid(const char*);
|
||||
int am_system();
|
||||
|
@ -37,6 +37,9 @@
|
||||
|
||||
#pragma warning(push, 3)
|
||||
|
||||
/* Pattern-list of allowed PKCS#11/Security key paths */
|
||||
char* allowed_providers = NULL;
|
||||
|
||||
int remote_add_provider;
|
||||
|
||||
int scm_start_service(DWORD, LPWSTR*);
|
||||
@ -134,8 +137,25 @@ wmain(int argc, wchar_t **wargv)
|
||||
fatal("Unknown -O option; only allow-remote-pkcs11 is supported");
|
||||
}
|
||||
}
|
||||
else if (wcsncmp(wargv[i], L"-P", 2) == 0) {
|
||||
if (allowed_providers != NULL)
|
||||
fatal("-P option already specified");
|
||||
if ((i + 1) < argc) {
|
||||
i++;
|
||||
if ((allowed_providers = utf16_to_utf8(wargv[i])) == NULL)
|
||||
fatal("Invalid argument for -P option");
|
||||
}
|
||||
else {
|
||||
fatal("Missing argument for -P option");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (allowed_providers == NULL) {
|
||||
agent_initialize_allow_list();
|
||||
}
|
||||
|
||||
if (!StartServiceCtrlDispatcherW(dispatch_table)) {
|
||||
if (GetLastError() == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
|
||||
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
|
||||
|
@ -34,9 +34,11 @@
|
||||
#include <UserEnv.h>
|
||||
#include "..\misc_internal.h"
|
||||
#include <pwd.h>
|
||||
#include "xmalloc.h"
|
||||
|
||||
#define BUFSIZE 5 * 1024
|
||||
|
||||
extern char* allowed_providers;
|
||||
extern int remote_add_provider;
|
||||
|
||||
char* sshagent_con_username;
|
||||
@ -170,11 +172,11 @@ agent_listen_loop()
|
||||
GetModuleFileNameW(NULL, module_path, PATH_MAX);
|
||||
SetHandleInformation(con, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
||||
if (remote_add_provider == 1) {
|
||||
if (swprintf_s(path, PATH_MAX, L"%s %d %s", module_path, (int)(intptr_t)con, L"-Oallow-remote-pkcs11") == -1)
|
||||
if (swprintf_s(path, PATH_MAX, L"%s %d %s -P \"%S\"", module_path, (int)(intptr_t)con, L"-Oallow-remote-pkcs11", allowed_providers) == -1)
|
||||
verbose("Failed to create child process %ls ERROR:%d", module_path, GetLastError());
|
||||
}
|
||||
else {
|
||||
if (swprintf_s(path, PATH_MAX, L"%s %d", module_path, (int)(intptr_t)con) == -1)
|
||||
if (swprintf_s(path, PATH_MAX, L"%s %d -P \"%S\"", module_path, (int)(intptr_t)con, allowed_providers) == -1)
|
||||
verbose("Failed to create child process %ls ERROR:%d", module_path, GetLastError());
|
||||
}
|
||||
if (CreateProcessW(NULL, path, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &si, &pi) == FALSE) {
|
||||
@ -408,3 +410,45 @@ agent_process_connection(HANDLE pipe)
|
||||
iocp_work(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
agent_initialize_allow_list() {
|
||||
/*
|
||||
* allowed paths for PKCS11 libraries,
|
||||
* attempt to initialize to ProgramFiles and ProgramFiles(x86) by default
|
||||
* upstream uses /usr/lib/* and /usr/local/lib/*
|
||||
*/
|
||||
size_t allowed_len = 0, prog_files_len = 0, prog_files_x86_len = 0;
|
||||
char* allowed_path = NULL, *prog_files = NULL, *prog_files_x86 = NULL;
|
||||
|
||||
_dupenv_s(&prog_files, &prog_files_len, "ProgramFiles");
|
||||
_dupenv_s(&prog_files_x86, &prog_files_x86_len, "ProgramFiles(x86)");
|
||||
|
||||
if (!prog_files && !prog_files_x86) {
|
||||
allowed_providers = xstrdup("");
|
||||
return;
|
||||
}
|
||||
|
||||
if (prog_files && prog_files_x86) {
|
||||
allowed_len = prog_files_len + 3 + prog_files_x86_len + 1;
|
||||
allowed_path = xmalloc(allowed_len);
|
||||
sprintf_s(allowed_path, allowed_len, "%s\\*,%s", prog_files, prog_files_x86);
|
||||
free(prog_files);
|
||||
free(prog_files_x86);
|
||||
}
|
||||
else if (prog_files) {
|
||||
allowed_len = prog_files_len;
|
||||
allowed_path = prog_files;
|
||||
}
|
||||
else if (prog_files_x86) {
|
||||
allowed_len = prog_files_x86_len;
|
||||
allowed_path = prog_files_x86;
|
||||
}
|
||||
|
||||
allowed_len += 3; /* for additional characters below */
|
||||
allowed_providers = xmalloc(allowed_len);
|
||||
sprintf_s(allowed_providers, allowed_len, "%s\\*", allowed_path);
|
||||
|
||||
if (allowed_path) {
|
||||
free(allowed_path);
|
||||
}
|
||||
}
|
||||
|
@ -63,3 +63,4 @@ void agent_start(BOOL);
|
||||
void agent_process_connection(HANDLE);
|
||||
void agent_shutdown();
|
||||
void agent_cleanup_connection(struct agent_connection*);
|
||||
void agent_initialize_allow_list();
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "agent.h"
|
||||
#include "agent-request.h"
|
||||
#include "config.h"
|
||||
#include "match.h"
|
||||
#include <sddl.h>
|
||||
#ifdef ENABLE_PKCS11
|
||||
#include "ssh-pkcs11.h"
|
||||
@ -44,6 +45,7 @@
|
||||
#define MAX_VALUE_NAME_LENGTH 16383
|
||||
#define MAX_VALUE_DATA_LENGTH 2048
|
||||
|
||||
extern char* allowed_providers;
|
||||
extern int remote_add_provider;
|
||||
|
||||
/*
|
||||
@ -675,6 +677,15 @@ int process_add_smartcard_key(struct sshbuf* request, struct sshbuf* response, s
|
||||
goto done;
|
||||
}
|
||||
|
||||
to_lower_case(provider);
|
||||
verbose("provider realpath: \"%.100s\"", provider);
|
||||
verbose("allowed provider paths: \"%.100s\"", allowed_providers);
|
||||
if (match_pattern_list(provider, allowed_providers, 1) != 1) {
|
||||
verbose("refusing PKCS#11 add of \"%.100s\": "
|
||||
"provider not allowed", provider);
|
||||
goto done;
|
||||
}
|
||||
|
||||
// Remove 'drive root' if exists
|
||||
if (canonical_provider[0] == '/')
|
||||
memmove(canonical_provider, canonical_provider + 1, strlen(canonical_provider));
|
||||
@ -766,6 +777,8 @@ done:
|
||||
free(pubkey_blob);
|
||||
if (provider)
|
||||
free(provider);
|
||||
if (allowed_providers)
|
||||
free(allowed_providers);
|
||||
if (pin) {
|
||||
SecureZeroMemory(pin, (DWORD)pin_len);
|
||||
free(pin);
|
||||
|
@ -48,8 +48,6 @@
|
||||
#include "tnnet.h"
|
||||
#include "misc_internal.h"
|
||||
|
||||
#define TERM_IO_BUF_SIZE 2048
|
||||
|
||||
extern int in_raw_mode;
|
||||
BOOL isFirstTime = TRUE;
|
||||
|
||||
@ -293,7 +291,10 @@ syncio_close(struct w32_io* pio)
|
||||
CancelSynchronousIo(pio->read_overlapped.hEvent);
|
||||
}
|
||||
|
||||
WaitForSingleObject(pio->read_overlapped.hEvent, INFINITE);
|
||||
// give the read thread some time to wind down, but don't block syncio_close
|
||||
if (WAIT_TIMEOUT == WaitForSingleObject(pio->read_overlapped.hEvent, 1000)) {
|
||||
debug4("read_overlapped thread timed out");
|
||||
}
|
||||
}
|
||||
|
||||
/* drain queued APCs */
|
||||
|
@ -124,11 +124,84 @@ GetModifierKey(DWORD dwControlKeyState)
|
||||
return modKey;
|
||||
}
|
||||
|
||||
// ReadConsoleForTermEmul() but for ENABLE_VIRTUAL_TERMINAL_INPUT.
|
||||
static int
|
||||
ReadConsoleForTermEmulModern(HANDLE hInput, char *destin, int destinlen)
|
||||
{
|
||||
// If the previous input ended on a lead (high) surrogate,
|
||||
// we stash it here to combine it with the next input.
|
||||
static wchar_t s_previous_lead;
|
||||
|
||||
INPUT_RECORD records[TERM_IO_BUF_SIZE_UTF16];
|
||||
DWORD records_cap = ARRAYSIZE(records);
|
||||
DWORD records_len = 0;
|
||||
wchar_t text[TERM_IO_BUF_SIZE_UTF16];
|
||||
int text_len = 0;
|
||||
|
||||
// If we'll restore the previous lead surrogate, we can only read
|
||||
// ARRAYSIZE(records)-1 records before the storage overflows.
|
||||
if (s_previous_lead) {
|
||||
records_cap--;
|
||||
}
|
||||
|
||||
// As this application heavily relies on APCs, it's important that we call
|
||||
// DataAvailable(), because it calls WaitForSingleObjectEx with bAlertable=TRUE.
|
||||
if (!DataAvailable(hInput) ||
|
||||
!ReadConsoleInputW(hInput, records, records_cap, &records_len) ||
|
||||
records_len == 0)
|
||||
return 0;
|
||||
|
||||
// Restore the previous lead surrogate if we have one.
|
||||
if (s_previous_lead) {
|
||||
text[text_len++] = s_previous_lead;
|
||||
s_previous_lead = 0;
|
||||
}
|
||||
|
||||
// Accumulate the UTF-16 text.
|
||||
for (DWORD i = 0; i < records_len; i++) {
|
||||
switch (records[i].EventType) {
|
||||
case WINDOW_BUFFER_SIZE_EVENT:
|
||||
queue_terminal_window_change_event();
|
||||
break;
|
||||
case KEY_EVENT: {
|
||||
const KEY_EVENT_RECORD* k = &records[i].Event.KeyEvent;
|
||||
if (
|
||||
// The old Windows console added support for Unicode by encoding the characters in the
|
||||
// current code page as usual, while stuffing a UCS2 value into a trailing VK_MENU event.
|
||||
// Modern terminals on Windows stopped doing this and the Windows console may as well at some point.
|
||||
(k->bKeyDown || k->wVirtualKeyCode == VK_MENU) &&
|
||||
// Current versions of ConPTY suffer from a bug where pressing modifier keys enqueues
|
||||
// a KEY_EVENT with UnicodeChar=0 despite ENABLE_VIRTUAL_TERMINAL_INPUT being enabled.
|
||||
// They can be identified by the fact that their UnicodeChar value is zero,
|
||||
// but they still have a non-zero wVirtualScanCode.
|
||||
(k->uChar.UnicodeChar != L'\0' || k->wVirtualScanCode == 0))
|
||||
text[text_len++] = k->uChar.UnicodeChar;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Pop any lone lead surrogate from the input for later.
|
||||
const wchar_t last_char = text[text_len - 1];
|
||||
if (IS_HIGH_SURROGATE(last_char)) {
|
||||
s_previous_lead = last_char;
|
||||
text_len--;
|
||||
}
|
||||
|
||||
// ...and finally convert everything to UTF-8.
|
||||
// It'll always fit, because we sized TERM_IO_BUF_SIZE to be large enough.
|
||||
return WideCharToMultiByte(CP_UTF8, 0, text, text_len, destin, destinlen, NULL, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
ReadConsoleForTermEmul(HANDLE hInput, char *destin, int destinlen)
|
||||
{
|
||||
HANDLE hHandle[] = { hInput, NULL };
|
||||
DWORD nHandle = 1;
|
||||
if (isConsoleVTSeqAvailable) {
|
||||
return ReadConsoleForTermEmulModern(hInput, destin, destinlen);
|
||||
}
|
||||
|
||||
DWORD dwInput = 0;
|
||||
DWORD rc = 0;
|
||||
unsigned char octets[20];
|
||||
@ -187,23 +260,7 @@ ReadConsoleForTermEmul(HANDLE hInput, char *destin, int destinlen)
|
||||
break;
|
||||
}
|
||||
|
||||
if (isConsoleVTSeqAvailable) {
|
||||
if (inputRecord.Event.KeyEvent.uChar.UnicodeChar != L'\0' || inputRecord.Event.KeyEvent.wVirtualScanCode == 0) {
|
||||
n = WideCharToMultiByte(
|
||||
CP_UTF8,
|
||||
0,
|
||||
&(inputRecord.Event.KeyEvent.uChar.UnicodeChar),
|
||||
1,
|
||||
(LPSTR)octets,
|
||||
20,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
WriteToBuffer((char *)octets, n);
|
||||
}
|
||||
} else {
|
||||
GetVTSeqFromKeyStroke(inputRecord);
|
||||
}
|
||||
GetVTSeqFromKeyStroke(inputRecord);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -37,6 +37,9 @@
|
||||
|
||||
#include "console.h"
|
||||
|
||||
#define TERM_IO_BUF_SIZE_UTF16 1024
|
||||
#define TERM_IO_BUF_SIZE (3 * TERM_IO_BUF_SIZE_UTF16)
|
||||
|
||||
#define UP_ARROW "\x1b[A"
|
||||
#define DOWN_ARROW "\x1b[B"
|
||||
#define RIGHT_ARROW "\x1b[C"
|
||||
|
@ -33,6 +33,8 @@
|
||||
#include <Aclapi.h>
|
||||
#include <lm.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "inc\pwd.h"
|
||||
#include "sshfileperm.h"
|
||||
@ -40,6 +42,12 @@
|
||||
#include "misc_internal.h"
|
||||
#include "config.h"
|
||||
|
||||
#define NULL_TERMINATOR_LEN 1
|
||||
#define COMMA_SPACE_LEN 2
|
||||
#define BACKSLASH_LEN 1
|
||||
|
||||
extern int log_on_stderr;
|
||||
|
||||
/*
|
||||
* The function is to check if current user is secure to access to the file.
|
||||
* Check the owner of the file is one of these types: Local Administrators groups, system account, current user account
|
||||
@ -178,18 +186,22 @@ cleanup:
|
||||
* Check the owner of the file is one of these types: Local Administrators groups or system account
|
||||
* Check the users have access permission to the file don't violate the following rules:
|
||||
1. no user other than local administrators group and system account have write permission on the folder
|
||||
* Returns 0 on success and -1 on failure
|
||||
* Logs a message if the rules are violated, but does not prevent further execution
|
||||
*/
|
||||
int
|
||||
void
|
||||
check_secure_folder_permission(const wchar_t* path_utf16, int read_ok)
|
||||
{
|
||||
PSECURITY_DESCRIPTOR pSD = NULL;
|
||||
PSID owner_sid = NULL, ti_sid = NULL;
|
||||
PACL dacl = NULL;
|
||||
DWORD error_code = ERROR_SUCCESS;
|
||||
BOOL is_valid_sid = FALSE, is_valid_acl = FALSE;
|
||||
BOOL is_valid_sid = FALSE, is_valid_acl = FALSE, need_log_msg = FALSE, is_first = TRUE;
|
||||
wchar_t* bad_user = NULL;
|
||||
int ret = 0;
|
||||
size_t log_msg_len = (DNLEN + BACKSLASH_LEN + UNLEN) * 2 + COMMA_SPACE_LEN + NULL_TERMINATOR_LEN;
|
||||
wchar_t* log_msg = (wchar_t*)malloc(log_msg_len * sizeof(wchar_t));
|
||||
if (log_msg != NULL) {
|
||||
log_msg[0] = '\0';
|
||||
}
|
||||
|
||||
/*Get the owner sid of the file.*/
|
||||
if ((error_code = GetNamedSecurityInfoW(path_utf16, SE_FILE_OBJECT,
|
||||
@ -197,18 +209,15 @@ check_secure_folder_permission(const wchar_t* path_utf16, int read_ok)
|
||||
&owner_sid, NULL, &dacl, NULL, &pSD)) != ERROR_SUCCESS) {
|
||||
printf("failed to retrieve the owner sid and dacl of file %S with error code: %d", path_utf16, error_code);
|
||||
errno = EOTHER;
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
if (((is_valid_sid = IsValidSid(owner_sid)) == FALSE) || ((is_valid_acl = IsValidAcl(dacl)) == FALSE)) {
|
||||
printf("IsValidSid: %d; is_valid_acl: %d", is_valid_sid, is_valid_acl);
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
if (!IsWellKnownSid(owner_sid, WinBuiltinAdministratorsSid) &&
|
||||
!IsWellKnownSid(owner_sid, WinLocalSystemSid)) {
|
||||
printf("Bad owner on %S", path_utf16);
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
/*
|
||||
@ -224,7 +233,6 @@ check_secure_folder_permission(const wchar_t* path_utf16, int read_ok)
|
||||
if (!GetAce(dacl, i, ¤t_ace)) {
|
||||
printf("GetAce() failed");
|
||||
errno = EOTHER;
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -247,15 +255,112 @@ check_secure_folder_permission(const wchar_t* path_utf16, int read_ok)
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
ret = -1;
|
||||
/* collect all SIDs with write permissions */
|
||||
wchar_t resolved_trustee[UNLEN + NULL_TERMINATOR_LEN] = L"UNKNOWN";
|
||||
wchar_t resolved_trustee_domain[DNLEN + NULL_TERMINATOR_LEN] = L"UNKNOWN";
|
||||
DWORD resolved_trustee_len = _countof(resolved_trustee), resolved_trustee_domain_len = _countof(resolved_trustee_domain);
|
||||
SID_NAME_USE resolved_trustee_type;
|
||||
|
||||
need_log_msg = TRUE;
|
||||
|
||||
if (log_msg != NULL &&
|
||||
LookupAccountSidW(NULL, current_trustee_sid, resolved_trustee, &resolved_trustee_len,
|
||||
resolved_trustee_domain, &resolved_trustee_domain_len, &resolved_trustee_type) != 0) {
|
||||
if (is_first) {
|
||||
_snwprintf_s(log_msg, log_msg_len, _TRUNCATE, L"%ls\\%ls", resolved_trustee_domain, resolved_trustee);
|
||||
is_first = FALSE;
|
||||
}
|
||||
else {
|
||||
size_t currentLength = wcslen(log_msg);
|
||||
size_t userLength = resolved_trustee_domain_len + BACKSLASH_LEN + resolved_trustee_len + COMMA_SPACE_LEN;
|
||||
if (wcslen(log_msg) + userLength + NULL_TERMINATOR_LEN > log_msg_len) {
|
||||
log_msg_len *= 2;
|
||||
wchar_t* temp_log_msg = (wchar_t*)malloc(log_msg_len * sizeof(wchar_t));
|
||||
if (temp_log_msg == NULL) {
|
||||
break;
|
||||
}
|
||||
wcscpy_s(temp_log_msg, log_msg_len, log_msg);
|
||||
if (log_msg)
|
||||
free(log_msg);
|
||||
log_msg = temp_log_msg;
|
||||
}
|
||||
_snwprintf_s(log_msg + currentLength, log_msg_len - currentLength, _TRUNCATE,
|
||||
L", %ls\\%ls", resolved_trustee_domain, resolved_trustee);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (need_log_msg) {
|
||||
log_folder_perms_msg_etw(path_utf16, log_msg);
|
||||
}
|
||||
cleanup:
|
||||
if (bad_user)
|
||||
if (bad_user) {
|
||||
LocalFree(bad_user);
|
||||
if (pSD)
|
||||
}
|
||||
if (log_msg) {
|
||||
free(log_msg);
|
||||
}
|
||||
if (pSD) {
|
||||
LocalFree(pSD);
|
||||
if (ti_sid)
|
||||
}
|
||||
if (ti_sid) {
|
||||
free(ti_sid);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function takes in the full path to the ProgramData\ssh folder
|
||||
* and a string of comma-separated domain\usernames. The function converts
|
||||
* the well-known built-in Administrators group sid and the Local System
|
||||
* sid to their corresponding names. With these names, and the input string,
|
||||
* it logs a message to the Event Viewer. If logging the detailed message fails,
|
||||
* a generic log message is written to the Event Viewer instead.
|
||||
*/
|
||||
void log_folder_perms_msg_etw(const wchar_t* path_utf16, wchar_t* log_msg) {
|
||||
PSID adminSid = NULL;
|
||||
WCHAR adminName[UNLEN + NULL_TERMINATOR_LEN];
|
||||
WCHAR adminDomain[DNLEN + NULL_TERMINATOR_LEN];
|
||||
DWORD adminNameSize = UNLEN + NULL_TERMINATOR_LEN;
|
||||
DWORD adminDomainSize = DNLEN + NULL_TERMINATOR_LEN;
|
||||
DWORD adminSidSize = SECURITY_MAX_SID_SIZE;
|
||||
PSID systemSid = NULL;
|
||||
WCHAR systemName[UNLEN + NULL_TERMINATOR_LEN];
|
||||
WCHAR systemDomain[DNLEN + NULL_TERMINATOR_LEN];
|
||||
DWORD systemNameSize = UNLEN + NULL_TERMINATOR_LEN;
|
||||
DWORD systemDomainSize = DNLEN + NULL_TERMINATOR_LEN;
|
||||
DWORD systemSidSize = SECURITY_MAX_SID_SIZE;
|
||||
SID_NAME_USE sidType;
|
||||
BOOL needLog = TRUE;
|
||||
int temp_log_on_stderr = log_on_stderr;
|
||||
log_on_stderr = 0;
|
||||
|
||||
adminSid = (PSID)malloc(SECURITY_MAX_SID_SIZE);
|
||||
if (log_msg != NULL && adminSid != NULL &&
|
||||
CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, adminSid, &adminSidSize) != 0 &&
|
||||
LookupAccountSidW(NULL, adminSid, adminName, &adminNameSize, adminDomain, &adminDomainSize, &sidType) != 0) {
|
||||
systemSid = (PSID)malloc(SECURITY_MAX_SID_SIZE);
|
||||
if (systemSid != NULL &&
|
||||
CreateWellKnownSid(WinLocalSystemSid, NULL, systemSid, &systemSidSize) != 0 &&
|
||||
LookupAccountSidW(NULL, systemSid, systemName, &systemNameSize, systemDomain, &systemDomainSize, &sidType) != 0) {
|
||||
logit("For '%S' folder, write access is granted to the following users: %S. "
|
||||
"Consider reviewing users to ensure that only %S\\%S, and the %S\\%S group, and its members, have write access.",
|
||||
path_utf16, log_msg, systemDomain, systemName, adminDomain, adminName);
|
||||
needLog = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (needLog) {
|
||||
/* log generic warning message in unlikely case that lookup for either well-known SID fails or user list is empty */
|
||||
logit("for '%S' folder, consider downgrading permissions for any users with unnecessary write access.", path_utf16);
|
||||
}
|
||||
|
||||
log_on_stderr = temp_log_on_stderr;
|
||||
|
||||
if (adminSid) {
|
||||
free(adminSid);
|
||||
}
|
||||
if (systemSid) {
|
||||
free(systemSid);
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "inc\sys\socket.h"
|
||||
#include "inc\sys\select.h"
|
||||
#include "inc\sys\uio.h"
|
||||
#include "inc\sys\time.h"
|
||||
#include "inc\sys\types.h"
|
||||
#include "inc\sys\stat.h"
|
||||
#include "inc\unistd.h"
|
||||
@ -88,6 +89,19 @@ fd_table_initialize()
|
||||
{
|
||||
struct w32_io *pio;
|
||||
HANDLE wh;
|
||||
char *stdio_mode_env;
|
||||
int stdio_mode = NONSOCK_SYNC_FD;
|
||||
|
||||
stdio_mode_env = getenv("OPENSSH_STDIO_MODE");
|
||||
if (stdio_mode_env != NULL) {
|
||||
if (strcmp(stdio_mode_env, "sock") == 0)
|
||||
stdio_mode = SOCK_FD;
|
||||
else if (strcmp(stdio_mode_env, "nonsock") == 0)
|
||||
stdio_mode = NONSOCK_FD;
|
||||
else if (strcmp(stdio_mode_env, "nonsock_sync") == 0)
|
||||
stdio_mode = NONSOCK_SYNC_FD;
|
||||
}
|
||||
|
||||
/* table entries representing std in, out and error*/
|
||||
DWORD wh_index[] = { STD_INPUT_HANDLE , STD_OUTPUT_HANDLE , STD_ERROR_HANDLE };
|
||||
int fd_num = 0;
|
||||
@ -104,7 +118,7 @@ fd_table_initialize()
|
||||
return -1;
|
||||
}
|
||||
memset(pio, 0, sizeof(struct w32_io));
|
||||
pio->type = NONSOCK_SYNC_FD;
|
||||
pio->type = stdio_mode;
|
||||
pio->handle = wh;
|
||||
fd_table_set(pio, fd_num);
|
||||
}
|
||||
@ -715,12 +729,11 @@ w32_fcntl(int fd, int cmd, ... /* arg */)
|
||||
int
|
||||
w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* exceptfds, const struct timeval *timeout)
|
||||
{
|
||||
ULONGLONG ticks_start = GetTickCount64(), ticks_spent;
|
||||
ULONGLONG ticks_start = GetTickCount64(), ticks_spent, timeout_ms = 0, time_rem = 0;
|
||||
w32_fd_set read_ready_fds, write_ready_fds;
|
||||
HANDLE events[SELECT_EVENT_LIMIT];
|
||||
int num_events = 0;
|
||||
int in_set_fds = 0, out_ready_fds = 0, i;
|
||||
unsigned int timeout_ms = 0, time_rem = 0;
|
||||
|
||||
errno = 0;
|
||||
/* TODO - the size of these can be reduced based on fds */
|
||||
@ -843,7 +856,7 @@ w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* excep
|
||||
else
|
||||
time_rem = INFINITE;
|
||||
|
||||
if (0 != wait_for_any_event(events, num_events, time_rem))
|
||||
if (0 != wait_for_any_event(events, num_events, (DWORD)time_rem))
|
||||
return -1;
|
||||
|
||||
/* check on fd status */
|
||||
@ -1071,7 +1084,7 @@ spawn_child_internal(const char* cmd, char *const argv[], HANDLE in, HANDLE out,
|
||||
si.hStdError = err;
|
||||
si.dwFlags = STARTF_USESTDHANDLES;
|
||||
|
||||
if (strstr(cmd, "sshd.exe")) {
|
||||
if (strstr(cmd, "sshd-session.exe")) {
|
||||
flags |= DETACHED_PROCESS;
|
||||
}
|
||||
|
||||
|
@ -190,6 +190,29 @@ check_group_membership(const char* group)
|
||||
{
|
||||
PSID sid = NULL;
|
||||
BOOL is_member = 0;
|
||||
char* utf8_group_name = NULL;
|
||||
|
||||
// it can be a SID string; if it is - use localized name for that SID
|
||||
wchar_t* group_utf16 = utf8_to_utf16(group);
|
||||
if (ConvertStringSidToSidW(group_utf16, &sid) != 0) {
|
||||
WCHAR group_name[UNLEN + 1];
|
||||
DWORD group_name_length = UNLEN + 1;
|
||||
WCHAR domain_name[DNLEN + 1] = L"";
|
||||
DWORD domain_name_size = DNLEN + 1;
|
||||
SID_NAME_USE account_type = 0;
|
||||
if (LookupAccountSidW(NULL, sid, group_name, &group_name_length,
|
||||
domain_name, &domain_name_size, &account_type) != 0) {
|
||||
utf8_group_name = utf16_to_utf8(group_name);
|
||||
debug3_f("'%s' is translated to '%s'", group, utf8_group_name);
|
||||
group = utf8_group_name;
|
||||
} else {
|
||||
debug3_f("LookupAccountSid failed for '%s'", group);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debug3_f("'%s' not recognized as SID", group);
|
||||
}
|
||||
|
||||
if ((sid = get_sid(group)) == NULL) {
|
||||
error("unable to resolve group %s", group);
|
||||
@ -202,6 +225,10 @@ check_group_membership(const char* group)
|
||||
cleanup:
|
||||
if (sid)
|
||||
free(sid);
|
||||
if (group_utf16)
|
||||
free(group_utf16);
|
||||
if (utf8_group_name)
|
||||
free(utf8_group_name);
|
||||
return is_member? 1: 0;
|
||||
}
|
||||
|
||||
@ -221,18 +248,17 @@ ga_init(const char *user, gid_t base)
|
||||
|
||||
if ((user_token = get_user_token(user_name, 0)) == NULL) {
|
||||
/*
|
||||
* TODO - We need to fatal() all the times when we fail to generate the user token.
|
||||
* No fatal call here so experience when called by servconf parsing Match block
|
||||
* is consistent for an invalid user (does not find password, but is not fatal yet)
|
||||
* and a valid user without a token (ex: group policy forbidding login)
|
||||
*/
|
||||
if (get_custom_lsa_package()) {
|
||||
error("%s, unable to resolve user %s", __func__, user_name);
|
||||
return 0;
|
||||
} else {
|
||||
fatal("%s, unable to resolve user %s", __func__, user_name);
|
||||
}
|
||||
get_custom_lsa_package();
|
||||
error("%s, unable to resolve user %s", __func__, user_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* supposed to retun number of groups associated with user
|
||||
* supposed to return number of groups associated with user
|
||||
* since we do lazy group evaluation, returning 1 here
|
||||
*/
|
||||
|
||||
|
@ -43,13 +43,12 @@ wmain(int argc, wchar_t **wargv) {
|
||||
char** argv = NULL;
|
||||
int i, r;
|
||||
_set_invalid_parameter_handler(invalid_parameter_handler);
|
||||
if (argc) {
|
||||
if ((argv = malloc(argc * sizeof(char*))) == NULL)
|
||||
if ((argv = malloc((argc + 1) * sizeof(char*))) == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < argc; i++)
|
||||
if ((argv[i] = utf16_to_utf8(wargv[i])) == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < argc; i++)
|
||||
if ((argv[i] = utf16_to_utf8(wargv[i])) == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
argv[argc] = NULL;
|
||||
|
||||
if (getenv("SSH_AUTH_SOCK") == NULL)
|
||||
_putenv("SSH_AUTH_SOCK=\\\\.\\pipe\\openssh-ssh-agent");
|
||||
|
115
contrib/win32/win32compat/wmain_sshd-session.c
Normal file
115
contrib/win32/win32compat/wmain_sshd-session.c
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Author: Manoj Ampalam <manoj.ampalam@microsoft.com>
|
||||
*
|
||||
* wmain entry for sshd-session.
|
||||
*
|
||||
* Copyright (c) 2015 Microsoft Corp.
|
||||
* All rights reserved
|
||||
*
|
||||
* Microsoft openssh win32 port
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* disable inclusion of compatability defitnitions in CRT headers */
|
||||
#define __STDC__ 1
|
||||
#include <Windows.h>
|
||||
#include <wchar.h>
|
||||
#include <Lm.h>
|
||||
#include <sddl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "inc\utf.h"
|
||||
#include "misc_internal.h"
|
||||
#include "Debug.h"
|
||||
|
||||
int main(int, char **);
|
||||
extern HANDLE main_thread;
|
||||
|
||||
int sshd_session_main(int argc, wchar_t **wargv) {
|
||||
char** argv = NULL;
|
||||
int i, r;
|
||||
_set_invalid_parameter_handler(invalid_parameter_handler);
|
||||
|
||||
if ((argv = malloc((argc + 1) * sizeof(char*))) == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
if ((argv[i] = utf16_to_utf8(wargv[i])) == NULL)
|
||||
fatal("out of memory");
|
||||
argv[argc] = NULL;
|
||||
|
||||
w32posix_initialize();
|
||||
|
||||
r = main(argc, argv);
|
||||
w32posix_done();
|
||||
return r;
|
||||
}
|
||||
|
||||
int argc_original = 0;
|
||||
wchar_t **wargv_original = NULL;
|
||||
|
||||
int wmain(int argc, wchar_t **wargv) {
|
||||
wchar_t *path_value = NULL, *path_new_value;
|
||||
errno_t result = 0;
|
||||
size_t path_new_len = 0, len;
|
||||
argc_original = argc;
|
||||
wargv_original = wargv;
|
||||
|
||||
init_prog_paths();
|
||||
/* change current directory to sshd-session.exe root */
|
||||
_wchdir(__wprogdir);
|
||||
|
||||
/*
|
||||
* we want to launch scp and sftp executables from the binary directory
|
||||
* that sshd is hosted in. This will facilitate hosting and evaluating
|
||||
* multiple versions of OpenSSH at the same time.
|
||||
* it does not work well for powershell, cygwin, etc if program path is
|
||||
* prepended to executable directory.
|
||||
* To achive above, PATH is set to process environment
|
||||
*/
|
||||
_wdupenv_s(&path_value, &len, L"PATH");
|
||||
if (!path_value || (wcsstr(path_value, __wprogdir)) == NULL) {
|
||||
path_new_len = wcslen(__wprogdir) + wcslen(path_value) + 2;
|
||||
if ((path_new_value = (wchar_t *) malloc(path_new_len * sizeof(wchar_t))) == NULL) {
|
||||
errno = ENOMEM;
|
||||
error("failed to allocation memory");
|
||||
return -1;
|
||||
}
|
||||
swprintf_s(path_new_value, path_new_len, L"%s%s%s", __wprogdir, path_value ? L";" : L"", path_value);
|
||||
if (result = _wputenv_s(L"PATH", path_new_value)) {
|
||||
error("failed to set PATH environment variable: to value:%s, error:%d", path_new_value, result);
|
||||
errno = result;
|
||||
if (path_new_value)
|
||||
free(path_new_value);
|
||||
if(path_value)
|
||||
free(path_value);
|
||||
return -1;
|
||||
}
|
||||
if (path_new_value)
|
||||
free(path_new_value);
|
||||
if(path_value)
|
||||
free(path_value);
|
||||
}
|
||||
|
||||
return sshd_session_main(argc, wargv);
|
||||
}
|
@ -135,7 +135,7 @@ create_prgdata_ssh_folder()
|
||||
wchar_t ssh_cfg_dir[PATH_MAX] = { 0, };
|
||||
wcscpy_s(ssh_cfg_dir, _countof(ssh_cfg_dir), __wprogdata);
|
||||
wcscat_s(ssh_cfg_dir, _countof(ssh_cfg_dir), L"\\ssh");
|
||||
if (create_directory_withsddl(ssh_cfg_dir, L"O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;AU)") < 0) {
|
||||
if (create_directory_withsddl(ssh_cfg_dir, L"O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;AU)", TRUE) < 0) {
|
||||
printf("failed to create %S", ssh_cfg_dir);
|
||||
exit(255);
|
||||
}
|
||||
@ -144,7 +144,7 @@ create_prgdata_ssh_folder()
|
||||
wchar_t logs_dir[PATH_MAX] = { 0, };
|
||||
wcscat_s(logs_dir, _countof(logs_dir), ssh_cfg_dir);
|
||||
wcscat_s(logs_dir, _countof(logs_dir), L"\\logs");
|
||||
if (create_directory_withsddl(logs_dir, L"O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)") < 0) {
|
||||
if (create_directory_withsddl(logs_dir, L"O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)", FALSE) < 0) {
|
||||
printf("failed to create %S", logs_dir);
|
||||
exit(255);
|
||||
}
|
||||
@ -202,15 +202,14 @@ int sshd_main(int argc, wchar_t **wargv) {
|
||||
int i, r;
|
||||
_set_invalid_parameter_handler(invalid_parameter_handler);
|
||||
|
||||
if (argc) {
|
||||
if ((argv = malloc(argc * sizeof(char*))) == NULL) {
|
||||
printf("out of memory");
|
||||
exit(255);
|
||||
}
|
||||
if ((argv = malloc((argc + 1) * sizeof(char*))) == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
argv[i] = utf16_to_utf8(wargv[i]);
|
||||
}
|
||||
for (i = 0; i < argc; i++)
|
||||
if ((argv[i] = utf16_to_utf8(wargv[i])) == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
argv[argc] = NULL;
|
||||
|
||||
w32posix_initialize();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: ed25519.sh,v 1.1 2023/01/15 23:05:32 djm Exp $
|
||||
# $OpenBSD: ed25519.sh,v 1.2 2024/05/17 02:39:11 jsg Exp $
|
||||
# Placed in the Public Domain.
|
||||
#
|
||||
AUTHOR="supercop-20221122/crypto_sign/ed25519/ref/implementors"
|
||||
@ -74,7 +74,7 @@ for i in $FILES; do
|
||||
sed -e "s/crypto_sign_open/crypto_sign_ed25519_open/g"
|
||||
;;
|
||||
*/crypto_sign/ed25519/ref/fe25519.*)
|
||||
# avoid a couple of name collions with other files
|
||||
# avoid a couple of name collisions with other files
|
||||
sed -e "s/reduce_add_sub/fe25519_reduce_add_sub/g" \
|
||||
-e "s/ equal[(]/ fe25519_equal(/g" \
|
||||
-e "s/^int /static int /g"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gss-genr.c,v 1.28 2021/01/27 10:05:28 djm Exp $ */
|
||||
/* $OpenBSD: gss-genr.c,v 1.29 2024/02/01 02:37:33 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
|
||||
@ -278,7 +278,7 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
|
||||
gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"};
|
||||
|
||||
/* RFC 4462 says we MUST NOT do SPNEGO */
|
||||
if (oid->length == spnego_oid.length &&
|
||||
if (oid->length == spnego_oid.length &&
|
||||
(memcmp(oid->elements, spnego_oid.elements, oid->length) == 0))
|
||||
return 0; /* false */
|
||||
|
||||
@ -286,7 +286,7 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
|
||||
ssh_gssapi_set_oid(*ctx, oid);
|
||||
major = ssh_gssapi_import_name(*ctx, host);
|
||||
if (!GSS_ERROR(major)) {
|
||||
major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
|
||||
major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
|
||||
NULL);
|
||||
gss_release_buffer(&minor, &token);
|
||||
if ((*ctx)->context != GSS_C_NO_CONTEXT)
|
||||
@ -294,7 +294,7 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
|
||||
GSS_C_NO_BUFFER);
|
||||
}
|
||||
|
||||
if (GSS_ERROR(major))
|
||||
if (GSS_ERROR(major))
|
||||
ssh_gssapi_delete_ctx(ctx);
|
||||
|
||||
return (!GSS_ERROR(major));
|
||||
|
330
kex-names.c
Normal file
330
kex-names.c
Normal file
@ -0,0 +1,330 @@
|
||||
/* $OpenBSD: kex-names.c,v 1.1 2024/05/17 00:32:32 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef WITH_OPENSSL
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/evp.h>
|
||||
#endif
|
||||
|
||||
#include "kex.h"
|
||||
#include "log.h"
|
||||
#include "match.h"
|
||||
#include "digest.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "ssherr.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
struct kexalg {
|
||||
char *name;
|
||||
u_int type;
|
||||
int ec_nid;
|
||||
int hash_alg;
|
||||
};
|
||||
static const struct kexalg kexalgs[] = {
|
||||
#ifdef WITH_OPENSSL
|
||||
{ KEX_DH1, KEX_DH_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
{ KEX_DH14_SHA1, KEX_DH_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
{ KEX_DH14_SHA256, KEX_DH_GRP14_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
{ KEX_DH16_SHA512, KEX_DH_GRP16_SHA512, 0, SSH_DIGEST_SHA512 },
|
||||
{ KEX_DH18_SHA512, KEX_DH_GRP18_SHA512, 0, SSH_DIGEST_SHA512 },
|
||||
{ KEX_DHGEX_SHA1, KEX_DH_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
#ifdef HAVE_EVP_SHA256
|
||||
{ KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
#endif /* HAVE_EVP_SHA256 */
|
||||
#ifdef OPENSSL_HAS_ECC
|
||||
{ KEX_ECDH_SHA2_NISTP256, KEX_ECDH_SHA2,
|
||||
NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
|
||||
{ KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1,
|
||||
SSH_DIGEST_SHA384 },
|
||||
# ifdef OPENSSL_HAS_NISTP521
|
||||
{ KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1,
|
||||
SSH_DIGEST_SHA512 },
|
||||
# endif /* OPENSSL_HAS_NISTP521 */
|
||||
#endif /* OPENSSL_HAS_ECC */
|
||||
#endif /* WITH_OPENSSL */
|
||||
#if defined(HAVE_EVP_SHA256) || !defined(WITH_OPENSSL)
|
||||
{ KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
{ KEX_CURVE25519_SHA256_OLD, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
#ifdef USE_SNTRUP761X25519
|
||||
{ KEX_SNTRUP761X25519_SHA512, KEX_KEM_SNTRUP761X25519_SHA512, 0,
|
||||
SSH_DIGEST_SHA512 },
|
||||
#endif
|
||||
#endif /* HAVE_EVP_SHA256 || !WITH_OPENSSL */
|
||||
{ NULL, 0, -1, -1},
|
||||
};
|
||||
|
||||
char *
|
||||
kex_alg_list(char sep)
|
||||
{
|
||||
char *ret = NULL, *tmp;
|
||||
size_t nlen, rlen = 0;
|
||||
const struct kexalg *k;
|
||||
|
||||
for (k = kexalgs; k->name != NULL; k++) {
|
||||
if (ret != NULL)
|
||||
ret[rlen++] = sep;
|
||||
nlen = strlen(k->name);
|
||||
if ((tmp = realloc(ret, rlen + nlen + 2)) == NULL) {
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
ret = tmp;
|
||||
memcpy(ret + rlen, k->name, nlen + 1);
|
||||
rlen += nlen;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct kexalg *
|
||||
kex_alg_by_name(const char *name)
|
||||
{
|
||||
const struct kexalg *k;
|
||||
|
||||
for (k = kexalgs; k->name != NULL; k++) {
|
||||
if (strcmp(k->name, name) == 0)
|
||||
return k;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
kex_name_valid(const char *name)
|
||||
{
|
||||
return kex_alg_by_name(name) != NULL;
|
||||
}
|
||||
|
||||
u_int
|
||||
kex_type_from_name(const char *name)
|
||||
{
|
||||
const struct kexalg *k;
|
||||
|
||||
if ((k = kex_alg_by_name(name)) == NULL)
|
||||
return 0;
|
||||
return k->type;
|
||||
}
|
||||
|
||||
int
|
||||
kex_hash_from_name(const char *name)
|
||||
{
|
||||
const struct kexalg *k;
|
||||
|
||||
if ((k = kex_alg_by_name(name)) == NULL)
|
||||
return -1;
|
||||
return k->hash_alg;
|
||||
}
|
||||
|
||||
int
|
||||
kex_nid_from_name(const char *name)
|
||||
{
|
||||
const struct kexalg *k;
|
||||
|
||||
if ((k = kex_alg_by_name(name)) == NULL)
|
||||
return -1;
|
||||
return k->ec_nid;
|
||||
}
|
||||
|
||||
/* Validate KEX method name list */
|
||||
int
|
||||
kex_names_valid(const char *names)
|
||||
{
|
||||
char *s, *cp, *p;
|
||||
|
||||
if (names == NULL || strcmp(names, "") == 0)
|
||||
return 0;
|
||||
if ((s = cp = strdup(names)) == NULL)
|
||||
return 0;
|
||||
for ((p = strsep(&cp, ",")); p && *p != '\0';
|
||||
(p = strsep(&cp, ","))) {
|
||||
if (kex_alg_by_name(p) == NULL) {
|
||||
error("Unsupported KEX algorithm \"%.100s\"", p);
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
debug3("kex names ok: [%s]", names);
|
||||
free(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* returns non-zero if proposal contains any algorithm from algs */
|
||||
int
|
||||
kex_has_any_alg(const char *proposal, const char *algs)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||
return 0;
|
||||
free(cp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Concatenate algorithm names, avoiding duplicates in the process.
|
||||
* Caller must free returned string.
|
||||
*/
|
||||
char *
|
||||
kex_names_cat(const char *a, const char *b)
|
||||
{
|
||||
char *ret = NULL, *tmp = NULL, *cp, *p;
|
||||
size_t len;
|
||||
|
||||
if (a == NULL || *a == '\0')
|
||||
return strdup(b);
|
||||
if (b == NULL || *b == '\0')
|
||||
return strdup(a);
|
||||
if (strlen(b) > 1024*1024)
|
||||
return NULL;
|
||||
len = strlen(a) + strlen(b) + 2;
|
||||
if ((tmp = cp = strdup(b)) == NULL ||
|
||||
(ret = calloc(1, len)) == NULL) {
|
||||
free(tmp);
|
||||
return NULL;
|
||||
}
|
||||
strlcpy(ret, a, len);
|
||||
for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
|
||||
if (kex_has_any_alg(ret, p))
|
||||
continue; /* Algorithm already present */
|
||||
if (strlcat(ret, ",", len) >= len ||
|
||||
strlcat(ret, p, len) >= len) {
|
||||
free(tmp);
|
||||
free(ret);
|
||||
return NULL; /* Shouldn't happen */
|
||||
}
|
||||
}
|
||||
free(tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assemble a list of algorithms from a default list and a string from a
|
||||
* configuration file. The user-provided string may begin with '+' to
|
||||
* indicate that it should be appended to the default, '-' that the
|
||||
* specified names should be removed, or '^' that they should be placed
|
||||
* at the head.
|
||||
*/
|
||||
int
|
||||
kex_assemble_names(char **listp, const char *def, const char *all)
|
||||
{
|
||||
char *cp, *tmp, *patterns;
|
||||
char *list = NULL, *ret = NULL, *matching = NULL, *opatterns = NULL;
|
||||
int r = SSH_ERR_INTERNAL_ERROR;
|
||||
|
||||
if (listp == NULL || def == NULL || all == NULL)
|
||||
return SSH_ERR_INVALID_ARGUMENT;
|
||||
|
||||
if (*listp == NULL || **listp == '\0') {
|
||||
if ((*listp = strdup(def)) == NULL)
|
||||
return SSH_ERR_ALLOC_FAIL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
list = *listp;
|
||||
*listp = NULL;
|
||||
if (*list == '+') {
|
||||
/* Append names to default list */
|
||||
if ((tmp = kex_names_cat(def, list + 1)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
list = tmp;
|
||||
} else if (*list == '-') {
|
||||
/* Remove names from default list */
|
||||
if ((*listp = match_filter_denylist(def, list + 1)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
/* filtering has already been done */
|
||||
return 0;
|
||||
} else if (*list == '^') {
|
||||
/* Place names at head of default list */
|
||||
if ((tmp = kex_names_cat(list + 1, def)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
list = tmp;
|
||||
} else {
|
||||
/* Explicit list, overrides default - just use "list" as is */
|
||||
}
|
||||
|
||||
/*
|
||||
* The supplied names may be a pattern-list. For the -list case,
|
||||
* the patterns are applied above. For the +list and explicit list
|
||||
* cases we need to do it now.
|
||||
*/
|
||||
ret = NULL;
|
||||
if ((patterns = opatterns = strdup(list)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
/* Apply positive (i.e. non-negated) patterns from the list */
|
||||
while ((cp = strsep(&patterns, ",")) != NULL) {
|
||||
if (*cp == '!') {
|
||||
/* negated matches are not supported here */
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto fail;
|
||||
}
|
||||
free(matching);
|
||||
if ((matching = match_filter_allowlist(all, cp)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
if ((tmp = kex_names_cat(ret, matching)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(ret);
|
||||
ret = tmp;
|
||||
}
|
||||
if (ret == NULL || *ret == '\0') {
|
||||
/* An empty name-list is an error */
|
||||
/* XXX better error code? */
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* success */
|
||||
*listp = ret;
|
||||
ret = NULL;
|
||||
r = 0;
|
||||
|
||||
fail:
|
||||
free(matching);
|
||||
free(opatterns);
|
||||
free(list);
|
||||
free(ret);
|
||||
return r;
|
||||
}
|
526
kex.c
526
kex.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kex.c,v 1.181 2023/08/28 03:28:43 djm Exp $ */
|
||||
/* $OpenBSD: kex.c,v 1.186 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -85,254 +85,6 @@ static const char * const proposal_names[PROPOSAL_MAX] = {
|
||||
"languages stoc",
|
||||
};
|
||||
|
||||
struct kexalg {
|
||||
char *name;
|
||||
u_int type;
|
||||
int ec_nid;
|
||||
int hash_alg;
|
||||
};
|
||||
static const struct kexalg kexalgs[] = {
|
||||
#ifdef WITH_OPENSSL
|
||||
{ KEX_DH1, KEX_DH_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
{ KEX_DH14_SHA1, KEX_DH_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
{ KEX_DH14_SHA256, KEX_DH_GRP14_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
{ KEX_DH16_SHA512, KEX_DH_GRP16_SHA512, 0, SSH_DIGEST_SHA512 },
|
||||
{ KEX_DH18_SHA512, KEX_DH_GRP18_SHA512, 0, SSH_DIGEST_SHA512 },
|
||||
{ KEX_DHGEX_SHA1, KEX_DH_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
|
||||
#ifdef HAVE_EVP_SHA256
|
||||
{ KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
#endif /* HAVE_EVP_SHA256 */
|
||||
#ifdef OPENSSL_HAS_ECC
|
||||
{ KEX_ECDH_SHA2_NISTP256, KEX_ECDH_SHA2,
|
||||
NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
|
||||
{ KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1,
|
||||
SSH_DIGEST_SHA384 },
|
||||
# ifdef OPENSSL_HAS_NISTP521
|
||||
{ KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1,
|
||||
SSH_DIGEST_SHA512 },
|
||||
# endif /* OPENSSL_HAS_NISTP521 */
|
||||
#endif /* OPENSSL_HAS_ECC */
|
||||
#endif /* WITH_OPENSSL */
|
||||
#if defined(HAVE_EVP_SHA256) || !defined(WITH_OPENSSL)
|
||||
{ KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
{ KEX_CURVE25519_SHA256_OLD, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
|
||||
#ifdef USE_SNTRUP761X25519
|
||||
{ KEX_SNTRUP761X25519_SHA512, KEX_KEM_SNTRUP761X25519_SHA512, 0,
|
||||
SSH_DIGEST_SHA512 },
|
||||
#endif
|
||||
#endif /* HAVE_EVP_SHA256 || !WITH_OPENSSL */
|
||||
{ NULL, 0, -1, -1},
|
||||
};
|
||||
|
||||
char *
|
||||
kex_alg_list(char sep)
|
||||
{
|
||||
char *ret = NULL, *tmp;
|
||||
size_t nlen, rlen = 0;
|
||||
const struct kexalg *k;
|
||||
|
||||
for (k = kexalgs; k->name != NULL; k++) {
|
||||
if (ret != NULL)
|
||||
ret[rlen++] = sep;
|
||||
nlen = strlen(k->name);
|
||||
if ((tmp = realloc(ret, rlen + nlen + 2)) == NULL) {
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
ret = tmp;
|
||||
memcpy(ret + rlen, k->name, nlen + 1);
|
||||
rlen += nlen;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct kexalg *
|
||||
kex_alg_by_name(const char *name)
|
||||
{
|
||||
const struct kexalg *k;
|
||||
|
||||
for (k = kexalgs; k->name != NULL; k++) {
|
||||
if (strcmp(k->name, name) == 0)
|
||||
return k;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Validate KEX method name list */
|
||||
int
|
||||
kex_names_valid(const char *names)
|
||||
{
|
||||
char *s, *cp, *p;
|
||||
|
||||
if (names == NULL || strcmp(names, "") == 0)
|
||||
return 0;
|
||||
if ((s = cp = strdup(names)) == NULL)
|
||||
return 0;
|
||||
for ((p = strsep(&cp, ",")); p && *p != '\0';
|
||||
(p = strsep(&cp, ","))) {
|
||||
if (kex_alg_by_name(p) == NULL) {
|
||||
error("Unsupported KEX algorithm \"%.100s\"", p);
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
debug3("kex names ok: [%s]", names);
|
||||
free(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* returns non-zero if proposal contains any algorithm from algs */
|
||||
static int
|
||||
has_any_alg(const char *proposal, const char *algs)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||
return 0;
|
||||
free(cp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Concatenate algorithm names, avoiding duplicates in the process.
|
||||
* Caller must free returned string.
|
||||
*/
|
||||
char *
|
||||
kex_names_cat(const char *a, const char *b)
|
||||
{
|
||||
char *ret = NULL, *tmp = NULL, *cp, *p;
|
||||
size_t len;
|
||||
|
||||
if (a == NULL || *a == '\0')
|
||||
return strdup(b);
|
||||
if (b == NULL || *b == '\0')
|
||||
return strdup(a);
|
||||
if (strlen(b) > 1024*1024)
|
||||
return NULL;
|
||||
len = strlen(a) + strlen(b) + 2;
|
||||
if ((tmp = cp = strdup(b)) == NULL ||
|
||||
(ret = calloc(1, len)) == NULL) {
|
||||
free(tmp);
|
||||
return NULL;
|
||||
}
|
||||
strlcpy(ret, a, len);
|
||||
for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
|
||||
if (has_any_alg(ret, p))
|
||||
continue; /* Algorithm already present */
|
||||
if (strlcat(ret, ",", len) >= len ||
|
||||
strlcat(ret, p, len) >= len) {
|
||||
free(tmp);
|
||||
free(ret);
|
||||
return NULL; /* Shouldn't happen */
|
||||
}
|
||||
}
|
||||
free(tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assemble a list of algorithms from a default list and a string from a
|
||||
* configuration file. The user-provided string may begin with '+' to
|
||||
* indicate that it should be appended to the default, '-' that the
|
||||
* specified names should be removed, or '^' that they should be placed
|
||||
* at the head.
|
||||
*/
|
||||
int
|
||||
kex_assemble_names(char **listp, const char *def, const char *all)
|
||||
{
|
||||
char *cp, *tmp, *patterns;
|
||||
char *list = NULL, *ret = NULL, *matching = NULL, *opatterns = NULL;
|
||||
int r = SSH_ERR_INTERNAL_ERROR;
|
||||
|
||||
if (listp == NULL || def == NULL || all == NULL)
|
||||
return SSH_ERR_INVALID_ARGUMENT;
|
||||
|
||||
if (*listp == NULL || **listp == '\0') {
|
||||
if ((*listp = strdup(def)) == NULL)
|
||||
return SSH_ERR_ALLOC_FAIL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
list = *listp;
|
||||
*listp = NULL;
|
||||
if (*list == '+') {
|
||||
/* Append names to default list */
|
||||
if ((tmp = kex_names_cat(def, list + 1)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
list = tmp;
|
||||
} else if (*list == '-') {
|
||||
/* Remove names from default list */
|
||||
if ((*listp = match_filter_denylist(def, list + 1)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
/* filtering has already been done */
|
||||
return 0;
|
||||
} else if (*list == '^') {
|
||||
/* Place names at head of default list */
|
||||
if ((tmp = kex_names_cat(list + 1, def)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(list);
|
||||
list = tmp;
|
||||
} else {
|
||||
/* Explicit list, overrides default - just use "list" as is */
|
||||
}
|
||||
|
||||
/*
|
||||
* The supplied names may be a pattern-list. For the -list case,
|
||||
* the patterns are applied above. For the +list and explicit list
|
||||
* cases we need to do it now.
|
||||
*/
|
||||
ret = NULL;
|
||||
if ((patterns = opatterns = strdup(list)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
/* Apply positive (i.e. non-negated) patterns from the list */
|
||||
while ((cp = strsep(&patterns, ",")) != NULL) {
|
||||
if (*cp == '!') {
|
||||
/* negated matches are not supported here */
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto fail;
|
||||
}
|
||||
free(matching);
|
||||
if ((matching = match_filter_allowlist(all, cp)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
if ((tmp = kex_names_cat(ret, matching)) == NULL) {
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
goto fail;
|
||||
}
|
||||
free(ret);
|
||||
ret = tmp;
|
||||
}
|
||||
if (ret == NULL || *ret == '\0') {
|
||||
/* An empty name-list is an error */
|
||||
/* XXX better error code? */
|
||||
r = SSH_ERR_INVALID_ARGUMENT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* success */
|
||||
*listp = ret;
|
||||
ret = NULL;
|
||||
r = 0;
|
||||
|
||||
fail:
|
||||
free(matching);
|
||||
free(opatterns);
|
||||
free(list);
|
||||
free(ret);
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fill out a proposal array with dynamically allocated values, which may
|
||||
* be modified as required for compatibility reasons.
|
||||
@ -357,7 +109,7 @@ kex_proposal_populate_entries(struct ssh *ssh, char *prop[PROPOSAL_MAX],
|
||||
if (kexalgos == NULL)
|
||||
kexalgos = defprop[PROPOSAL_KEX_ALGS];
|
||||
if ((cp = kex_names_cat(kexalgos, ssh->kex->server ?
|
||||
"kex-strict-s-v00@openssh.com" :
|
||||
"ext-info-s,kex-strict-s-v00@openssh.com" :
|
||||
"ext-info-c,kex-strict-c-v00@openssh.com")) == NULL)
|
||||
fatal_f("kex_names_cat");
|
||||
|
||||
@ -509,36 +261,138 @@ kex_reset_dispatch(struct ssh *ssh)
|
||||
SSH2_MSG_TRANSPORT_MAX, &kex_protocol_error);
|
||||
}
|
||||
|
||||
void
|
||||
kex_set_server_sig_algs(struct ssh *ssh, const char *allowed_algs)
|
||||
{
|
||||
char *alg, *oalgs, *algs, *sigalgs;
|
||||
const char *sigalg;
|
||||
|
||||
/*
|
||||
* NB. allowed algorithms may contain certificate algorithms that
|
||||
* map to a specific plain signature type, e.g.
|
||||
* rsa-sha2-512-cert-v01@openssh.com => rsa-sha2-512
|
||||
* We need to be careful here to match these, retain the mapping
|
||||
* and only add each signature algorithm once.
|
||||
*/
|
||||
if ((sigalgs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
|
||||
fatal_f("sshkey_alg_list failed");
|
||||
oalgs = algs = xstrdup(allowed_algs);
|
||||
free(ssh->kex->server_sig_algs);
|
||||
ssh->kex->server_sig_algs = NULL;
|
||||
for ((alg = strsep(&algs, ",")); alg != NULL && *alg != '\0';
|
||||
(alg = strsep(&algs, ","))) {
|
||||
if ((sigalg = sshkey_sigalg_by_name(alg)) == NULL)
|
||||
continue;
|
||||
if (!kex_has_any_alg(sigalg, sigalgs))
|
||||
continue;
|
||||
/* Don't add an algorithm twice. */
|
||||
if (ssh->kex->server_sig_algs != NULL &&
|
||||
kex_has_any_alg(sigalg, ssh->kex->server_sig_algs))
|
||||
continue;
|
||||
xextendf(&ssh->kex->server_sig_algs, ",", "%s", sigalg);
|
||||
}
|
||||
free(oalgs);
|
||||
free(sigalgs);
|
||||
if (ssh->kex->server_sig_algs == NULL)
|
||||
ssh->kex->server_sig_algs = xstrdup("");
|
||||
}
|
||||
|
||||
static int
|
||||
kex_send_ext_info(struct ssh *ssh)
|
||||
kex_compose_ext_info_server(struct ssh *ssh, struct sshbuf *m)
|
||||
{
|
||||
int r;
|
||||
char *algs;
|
||||
|
||||
debug("Sending SSH2_MSG_EXT_INFO");
|
||||
if ((algs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
|
||||
if (ssh->kex->server_sig_algs == NULL &&
|
||||
(ssh->kex->server_sig_algs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
|
||||
return SSH_ERR_ALLOC_FAIL;
|
||||
/* XXX filter algs list by allowed pubkey/hostbased types */
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
|
||||
(r = sshpkt_put_u32(ssh, 3)) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, algs)) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh,
|
||||
if ((r = sshbuf_put_u32(m, 3)) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, "server-sig-algs")) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, ssh->kex->server_sig_algs)) != 0 ||
|
||||
(r = sshbuf_put_cstring(m,
|
||||
"publickey-hostbound@openssh.com")) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, "0")) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, "ping@openssh.com")) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, "0")) != 0 ||
|
||||
(r = sshpkt_send(ssh)) != 0) {
|
||||
(r = sshbuf_put_cstring(m, "0")) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, "ping@openssh.com")) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, "0")) != 0) {
|
||||
error_fr(r, "compose");
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
kex_compose_ext_info_client(struct ssh *ssh, struct sshbuf *m)
|
||||
{
|
||||
int r;
|
||||
|
||||
if ((r = sshbuf_put_u32(m, 1)) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, "ext-info-in-auth@openssh.com")) != 0 ||
|
||||
(r = sshbuf_put_cstring(m, "0")) != 0) {
|
||||
error_fr(r, "compose");
|
||||
goto out;
|
||||
}
|
||||
/* success */
|
||||
r = 0;
|
||||
out:
|
||||
free(algs);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int
|
||||
kex_maybe_send_ext_info(struct ssh *ssh)
|
||||
{
|
||||
int r;
|
||||
struct sshbuf *m = NULL;
|
||||
|
||||
if ((ssh->kex->flags & KEX_INITIAL) == 0)
|
||||
return 0;
|
||||
if (!ssh->kex->ext_info_c && !ssh->kex->ext_info_s)
|
||||
return 0;
|
||||
|
||||
/* Compose EXT_INFO packet. */
|
||||
if ((m = sshbuf_new()) == NULL)
|
||||
fatal_f("sshbuf_new failed");
|
||||
if (ssh->kex->ext_info_c &&
|
||||
(r = kex_compose_ext_info_server(ssh, m)) != 0)
|
||||
goto fail;
|
||||
if (ssh->kex->ext_info_s &&
|
||||
(r = kex_compose_ext_info_client(ssh, m)) != 0)
|
||||
goto fail;
|
||||
|
||||
/* Send the actual KEX_INFO packet */
|
||||
debug("Sending SSH2_MSG_EXT_INFO");
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
|
||||
(r = sshpkt_putb(ssh, m)) != 0 ||
|
||||
(r = sshpkt_send(ssh)) != 0) {
|
||||
error_f("send EXT_INFO");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
r = 0;
|
||||
|
||||
fail:
|
||||
sshbuf_free(m);
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
kex_server_update_ext_info(struct ssh *ssh)
|
||||
{
|
||||
int r;
|
||||
|
||||
if ((ssh->kex->flags & KEX_HAS_EXT_INFO_IN_AUTH) == 0)
|
||||
return 0;
|
||||
|
||||
debug_f("Sending SSH2_MSG_EXT_INFO");
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
|
||||
(r = sshpkt_put_u32(ssh, 1)) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, ssh->kex->server_sig_algs)) != 0 ||
|
||||
(r = sshpkt_send(ssh)) != 0) {
|
||||
error_f("send EXT_INFO");
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
kex_send_newkeys(struct ssh *ssh)
|
||||
{
|
||||
@ -550,9 +404,8 @@ kex_send_newkeys(struct ssh *ssh)
|
||||
return r;
|
||||
debug("SSH2_MSG_NEWKEYS sent");
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_input_newkeys);
|
||||
if (ssh->kex->ext_info_c && (ssh->kex->flags & KEX_INITIAL) != 0)
|
||||
if ((r = kex_send_ext_info(ssh)) != 0)
|
||||
return r;
|
||||
if ((r = kex_maybe_send_ext_info(ssh)) != 0)
|
||||
return r;
|
||||
debug("expecting SSH2_MSG_NEWKEYS");
|
||||
return 0;
|
||||
}
|
||||
@ -574,10 +427,61 @@ kex_ext_info_check_ver(struct kex *kex, const char *name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
kex_ext_info_client_parse(struct ssh *ssh, const char *name,
|
||||
const u_char *value, size_t vlen)
|
||||
{
|
||||
int r;
|
||||
|
||||
/* NB. some messages are only accepted in the initial EXT_INFO */
|
||||
if (strcmp(name, "server-sig-algs") == 0) {
|
||||
/* Ensure no \0 lurking in value */
|
||||
if (memchr(value, '\0', vlen) != NULL) {
|
||||
error_f("nul byte in %s", name);
|
||||
return SSH_ERR_INVALID_FORMAT;
|
||||
}
|
||||
debug_f("%s=<%s>", name, value);
|
||||
free(ssh->kex->server_sig_algs);
|
||||
ssh->kex->server_sig_algs = xstrdup((const char *)value);
|
||||
} else if (ssh->kex->ext_info_received == 1 &&
|
||||
strcmp(name, "publickey-hostbound@openssh.com") == 0) {
|
||||
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
|
||||
"0", KEX_HAS_PUBKEY_HOSTBOUND)) != 0) {
|
||||
return r;
|
||||
}
|
||||
} else if (ssh->kex->ext_info_received == 1 &&
|
||||
strcmp(name, "ping@openssh.com") == 0) {
|
||||
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
|
||||
"0", KEX_HAS_PING)) != 0) {
|
||||
return r;
|
||||
}
|
||||
} else
|
||||
debug_f("%s (unrecognised)", name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
kex_ext_info_server_parse(struct ssh *ssh, const char *name,
|
||||
const u_char *value, size_t vlen)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (strcmp(name, "ext-info-in-auth@openssh.com") == 0) {
|
||||
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
|
||||
"0", KEX_HAS_EXT_INFO_IN_AUTH)) != 0) {
|
||||
return r;
|
||||
}
|
||||
} else
|
||||
debug_f("%s (unrecognised)", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||
{
|
||||
struct kex *kex = ssh->kex;
|
||||
const int max_ext_info = kex->server ? 1 : 2;
|
||||
u_int32_t i, ninfo;
|
||||
char *name;
|
||||
u_char *val;
|
||||
@ -585,6 +489,10 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||
int r;
|
||||
|
||||
debug("SSH2_MSG_EXT_INFO received");
|
||||
if (++kex->ext_info_received > max_ext_info) {
|
||||
error("too many SSH2_MSG_EXT_INFO messages sent by peer");
|
||||
return dispatch_protocol_error(type, seq, ssh);
|
||||
}
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error);
|
||||
if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0)
|
||||
return r;
|
||||
@ -600,34 +508,16 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||
free(name);
|
||||
return r;
|
||||
}
|
||||
if (strcmp(name, "server-sig-algs") == 0) {
|
||||
/* Ensure no \0 lurking in value */
|
||||
if (memchr(val, '\0', vlen) != NULL) {
|
||||
error_f("nul byte in %s", name);
|
||||
free(name);
|
||||
free(val);
|
||||
return SSH_ERR_INVALID_FORMAT;
|
||||
}
|
||||
debug_f("%s=<%s>", name, val);
|
||||
kex->server_sig_algs = val;
|
||||
val = NULL;
|
||||
} else if (strcmp(name,
|
||||
"publickey-hostbound@openssh.com") == 0) {
|
||||
if ((r = kex_ext_info_check_ver(kex, name, val, vlen,
|
||||
"0", KEX_HAS_PUBKEY_HOSTBOUND)) != 0) {
|
||||
free(name);
|
||||
free(val);
|
||||
debug3_f("extension %s", name);
|
||||
if (kex->server) {
|
||||
if ((r = kex_ext_info_server_parse(ssh, name,
|
||||
val, vlen)) != 0)
|
||||
return r;
|
||||
}
|
||||
} else if (strcmp(name, "ping@openssh.com") == 0) {
|
||||
if ((r = kex_ext_info_check_ver(kex, name, val, vlen,
|
||||
"0", KEX_HAS_PING)) != 0) {
|
||||
free(name);
|
||||
free(val);
|
||||
} else {
|
||||
if ((r = kex_ext_info_client_parse(ssh, name,
|
||||
val, vlen)) != 0)
|
||||
return r;
|
||||
}
|
||||
} else
|
||||
debug_f("%s (unrecognised)", name);
|
||||
}
|
||||
free(name);
|
||||
free(val);
|
||||
}
|
||||
@ -638,19 +528,44 @@ static int
|
||||
kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh)
|
||||
{
|
||||
struct kex *kex = ssh->kex;
|
||||
int r;
|
||||
int r, initial = (kex->flags & KEX_INITIAL) != 0;
|
||||
char *cp, **prop;
|
||||
|
||||
debug("SSH2_MSG_NEWKEYS received");
|
||||
if (kex->ext_info_c && initial)
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_input_ext_info);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_input_kexinit);
|
||||
if ((r = sshpkt_get_end(ssh)) != 0)
|
||||
return r;
|
||||
if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0)
|
||||
return r;
|
||||
if (initial) {
|
||||
/* Remove initial KEX signalling from proposal for rekeying */
|
||||
if ((r = kex_buf2prop(kex->my, NULL, &prop)) != 0)
|
||||
return r;
|
||||
if ((cp = match_filter_denylist(prop[PROPOSAL_KEX_ALGS],
|
||||
kex->server ?
|
||||
"ext-info-s,kex-strict-s-v00@openssh.com" :
|
||||
"ext-info-c,kex-strict-c-v00@openssh.com")) == NULL) {
|
||||
error_f("match_filter_denylist failed");
|
||||
goto fail;
|
||||
}
|
||||
free(prop[PROPOSAL_KEX_ALGS]);
|
||||
prop[PROPOSAL_KEX_ALGS] = cp;
|
||||
if ((r = kex_prop2buf(ssh->kex->my, prop)) != 0) {
|
||||
error_f("kex_prop2buf failed");
|
||||
fail:
|
||||
kex_proposal_free_entries(prop);
|
||||
free(prop);
|
||||
return SSH_ERR_INTERNAL_ERROR;
|
||||
}
|
||||
kex_proposal_free_entries(prop);
|
||||
free(prop);
|
||||
}
|
||||
kex->done = 1;
|
||||
kex->flags &= ~KEX_INITIAL;
|
||||
sshbuf_reset(kex->peer);
|
||||
/* sshbuf_reset(kex->my); */
|
||||
kex->flags &= ~KEX_INIT_SENT;
|
||||
free(kex->name);
|
||||
kex->name = NULL;
|
||||
@ -953,20 +868,18 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
|
||||
static int
|
||||
choose_kex(struct kex *k, char *client, char *server)
|
||||
{
|
||||
const struct kexalg *kexalg;
|
||||
|
||||
k->name = match_list(client, server, NULL);
|
||||
|
||||
debug("kex: algorithm: %s", k->name ? k->name : "(no match)");
|
||||
if (k->name == NULL)
|
||||
return SSH_ERR_NO_KEX_ALG_MATCH;
|
||||
if ((kexalg = kex_alg_by_name(k->name)) == NULL) {
|
||||
if (!kex_name_valid(k->name)) {
|
||||
error_f("unsupported KEX method %s", k->name);
|
||||
return SSH_ERR_INTERNAL_ERROR;
|
||||
}
|
||||
k->kex_type = kexalg->type;
|
||||
k->hash_alg = kexalg->hash_alg;
|
||||
k->ec_nid = kexalg->ec_nid;
|
||||
k->kex_type = kex_type_from_name(k->name);
|
||||
k->hash_alg = kex_hash_from_name(k->name);
|
||||
k->ec_nid = kex_nid_from_name(k->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1016,7 +929,7 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX])
|
||||
static int
|
||||
kexalgs_contains(char **peer, const char *ext)
|
||||
{
|
||||
return has_any_alg(peer[PROPOSAL_KEX_ALGS], ext);
|
||||
return kex_has_any_alg(peer[PROPOSAL_KEX_ALGS], ext);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1052,6 +965,7 @@ kex_choose_conf(struct ssh *ssh, uint32_t seq)
|
||||
kex->kex_strict = kexalgs_contains(peer,
|
||||
"kex-strict-c-v00@openssh.com");
|
||||
} else {
|
||||
kex->ext_info_s = kexalgs_contains(peer, "ext-info-s");
|
||||
kex->kex_strict = kexalgs_contains(peer,
|
||||
"kex-strict-s-v00@openssh.com");
|
||||
}
|
||||
@ -1066,10 +980,10 @@ kex_choose_conf(struct ssh *ssh, uint32_t seq)
|
||||
|
||||
/* Check whether client supports rsa-sha2 algorithms */
|
||||
if (kex->server && (kex->flags & KEX_INITIAL)) {
|
||||
if (has_any_alg(peer[PROPOSAL_SERVER_HOST_KEY_ALGS],
|
||||
if (kex_has_any_alg(peer[PROPOSAL_SERVER_HOST_KEY_ALGS],
|
||||
"rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com"))
|
||||
kex->flags |= KEX_RSA_SHA2_256_SUPPORTED;
|
||||
if (has_any_alg(peer[PROPOSAL_SERVER_HOST_KEY_ALGS],
|
||||
if (kex_has_any_alg(peer[PROPOSAL_SERVER_HOST_KEY_ALGS],
|
||||
"rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com"))
|
||||
kex->flags |= KEX_RSA_SHA2_512_SUPPORTED;
|
||||
}
|
||||
@ -1354,7 +1268,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
|
||||
sshbuf_reset(our_version);
|
||||
if (version_addendum != NULL && *version_addendum == '\0')
|
||||
version_addendum = NULL;
|
||||
if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n",
|
||||
if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%s%s%s\r\n",
|
||||
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
|
||||
version_addendum == NULL ? "" : " ",
|
||||
version_addendum == NULL ? "" : version_addendum)) != 0) {
|
||||
|
20
kex.h
20
kex.h
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kex.h,v 1.119 2023/08/28 03:28:43 djm Exp $ */
|
||||
/* $OpenBSD: kex.h,v 1.123 2024/05/17 00:30:23 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
@ -92,7 +92,7 @@ enum kex_modes {
|
||||
};
|
||||
|
||||
enum kex_exchange {
|
||||
KEX_DH_GRP1_SHA1,
|
||||
KEX_DH_GRP1_SHA1 = 1,
|
||||
KEX_DH_GRP14_SHA1,
|
||||
KEX_DH_GRP14_SHA256,
|
||||
KEX_DH_GRP16_SHA512,
|
||||
@ -109,9 +109,10 @@ enum kex_exchange {
|
||||
#define KEX_INIT_SENT 0x0001
|
||||
#define KEX_INITIAL 0x0002
|
||||
#define KEX_HAS_PUBKEY_HOSTBOUND 0x0004
|
||||
#define KEX_RSA_SHA2_256_SUPPORTED 0x0008 /* only set in server for now */
|
||||
#define KEX_RSA_SHA2_512_SUPPORTED 0x0010 /* only set in server for now */
|
||||
#define KEX_HAS_PING 0x0020
|
||||
#define KEX_RSA_SHA2_256_SUPPORTED 0x0008 /* only set in server for now */
|
||||
#define KEX_RSA_SHA2_512_SUPPORTED 0x0010 /* only set in server for now */
|
||||
#define KEX_HAS_PING 0x0020
|
||||
#define KEX_HAS_EXT_INFO_IN_AUTH 0x0040
|
||||
|
||||
struct sshenc {
|
||||
char *name;
|
||||
@ -149,7 +150,9 @@ struct kex {
|
||||
u_int kex_type;
|
||||
char *server_sig_algs;
|
||||
int ext_info_c;
|
||||
int ext_info_s;
|
||||
int kex_strict;
|
||||
int ext_info_received;
|
||||
struct sshbuf *my;
|
||||
struct sshbuf *peer;
|
||||
struct sshbuf *client_version;
|
||||
@ -180,9 +183,14 @@ struct kex {
|
||||
struct sshbuf *client_pub;
|
||||
};
|
||||
|
||||
int kex_name_valid(const char *);
|
||||
u_int kex_type_from_name(const char *);
|
||||
int kex_hash_from_name(const char *);
|
||||
int kex_nid_from_name(const char *);
|
||||
int kex_names_valid(const char *);
|
||||
char *kex_alg_list(char);
|
||||
char *kex_names_cat(const char *, const char *);
|
||||
int kex_has_any_alg(const char *, const char *);
|
||||
int kex_assemble_names(char **, const char *, const char *);
|
||||
void kex_proposal_populate_entries(struct ssh *, char *prop[PROPOSAL_MAX],
|
||||
const char *, const char *, const char *, const char *, const char *);
|
||||
@ -209,6 +217,8 @@ int kex_protocol_error(int, u_int32_t, struct ssh *);
|
||||
int kex_derive_keys(struct ssh *, u_char *, u_int, const struct sshbuf *);
|
||||
int kex_send_newkeys(struct ssh *);
|
||||
int kex_start_rekex(struct ssh *);
|
||||
int kex_server_update_ext_info(struct ssh *);
|
||||
void kex_set_server_sig_algs(struct ssh *, const char *);
|
||||
|
||||
int kexgex_client(struct ssh *);
|
||||
int kexgex_server(struct ssh *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kexgexs.c,v 1.46 2023/03/29 01:07:48 dtucker Exp $ */
|
||||
/* $OpenBSD: kexgexs.c,v 1.47 2024/05/17 00:30:23 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Niels Provos. All rights reserved.
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
@ -98,7 +98,7 @@ input_kex_dh_gex_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||
}
|
||||
|
||||
/* Contact privileged parent */
|
||||
kex->dh = PRIVSEP(choose_dh(min, nbits, max));
|
||||
kex->dh = mm_choose_dh(min, nbits, max);
|
||||
if (kex->dh == NULL) {
|
||||
(void)sshpkt_disconnect(ssh, "no matching DH grp found");
|
||||
r = SSH_ERR_ALLOC_FAIL;
|
||||
|
23
log.c
23
log.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: log.c,v 1.60 2021/09/16 15:11:19 djm Exp $ */
|
||||
/* $OpenBSD: log.c,v 1.62 2024/06/27 22:36:44 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -54,7 +54,11 @@
|
||||
#include "match.h"
|
||||
|
||||
static LogLevel log_level = SYSLOG_LEVEL_INFO;
|
||||
#ifdef WINDOWS
|
||||
int log_on_stderr = 1;
|
||||
#else
|
||||
static int log_on_stderr = 1;
|
||||
#endif /* WINDOWS */
|
||||
static int log_stderr_fd = STDERR_FILENO;
|
||||
static int log_facility = LOG_AUTH;
|
||||
static const char *argv0;
|
||||
@ -452,19 +456,6 @@ sshlogdie(const char *file, const char *func, int line, int showfunc,
|
||||
cleanup_exit(255);
|
||||
}
|
||||
|
||||
void
|
||||
sshsigdie(const char *file, const char *func, int line, int showfunc,
|
||||
LogLevel level, const char *suffix, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
|
||||
suffix, fmt, args);
|
||||
va_end(args);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
sshlogv(const char *file, const char *func, int line, int showfunc,
|
||||
LogLevel level, const char *suffix, const char *fmt, va_list args)
|
||||
@ -474,6 +465,10 @@ sshlogv(const char *file, const char *func, int line, int showfunc,
|
||||
const char *cp;
|
||||
size_t i;
|
||||
|
||||
/* short circuit processing early if we're not going to log anything */
|
||||
if (nlog_verbose == 0 && level > log_level)
|
||||
return;
|
||||
|
||||
snprintf(tag, sizeof(tag), "%.48s:%.48s():%d (pid=%ld)",
|
||||
(cp = strrchr(file, '/')) == NULL ? file : cp + 1, func, line,
|
||||
(long)getpid());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user