From 3e3b11048584465fd9ecabf7fbdaf5a1bb12a55f Mon Sep 17 00:00:00 2001 From: Tess Gauthier Date: Thu, 6 Oct 2022 15:43:21 -0400 Subject: [PATCH] fix 9.1 compilation errors --- auth.h | 4 ++++ contrib/win32/openssh/libssh.vcxproj | 1 - contrib/win32/openssh/libssh.vcxproj.filters | 1 - contrib/win32/openssh/scp.vcxproj | 1 + contrib/win32/openssh/scp.vcxproj.filters | 3 +++ contrib/win32/openssh/sftp.vcxproj | 1 + contrib/win32/openssh/sftp.vcxproj.filters | 5 ++++- contrib/win32/openssh/ssh.vcxproj | 2 ++ contrib/win32/openssh/ssh.vcxproj.filters | 6 ++++++ contrib/win32/openssh/sshd.vcxproj | 3 +++ contrib/win32/openssh/sshd.vcxproj.filters | 9 +++++++++ sftp-server.c | 4 ++++ sk-usbhid.c | 4 ++-- 13 files changed, 39 insertions(+), 5 deletions(-) diff --git a/auth.h b/auth.h index 6d2d39762..59b6b6f5e 100644 --- a/auth.h +++ b/auth.h @@ -41,6 +41,10 @@ #include #endif +#ifdef WINDOWS +#include "hostfile.h" +#endif + struct passwd; struct ssh; struct sshbuf; diff --git a/contrib/win32/openssh/libssh.vcxproj b/contrib/win32/openssh/libssh.vcxproj index 6b164c77a..e15f7dcb8 100644 --- a/contrib/win32/openssh/libssh.vcxproj +++ b/contrib/win32/openssh/libssh.vcxproj @@ -356,7 +356,6 @@ - diff --git a/contrib/win32/openssh/libssh.vcxproj.filters b/contrib/win32/openssh/libssh.vcxproj.filters index 6f00d47f3..b5acd1500 100644 --- a/contrib/win32/openssh/libssh.vcxproj.filters +++ b/contrib/win32/openssh/libssh.vcxproj.filters @@ -12,7 +12,6 @@ - diff --git a/contrib/win32/openssh/scp.vcxproj b/contrib/win32/openssh/scp.vcxproj index 6fac57aad..d04f523a3 100644 --- a/contrib/win32/openssh/scp.vcxproj +++ b/contrib/win32/openssh/scp.vcxproj @@ -42,6 +42,7 @@ + diff --git a/contrib/win32/openssh/scp.vcxproj.filters b/contrib/win32/openssh/scp.vcxproj.filters index b184c7e44..981ec179d 100644 --- a/contrib/win32/openssh/scp.vcxproj.filters +++ b/contrib/win32/openssh/scp.vcxproj.filters @@ -33,6 +33,9 @@ Source Files + + Source Files + diff --git a/contrib/win32/openssh/sftp.vcxproj b/contrib/win32/openssh/sftp.vcxproj index 6636a11ec..5ac815805 100644 --- a/contrib/win32/openssh/sftp.vcxproj +++ b/contrib/win32/openssh/sftp.vcxproj @@ -43,6 +43,7 @@ + diff --git a/contrib/win32/openssh/sftp.vcxproj.filters b/contrib/win32/openssh/sftp.vcxproj.filters index 60da32cc3..ec3e9cd0d 100644 --- a/contrib/win32/openssh/sftp.vcxproj.filters +++ b/contrib/win32/openssh/sftp.vcxproj.filters @@ -36,10 +36,13 @@ Source Files + + Source Files + Resource Files - + \ No newline at end of file diff --git a/contrib/win32/openssh/ssh.vcxproj b/contrib/win32/openssh/ssh.vcxproj index 1ab0e971c..016ed316e 100644 --- a/contrib/win32/openssh/ssh.vcxproj +++ b/contrib/win32/openssh/ssh.vcxproj @@ -507,6 +507,8 @@ + + diff --git a/contrib/win32/openssh/ssh.vcxproj.filters b/contrib/win32/openssh/ssh.vcxproj.filters index a6aed6932..7720669d4 100644 --- a/contrib/win32/openssh/ssh.vcxproj.filters +++ b/contrib/win32/openssh/ssh.vcxproj.filters @@ -314,6 +314,12 @@ Source Files + + Source Files + + + Source Files + diff --git a/contrib/win32/openssh/sshd.vcxproj b/contrib/win32/openssh/sshd.vcxproj index 274f8c23b..83a9cda91 100644 --- a/contrib/win32/openssh/sshd.vcxproj +++ b/contrib/win32/openssh/sshd.vcxproj @@ -459,8 +459,11 @@ + + + diff --git a/contrib/win32/openssh/sshd.vcxproj.filters b/contrib/win32/openssh/sshd.vcxproj.filters index 97055c7b5..1563e5437 100644 --- a/contrib/win32/openssh/sshd.vcxproj.filters +++ b/contrib/win32/openssh/sshd.vcxproj.filters @@ -150,6 +150,15 @@ Source Files + + Source Files + + + Source Files + + + Source Files + diff --git a/sftp-server.c b/sftp-server.c index 7654c1915..14b7b8db6 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -181,8 +181,10 @@ static const struct sftp_handler extended_handlers[] = { { "copy-data", "copy-data", 0, process_extended_copy_data, 1 }, { "home-directory", "home-directory", 0, process_extended_home_directory, 0 }, +#ifndef WINDOWS { "users-groups-by-id", "users-groups-by-id@openssh.com", 0, process_extended_get_users_groups_by_id, 0 }, +#endif { NULL, NULL, 0, NULL, 0 } }; @@ -1759,6 +1761,7 @@ process_extended_home_directory(u_int32_t id) static void process_extended_get_users_groups_by_id(u_int32_t id) { +#ifndef WINDOWS struct passwd *user_pw; struct group *gr; struct sshbuf *uids, *gids, *usernames, *groupnames, *msg; @@ -1809,6 +1812,7 @@ process_extended_get_users_groups_by_id(u_int32_t id) sshbuf_free(usernames); sshbuf_free(groupnames); sshbuf_free(msg); +#endif } static void diff --git a/sk-usbhid.c b/sk-usbhid.c index 083d38c8f..edc16a87d 100644 --- a/sk-usbhid.c +++ b/sk-usbhid.c @@ -1208,10 +1208,10 @@ sk_sign(uint32_t alg, const uint8_t *data, size_t datalen, if ((sk = sk_open("windows://hello")) == NULL) { if (pin != NULL || (flags & SSH_SK_USER_VERIFICATION_REQD)) - sk = sk_probe(NULL, NULL, 0); + sk = sk_probe(NULL, NULL, 0, 0); else sk = sk_probe(application, key_handle, - key_handle_len); + key_handle_len, 0); } } #else