代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openssh 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From a8ad7a2952111c6ce32949a775df94286550af6b Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Fri, 6 Sep 2024 02:30:44 +0000
Subject: [PATCH] upstream: make parsing user@host consistently look for the
last '@' in the string rather than the first. This makes it possible to
use usernames that contain '@' characters.
Conflict:NA
Reference:https://anongit.mindrot.org/openssh.git/commit/a8ad7a2952111c6ce32949a775df94286550af6b
---
match.c | 6 +++---
ssh-add.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/match.c b/match.c
index 3ac854d..b9a8225 100644
--- a/match.c
+++ b/match.c
@@ -241,17 +241,17 @@ match_user(const char *user, const char *host, const char *ipaddr,
/* test mode */
if (user == NULL && host == NULL && ipaddr == NULL) {
- if ((p = strchr(pattern, '@')) != NULL &&
+ if ((p = strrchr(pattern, '@')) != NULL &&
match_host_and_ip(NULL, NULL, p + 1) < 0)
return -1;
return 0;
}
- if ((p = strchr(pattern, '@')) == NULL)
+ if (strrchr(pattern, '@') == NULL)
return match_pattern(user, pattern);
pat = xstrdup(pattern);
- p = strchr(pat, '@');
+ p = strrchr(pat, '@');
*p++ = '\0';
if ((ret = match_pattern(user, pat)) == 1)
diff --git a/ssh-add.c b/ssh-add.c
index 8cba0a7..2b081d6 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -712,7 +712,7 @@ parse_dest_constraint_hop(const char *s, struct dest_constraint_hop *dch,
memset(dch, '\0', sizeof(*dch));
os = xstrdup(s);
- if ((host = strchr(os, '@')) == NULL)
+ if ((host = strrchr(os, '@')) == NULL)
host = os;
else {
*host++ = '\0';
--
2.43.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。