代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/pam 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 3bd5a1244a35974c8a0e21a9ac866cb5935f662e Mon Sep 17 00:00:00 2001
From: yaqiang chen <chenyaqiang@huawei.com>
Date: Wed, 15 Sep 2021 10:05:49 +0800
Subject: [PATCH] bugfix cannot open database file
---
modules/pam_userdb/pam_userdb.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/modules/pam_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c
index dc2ca23..a9992a7 100644
--- a/modules/pam_userdb/pam_userdb.c
+++ b/modules/pam_userdb/pam_userdb.c
@@ -147,13 +147,24 @@ user_lookup (pam_handle_t *pamh, const char *database, const char *cryptmode,
{
DBM *dbm;
datum key, data;
+ int retval;
/* Open the DB file. */
dbm = dbm_open(database, O_RDONLY, 0644);
if (dbm == NULL) {
- pam_syslog(pamh, LOG_ERR,
- "user_lookup: could not open database `%s': %m", database);
- return -2;
+ retval = dbminit(database);
+ if (retval){
+ pam_syslog(pamh, LOG_ERR,
+ "user_lookup: could not init database `%s': %m", database);
+ return -2;
+ } else {
+ dbm = dbm_open(database, O_RDONLY, 0644);
+ if (dbm == NULL) {
+ pam_syslog(pamh, LOG_ERR,
+ "user_lookup: could not open database `%s': %m", database);
+ return -2;
+ }
+ }
}
/* dump out the database contents for debugging */
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。