1 Star 0 Fork 56

zhangxianjun/openssh

forked from src-openEuler/openssh 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-upstream-Do-not-apply-authorized_keys-options-when-signature.patch 930 Bytes
一键复制 编辑 原始数据 按行查看 历史
bitianyuan 提交于 2024-11-06 16:06 . backport some upstream patches
From 62bbf8f825cc390ecb0523752ddac1435006f206 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Sun, 15 Sep 2024 00:41:18 +0000
Subject: [PATCH] upstream: Do not apply authorized_keys options when signature
verification fails. Prevents restrictive key options being incorrectly
applied to subsequent keys in authorized_keys.
Conflict:NA
Reference:https://anongit.mindrot.org/openssh.git/commit/62bbf8f825cc390ecb0523752ddac1435006f206
---
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index ceeb035..a2647fd 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1564,7 +1564,7 @@ mm_answer_keyverify(struct ssh *ssh, int sock, struct sshbuf *m)
}
auth2_record_key(authctxt, ret == 0, key);
- if (key_blobtype == MM_USERKEY)
+ if (key_blobtype == MM_USERKEY && ret == 0)
auth_activate_options(ssh, key_opts);
monitor_reset_key_state();
--
2.43.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxianjun87/openssh.git
git@gitee.com:zhangxianjun87/openssh.git
zhangxianjun87
openssh
openssh
master

搜索帮助