Skip to content

Commit

Permalink
Bagajjal/compile test v8.6 (PowerShell#503)
Browse files Browse the repository at this point in the history
Fixed compilation and test failures with V8.6.
  • Loading branch information
bagajjal authored Apr 29, 2021
1 parent 9230781 commit 9dba3f9
Show file tree
Hide file tree
Showing 57 changed files with 697 additions and 561 deletions.
4 changes: 3 additions & 1 deletion auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@
#include "ssherr.h"
#include "compat.h"
#include "channels.h"
#include "sshfileperm.h"

#ifdef WINDOWS
#include <Windows.h>
#include "misc_internal.h"
#include "sshfileperm.h"
#endif // WINDOWS

/* import */
Expand Down Expand Up @@ -613,6 +614,7 @@ getpwnamallow(struct ssh *ssh, const char *user)
ci->user = pw? xstrdup(pw->pw_name): user;
#else
ci->user = user;
#endif // WINDOWS
parse_server_match_config(&options, &includes, ci);
log_change_level(options.log_level);
log_verbose_reset();
Expand Down
4 changes: 4 additions & 0 deletions authfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename)
int r;
mode_t omask;

#ifdef WINDOWS
r = sshbuf_write_file(filename, keybuf, 0600);
#else
omask = umask(077);
r = sshbuf_write_file(filename, keybuf);
umask(omask);
#endif
return r;
}

Expand Down
2 changes: 1 addition & 1 deletion contrib/win32/openssh/bash_tests_iterator.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ try
[string]$failed_testcases = [string]::Empty

# These are the known failed testcases.
$known_failed_testcases = @("agent.sh", "key-options.sh", "forward-control.sh", "integrity.sh", "krl.sh", "cert-hostkey.sh", "cert-userkey.sh")
$known_failed_testcases = @("agent.sh", "key-options.sh", "forward-control.sh", "integrity.sh", "krl.sh", "cert-hostkey.sh", "cert-userkey.sh", "percent.sh")
$known_failed_testcases_skipped = @()

$start_time = (Get-Date)
Expand Down
8 changes: 6 additions & 2 deletions contrib/win32/openssh/config.h.vs
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@
/* #undef HAVE_READPASSPHRASE_H */

/* Define to 1 if you have the `realpath' function. */
/* #define HAVE_REALPATH 1 */
#define HAVE_REALPATH 1

/* Define to 1 if you have the `recvmsg' function. */
/* #undef HAVE_RECVMSG */
Expand Down Expand Up @@ -915,7 +915,7 @@
/* #undef HAVE_SO_PEERCRED */

/* define if you have ssize_t data type */
#define HAVE_SSIZE_T 1
/* #define HAVE_SSIZE_T 1 */

/* Fields in struct sockaddr_storage */
#define HAVE_SS_FAMILY_IN_SS 1
Expand Down Expand Up @@ -1000,6 +1000,7 @@

/* Define to 1 if the system has the type `struct timespec'. */
/* #undef HAVE_STRUCT_TIMESPEC */
#define HAVE_STRUCT_TIMESPEC 1

/* define if you have struct timeval */
#define HAVE_STRUCT_TIMEVAL 1
Expand Down Expand Up @@ -1711,3 +1712,6 @@
#define FORK_NOT_SUPPORTED
#define HAVE_FREEZERO
#define FILESYSTEM_NO_BACKSLASH
#define HAVE_LOCALTIME_R
#define HAVE_DECL_MEMMEM 0
#define WITH_ZLIB
1 change: 1 addition & 0 deletions contrib/win32/openssh/keygen.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<ClCompile Include="$(OpenSSH-Src-Path)sshsig.c" />
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\wmain_common.c" />
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32-utf8.c" />
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk-client.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc" />
Expand Down
6 changes: 6 additions & 0 deletions contrib/win32/openssh/keygen.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\win32-utf8.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)sshsig.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk-client.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="version.rc">
Expand Down
13 changes: 10 additions & 3 deletions contrib/win32/openssh/libssh.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(OpenSSH-Src-Path)addr.c" />
<ClCompile Include="$(OpenSSH-Src-Path)addrmatch.c" />
<ClCompile Include="$(OpenSSH-Src-Path)atomicio.c" />
<ClCompile Include="$(OpenSSH-Src-Path)authfd.c" />
Expand Down Expand Up @@ -391,7 +392,7 @@
<ExcludedFromBuild Condition="$(UseOpenSSL)==false">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)kexgen.c" />
<ClCompile Include="$(OpenSSH-Src-Path)kexsntrup4591761x25519.c" />
<ClCompile Include="$(OpenSSH-Src-Path)kexsntrup761x25519.c" />
<ClCompile Include="$(OpenSSH-Src-Path)krl.c" />
<ClCompile Include="$(OpenSSH-Src-Path)log.c" />
<ClCompile Include="$(OpenSSH-Src-Path)mac.c" />
Expand All @@ -408,7 +409,7 @@
<ClCompile Include="$(OpenSSH-Src-Path)rijndael.c" />
<ClCompile Include="$(OpenSSH-Src-Path)sc25519.c" />
<ClCompile Include="$(OpenSSH-Src-Path)smult_curve25519_ref.c" />
<ClCompile Include="$(OpenSSH-Src-Path)sntrup4591761.c" />
<ClCompile Include="$(OpenSSH-Src-Path)sntrup761.c" />
<ClCompile Include="$(OpenSSH-Src-Path)ssh-dss.c">
<ExcludedFromBuild Condition="$(UseOpenSSL)==false">true</ExcludedFromBuild>
</ClCompile>
Expand Down Expand Up @@ -441,11 +442,17 @@
<ExcludedFromBuild Condition="$(UseOpenSSL)==false">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)kexgexs.c" />
<ClCompile Include="$(OpenSSH-Src-Path)ssh-ecdsa-sk.c" />
<ClCompile Include="$(OpenSSH-Src-Path)ssh-ed25519-sk.c" />
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk.c" />
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-io.c" />
<ClCompile Include="..\..\..\cipher-chachapoly-libcrypto.c" />
<ClCompile Include="..\win32compat\spawn-ext.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(OpenSSH-Src-Path)sshfileperm.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
Loading

0 comments on commit 9dba3f9

Please sign in to comment.