Blame SOURCES/fapolicyd-cli-hang.patch

a9f027
From 3f43b262b1c5b9841fd0f387cac442aefeb84da9 Mon Sep 17 00:00:00 2001
a9f027
From: Radovan Sroka <rsroka@redhat.com>
a9f027
Date: Sun, 31 Jan 2021 18:49:10 +0100
a9f027
Subject: [PATCH] Added MDB_NOLOCK to cli mdb_env_open() (#114)
a9f027
a9f027
- MDB_NOLOCK option resolves the issue with --dump-db hang
a9f027
a9f027
Signed-off-by: Radovan Sroka <rsroka@redhat.com>
a9f027
---
a9f027
 src/cli/fapolicyd-cli.c | 2 +-
a9f027
 1 file changed, 1 insertion(+), 1 deletion(-)
a9f027
a9f027
diff --git a/src/cli/fapolicyd-cli.c b/src/cli/fapolicyd-cli.c
a9f027
index fe47948..befb8ce 100644
a9f027
--- a/src/cli/fapolicyd-cli.c
a9f027
+++ b/src/cli/fapolicyd-cli.c
a9f027
@@ -114,7 +114,7 @@ static int do_dump_db(void)
a9f027
 		return 1;
a9f027
 	}
a9f027
 	mdb_env_set_maxdbs(env, 2);
a9f027
-	rc = mdb_env_open(env, DB_DIR, MDB_RDONLY, 0660);
a9f027
+	rc = mdb_env_open(env, DB_DIR, MDB_RDONLY|MDB_NOLOCK, 0660);
a9f027
 	if (rc) {
a9f027
 		fprintf(stderr, "mdb_env_open failed, error %d %s\n", rc,
a9f027
 							mdb_strerror(rc));