mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
update to libssh-0.12.0
patch to fix broken test (getpw* struct pw reuse issue)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
COMMENT = C library implementing server and client side SSH
|
||||
V = 0.11.3
|
||||
V = 0.12.0
|
||||
DISTNAME = libssh-${V}
|
||||
|
||||
SHARED_LIBS += ssh 4.3 # 4.8
|
||||
SHARED_LIBS += ssh 4.4 # 4.11
|
||||
|
||||
CATEGORIES = security devel
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (libssh-0.11.3.tar.xz) = fYoTYbsJTsP1EZZOeKWk26aJtZhuESr6vk9NDWxhJcM=
|
||||
SIZE (libssh-0.11.3.tar.xz) = 622776
|
||||
SHA256 (libssh-0.12.0.tar.xz) = Gmr0JNgyfl7t705f5/W5JCJt1hesnz3oDyF9gqNqcSE=
|
||||
SIZE (libssh-0.12.0.tar.xz) = 751928
|
||||
|
||||
@@ -13,9 +13,9 @@ Index: ConfigureChecks.cmake
|
||||
- check_function_exists(EVP_chacha20 HAVE_OPENSSL_EVP_CHACHA20)
|
||||
+ #check_function_exists(EVP_chacha20 HAVE_OPENSSL_EVP_CHACHA20)
|
||||
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
@@ -261,7 +261,7 @@ check_c_source_compiles("
|
||||
# Check for ML-KEM availability (OpenSSL 3.5+)
|
||||
if (OPENSSL_VERSION VERSION_GREATER_EQUAL "3.5.0")
|
||||
@@ -280,7 +280,7 @@ check_c_source_compiles("
|
||||
__thread int tls;
|
||||
|
||||
int main(void) {
|
||||
|
||||
@@ -5,9 +5,9 @@ uses pthread functions whether or not pthread was linked.
|
||||
Index: src/CMakeLists.txt
|
||||
--- src/CMakeLists.txt.orig
|
||||
+++ src/CMakeLists.txt
|
||||
@@ -56,6 +56,13 @@ if (MINGW AND Threads_FOUND)
|
||||
)
|
||||
endif()
|
||||
@@ -68,6 +68,13 @@ if (HAVE_LIBFIDO2)
|
||||
)
|
||||
endif (HAVE_LIBFIDO2)
|
||||
|
||||
+if (Threads_FOUND)
|
||||
+ set(LIBSSH_LINK_LIBRARIES
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
ssh_path_expand_tilde() calls getpwnam, invalidating pw returned
|
||||
by getpwuid
|
||||
|
||||
Index: tests/unittests/torture_misc.c
|
||||
--- tests/unittests/torture_misc.c.orig
|
||||
+++ tests/unittests/torture_misc.c
|
||||
@@ -255,9 +255,9 @@ static void torture_path_expand_tilde_unix(void **stat
|
||||
pw = getpwuid(getuid());
|
||||
assert_non_null(pw);
|
||||
|
||||
- user = pw->pw_name;
|
||||
+ user = strdup(pw->pw_name);
|
||||
assert_non_null(user);
|
||||
- home = pw->pw_dir;
|
||||
+ home = strdup(pw->pw_dir);
|
||||
assert_non_null(home);
|
||||
|
||||
snprintf(h, 256 - 1, "%s/.ssh", home);
|
||||
@@ -279,6 +279,8 @@ static void torture_path_expand_tilde_unix(void **stat
|
||||
snprintf(h, 256 - 1, "%s/.ssh", home);
|
||||
assert_string_equal(d, h);
|
||||
free(d);
|
||||
+ free(user);
|
||||
+ free(home);
|
||||
}
|
||||
|
||||
#endif /* _WIN32 */
|
||||
Reference in New Issue
Block a user