代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/shadow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 19efe574cd394a769672dac951e650c14a730e77 Mon Sep 17 00:00:00 2001
From: hanzhijun <hanzhijun1@huawei.com>
Date: Wed, 6 Mar 2019 10:15:19 +0800
Subject: [PATCH] change VAR_DIR
reason: change VAR_DIR
Signed-off-by: hanzhijun <hanzhijun1@huawei.com>
---
lib/commonio.c | 11 +++++++----
1 file changed, 7 insertion(+), 4 deletion(-)
diff -Nur shadow-4.6.old/lib/commonio.c shadow-4.6/lib/commonio.c
--- shadow-4.6.old/lib/commonio.c 2019-03-05 06:42:27.620509161 -0500
+++ shadow-4.6/lib/commonio.c 2019-03-05 06:48:05.048509161 -0500
@@ -51,6 +51,8 @@
#include "prototypes.h"
#include "commonio.h"
+#define VAR_DIR "/var/run/"
+
/* local function prototypes */
static int lrename (const char *, const char *);
static int check_link_count (const char *file);
@@ -399,9 +401,10 @@
if(lock == NULL) {
goto cleanup_ENOMEM;
}
- snprintf (file, file_len, "%s.%lu",
- db->filename, (unsigned long) getpid ());
- snprintf (lock, lock_file_len, "%s.lock", db->filename);
+ snprintf (file, file_len, "%s%s.%lu",
+ VAR_DIR, basename(db->filename), (unsigned long) getpid ());
+ snprintf (lock, lock_file_len, "%s%s.lock", VAR_DIR, basename(db->filename));
+
if (do_lock_file (file, lock, log) != 0) {
db->locked = true;
lock_count++;
@@ -517,7 +520,7 @@
* then call ulckpwdf() (if used) on last unlock.
*/
db->locked = false;
- snprintf (lock, sizeof lock, "%s.lock", db->filename);
+ snprintf (lock, sizeof lock, "%s%s.lock", VAR_DIR, basename(db->filename));
unlink (lock);
dec_lock_count ();
return 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。