s3:passdb: convert account_pol to use dbwrap wrapper functions only
authorMichael Adam <obnox@samba.org>
Wed, 24 Aug 2011 22:38:51 +0000 (00:38 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 12:17:57 +0000 (14:17 +0200)
Avoid direct use of the db_record and db_context structs.

source3/passdb/account_pol.c

index a491c27a9dd4ca5867f92b1eefb711bcfe634888..9b6e4f6c63a912b54dbec039d41dca618f625fca 100644 (file)
@@ -238,7 +238,7 @@ bool init_account_policy(void)
 
        /* handle a Samba upgrade */
 
-       if (db->transaction_start(db) != 0) {
+       if (dbwrap_transaction_start(db) != 0) {
                DEBUG(0, ("transaction_start failed\n"));
                TALLOC_FREE(db);
                return false;
@@ -249,7 +249,7 @@ bool init_account_policy(void)
                /*
                 * Race condition
                 */
-               if (db->transaction_cancel(db)) {
+               if (dbwrap_transaction_cancel(db)) {
                        smb_panic("transaction_cancel failed");
                }
                return true;
@@ -287,7 +287,7 @@ bool init_account_policy(void)
                }
        }
 
-       if (db->transaction_commit(db) != 0) {
+       if (dbwrap_transaction_commit(db) != 0) {
                DEBUG(0, ("transaction_commit failed\n"));
                TALLOC_FREE(db);
                return false;
@@ -296,7 +296,7 @@ bool init_account_policy(void)
        return True;
 
  cancel:
-       if (db->transaction_cancel(db)) {
+       if (dbwrap_transaction_cancel(db)) {
                smb_panic("transaction_cancel failed");
        }
        TALLOC_FREE(db);