同步操作将从 OpenCloudOS Stream/pam 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9e4e3e42554fc6344a0b20b42aafb48011e9b2c9 Mon Sep 17 00:00:00 2001From: Tobias Stoeckmann <tobias@stoeckmann.org>Date: 2024年1月18日 20:25:20 +0100Subject: [PATCH] pam_env: remove escaped newlines from econf linesThe libeconf routines do not remove escaped newlines the way we want toprocess them later on. Manually remove them from values.Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>Resolves: https://github.com/linux-pam/linux-pam/issues/738Fixes: 6135c45347b6 ("pam_env: Use vendor specific pam_env.conf and environment as fallback")---modules/pam_env/pam_env.c | 23 +++++++++++++++++++++++1 file changed, 23 insertions(+)diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.cindex 8b40b6a5a..6bece0f81 100644--- a/modules/pam_env/pam_env.c+++ b/modules/pam_env/pam_env.c@@ -160,6 +160,28 @@ isDirectory(const char *path) {return S_ISDIR(statbuf.st_mode);}+/*+ * Remove escaped newline from string.+ *+ * All occurrences of "\\n" will be removed from string.+ */+static void+econf_unescnl(char *val)+{+ char *dest, *p;++ dest = p = val;++ while (*p != '0円') {+ if (p[0] == '\\' && p[1] == '\n') {+ p += 2;+ } else {+ *dest++ = *p++;+ }+ }+ *dest = '0円';+}+static inteconf_read_file(const pam_handle_t *pamh, const char *filename, const char *delim,const char *name, const char *suffix, const char *subpath,@@ -270,6 +292,7 @@ econf_read_file(const pam_handle_t *pamh, const char *filename, const char *delikeys[i],econf_errString(error));} else {+ econf_unescnl(val);if (asprintf(&(*lines)[i],"%s%c%s", keys[i], delim[0], val) < 0) {pam_syslog(pamh, LOG_ERR, "Cannot allocate memory.");econf_free(keys);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。