diff -Naurp --exclude-from excludes old/libsemanage/src/database.c new/libsemanage/src/database.c --- old/libsemanage/src/database.c 2006-01-17 09:11:06.000000000 -0700 +++ new/libsemanage/src/database.c 2006-01-17 14:28:26.000000000 -0700 @@ -2,6 +2,7 @@ #include #include "semanage_store.h" +#include "semanage_conf.h" #include "database.h" #include "debug.h" @@ -28,7 +29,9 @@ static int enter_ro( if (assert_init(handle, dconfig) < 0) goto err; - if (!handle->is_in_transaction) { + if (!handle->is_in_transaction && + handle->conf->store_type == SEMANAGE_CON_DIRECT) { + if (semanage_get_active_lock(handle) < 0) { ERR(handle, "could not get the active lock"); goto err; @@ -51,7 +54,8 @@ static inline int exit_ro( int commit_num = handle->funcs->get_serial(handle); - if (!handle->is_in_transaction) + if (!handle->is_in_transaction && + handle->conf->store_type == SEMANAGE_CON_DIRECT) semanage_release_active_lock(handle); return commit_num;