代码拉取完成,页面将自动刷新
From f0c78e7ba1e2721398ff811b709cc1d46ae31386 Mon Sep 17 00:00:00 2001
From: lubing <lubing@localhost.localdomain>
Date: Fri, 3 May 2019 16:46:45 +0800
Subject: [PATCH] shadow-utils: fix lock file residue
reason: fix lock file residue
Signed-off-by: lubing <lubing@localhost.localdomain>
---
lib/commonio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/commonio.c b/lib/commonio.c
index 2c223e4..a110ca9 100644
--- a/lib/commonio.c
+++ b/lib/commonio.c
@@ -389,8 +389,9 @@ int commonio_lock_nowait (struct commonio_db *db, bool log)
if (db->locked) {
return 1;
}
- file_len = strlen(db->filename) + 11;/* %lu max size */
- lock_file_len = strlen(db->filename) + 6; /* sizeof ".lock" */
+ /* files moved from /etc/ to /var/run/, change malloc size */
+ file_len = strlen(db->filename) + 15;/* %lu max size */
+ lock_file_len = strlen(db->filename) + 15; /* sizeof ".lock" */
file = (char*)malloc(file_len);
if(file == NULL) {
goto cleanup_ENOMEM;
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。