account_pol: use db_open_trans()
authorStefan Metzmacher <metze@samba.org>
Tue, 1 Apr 2008 09:26:29 +0000 (11:26 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 1 Apr 2008 12:04:23 +0000 (14:04 +0200)
metze

source/lib/account_pol.c

index 4e36760c4c48c6ed4ee5daa2ed27a9c4b94a4296..067f34688366f05b80a9048762cd8cad859d6ad7 100644 (file)
@@ -212,12 +212,12 @@ bool init_account_policy(void)
                return True;
        }
 
-       db = db_open(NULL, state_path("account_policy.tdb"), 0, TDB_DEFAULT,
+       db = db_open_trans(NULL, state_path("account_policy.tdb"), 0, TDB_DEFAULT,
                     O_RDWR, 0600);
 
        if (db == NULL) { /* the account policies files does not exist or open
                           * failed, try to create a new one */
-               db = db_open(NULL, state_path("account_policy.tdb"), 0,
+               db = db_open_trans(NULL, state_path("account_policy.tdb"), 0,
                             TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
                if (db == NULL) {
                        DEBUG(0,("Failed to open account policy database\n"));