s3:dbwrap: If "-n" is given to dbwrap_torture, open db with CLEAR_IF_FIRST
authorVolker Lendecke <vl@samba.org>
Fri, 11 Dec 2009 15:51:40 +0000 (16:51 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 17 Dec 2009 12:36:08 +0000 (13:36 +0100)
source3/utils/dbwrap_torture.c

index a6e2d2bc2c387564968a2f4199eb11b0acce2c61..24fdebea85442609077238d0fb8f39d327d75a89 100644 (file)
@@ -299,6 +299,10 @@ int main(int argc, const char *argv[])
                tdb_flags = TDB_DEFAULT;
        }
 
+       if (no_trans) {
+               tdb_flags |= TDB_CLEAR_IF_FIRST;
+       }
+
        db = db_open(mem_ctx, db_name, 0, tdb_flags,  O_RDWR | O_CREAT, 0644);
 
        if (db == NULL) {