Skip to content

Commit d662cc9

Browse files
committed
fix build errors
1 parent 1035101 commit d662cc9

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

contrib/win32/openssh/unittest-kex.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@
423423
<ExcludedFromBuild Condition="$(UseOpenSSL)=='false'">true</ExcludedFromBuild>
424424
</ClCompile>
425425
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk-client.c" />
426+
<ClCompile Include="..\..\..\regress\unittests\kex\test_proposal.c" />
426427
</ItemGroup>
427428
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
428429
<ImportGroup Label="ExtensionTargets">

contrib/win32/openssh/unittest-misc.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@
429429
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\wmain_common.c">
430430
<ExcludedFromBuild Condition="$(UseOpenSSL)==false">true</ExcludedFromBuild>
431431
</ClCompile>
432+
<ClCompile Include="..\..\..\regress\unittests\misc\test_ptimeout.c" />
432433
</ItemGroup>
433434
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
434435
<ImportGroup Label="ExtensionTargets">

scp.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,15 @@ do_cmd(char *program, char *host, char *remuser, int port, int subsystem,
391391
}
392392

393393
freeargs(&args_dup);
394+
/* Parent. Close the other side, and return the local side. */
395+
close(pin[0]);
396+
close(pout[1]);
397+
*fdout = pin[1];
398+
*fdin = pout[0];
399+
ssh_signal(SIGTERM, killchild);
400+
ssh_signal(SIGINT, killchild);
401+
ssh_signal(SIGHUP, killchild);
402+
return 0;
394403
#else
395404
*pid = fork();
396405
switch (*pid) {
@@ -452,6 +461,7 @@ do_cmd(char *program, char *host, char *remuser, int port, int subsystem,
452461
ssh_signal(SIGHUP, killchild);
453462
return 0;
454463
}
464+
#endif
455465
}
456466

457467
/*

sshd.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ send_rexec_state(int fd, struct sshbuf *conf)
13501350
if ((r = sshbuf_put_stringb(m, conf)) != 0 ||
13511351
(r = sshbuf_put_stringb(m, inc)) != 0)
13521352
fatal_fr(r, "compose config");
1353+
13531354
if (ssh_msg_send(fd, 0, m) == -1)
13541355
error_f("ssh_msg_send failed");
13551356

@@ -2020,7 +2021,7 @@ main(int ac, char **av)
20202021

20212022
/* Parse command-line arguments. */
20222023
while ((opt = getopt(ac, av,
2023-
"C:E:b:c:f:g:h:k:o:p:u:46DQRTdeiqrtV")) != -1) {
2024+
"C:E:b:c:f:g:h:k:o:p:u:46DQRTdeiqrtVyz")) != -1) {
20242025
switch (opt) {
20252026
case '4':
20262027
options.address_family = AF_INET;
@@ -2125,6 +2126,18 @@ main(int ac, char **av)
21252126
fprintf(stderr, "%s, %s\n",
21262127
SSH_VERSION, SSH_OPENSSL_VERSION);
21272128
exit(0);
2129+
case 'y':
2130+
privsep_unauth_child = 1;
2131+
rexec_flag = 0;
2132+
logfile = NULL;
2133+
//Sleep(10 * 1000);
2134+
break;
2135+
case 'z':
2136+
privsep_auth_child = 1;
2137+
rexec_flag = 0;
2138+
logfile = NULL;
2139+
//Sleep(10 * 1000);
2140+
break;
21282141
default:
21292142
usage();
21302143
break;

0 commit comments

Comments
 (0)