fix build errors

This commit is contained in:
Tess Gauthier 2023-02-03 12:34:37 -05:00
parent 1035101322
commit d662cc9f7e
4 changed files with 26 additions and 1 deletions

View File

@ -423,6 +423,7 @@
<ExcludedFromBuild Condition="$(UseOpenSSL)=='false'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="$(OpenSSH-Src-Path)ssh-sk-client.c" />
<ClCompile Include="..\..\..\regress\unittests\kex\test_proposal.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -429,6 +429,7 @@
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\wmain_common.c">
<ExcludedFromBuild Condition="$(UseOpenSSL)==false">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\regress\unittests\misc\test_ptimeout.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

10
scp.c
View File

@ -391,6 +391,15 @@ do_cmd(char *program, char *host, char *remuser, int port, int subsystem,
}
freeargs(&args_dup);
/* Parent. Close the other side, and return the local side. */
close(pin[0]);
close(pout[1]);
*fdout = pin[1];
*fdin = pout[0];
ssh_signal(SIGTERM, killchild);
ssh_signal(SIGINT, killchild);
ssh_signal(SIGHUP, killchild);
return 0;
#else
*pid = fork();
switch (*pid) {
@ -452,6 +461,7 @@ do_cmd(char *program, char *host, char *remuser, int port, int subsystem,
ssh_signal(SIGHUP, killchild);
return 0;
}
#endif
}
/*

15
sshd.c
View File

@ -1350,6 +1350,7 @@ send_rexec_state(int fd, struct sshbuf *conf)
if ((r = sshbuf_put_stringb(m, conf)) != 0 ||
(r = sshbuf_put_stringb(m, inc)) != 0)
fatal_fr(r, "compose config");
if (ssh_msg_send(fd, 0, m) == -1)
error_f("ssh_msg_send failed");
@ -2020,7 +2021,7 @@ main(int ac, char **av)
/* Parse command-line arguments. */
while ((opt = getopt(ac, av,
"C:E:b:c:f:g:h:k:o:p:u:46DQRTdeiqrtV")) != -1) {
"C:E:b:c:f:g:h:k:o:p:u:46DQRTdeiqrtVyz")) != -1) {
switch (opt) {
case '4':
options.address_family = AF_INET;
@ -2125,6 +2126,18 @@ main(int ac, char **av)
fprintf(stderr, "%s, %s\n",
SSH_VERSION, SSH_OPENSSL_VERSION);
exit(0);
case 'y':
privsep_unauth_child = 1;
rexec_flag = 0;
logfile = NULL;
//Sleep(10 * 1000);
break;
case 'z':
privsep_auth_child = 1;
rexec_flag = 0;
logfile = NULL;
//Sleep(10 * 1000);
break;
default:
usage();
break;