summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/registry/reg_backend_db.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 3e2502e4f8..3234e7447e 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -330,11 +330,11 @@ bool regdb_init(void)
return true;
}
- regdb = db_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS,
- O_RDWR, 0600);
+ regdb = db_open_trans(NULL, state_path("registry.tdb"), 0,
+ REG_TDB_FLAGS, O_RDWR, 0600);
if (!regdb) {
- regdb = db_open(NULL, state_path("registry.tdb"), 0,
- REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600);
+ regdb = db_open_trans(NULL, state_path("registry.tdb"), 0,
+ REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600);
if (!regdb) {
DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
state_path("registry.tdb"), strerror(errno) ));
@@ -381,7 +381,8 @@ WERROR regdb_open( void )
become_root();
- regdb = db_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600);
+ regdb = db_open_trans(NULL, state_path("registry.tdb"), 0,
+ REG_TDB_FLAGS, O_RDWR, 0600);
if ( !regdb ) {
result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
DEBUG(0,("regdb_open: Failed to open %s! (%s)\n",