!62 [sync] PR-60: 修复mock环境下,test_sshd.test用例执行失败

From: @openeuler-sync-bot 
Reviewed-by: @renmingshuai 
Signed-off-by: @renmingshuai
This commit is contained in:
openeuler-ci-bot 2024-06-12 08:29:29 +00:00 committed by Gitee
commit 49b4e570af
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,15 @@
Group-writeable directories in the hierarchy above where we
run the tests from can cause failures due to openssh's strict
permissions checks. Adding this option helps the tests to run
more reliably on a variety of build systems.
--- /tests/test_sshd.test
+++ /tests/test_sshd.test
@@ -71,6 +71,7 @@ chmod go-rwx \
# shellcheck disable=SC2086
"${SSHD}" \
-f "${SSHD_FIXTURE_CONFIG:-${d}/openssh_server/sshd_config}" \
+ -o 'StrictModes no' \
-o 'Port 4711' \
-h "${d}/openssh_server/ssh_host_rsa_key" \
-h "${d}/openssh_server/ssh_host_ecdsa_key" \

View File

@ -1,12 +1,13 @@
Name: libssh2
Version: 1.11.0
Release: 2
Release: 3
Summary: A library implementing the SSH2 protocol
License: BSD
URL: https://www.libssh2.org/
Source0: https://libssh2.org/download/libssh2-%{version}.tar.gz
Patch0: backport-src-add-strict-KEX-to-fix-CVE-2023-48795-Terrapin-At.patch
Patch1: libssh2-1.11.0-strict-modes.patch
BuildRequires: coreutils findutils /usr/bin/man zlib-devel
BuildRequires: gcc make sed openssl-devel > 1:1.0.2 openssh-server
@ -86,6 +87,12 @@ echo "exit 0" > tests/mansyntax.sh
%{_mandir}/man3/libssh2_*.3*
%changelog
* Tue Jun 04 2024 yueyuankun<yueyuankun@kylinos.cn> - 1.11.0-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add patch to work around strict permissions issues for sshd tests
* Tue Apr 16 2024 renmingshuai <renmingshuai@huawei.com> - 1.11.0-2
- Type:CVE
- ID:CVE-2023-48795