summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-27 16:57:51 +0100
committerMichael Adam <obnox@samba.org>2008-03-27 18:14:56 +0100
commit5439f5f71000fa96f042b6641ad2e794aa2d9ce0 (patch)
tree7a2d02c7b871c377d1e2fd0b12d1fcf20debff9d
parent618f22409aad43dbfd1ee3ea71af79225d3b63d7 (diff)
downloadsamba-5439f5f71000fa96f042b6641ad2e794aa2d9ce0.tar.gz
samba-5439f5f71000fa96f042b6641ad2e794aa2d9ce0.tar.bz2
samba-5439f5f71000fa96f042b6641ad2e794aa2d9ce0.zip
regdb: use db_open_trans()
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be commit a77b5b91dd439b5965fef17f2b2ff98fefd77dbb)
-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",