We need to O_CREAT the database when connecting
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
msg_ctx = global_messaging_context();
- db = db_open_ctdb(talloc_tos(), msg_ctx, "torture.tdb",
- 0, TDB_DEFAULT,
- O_RDWR, 0755, DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
+ db = db_open_ctdb(
+ talloc_tos(),
+ msg_ctx,
+ "torture.tdb",
+ 0,
+ TDB_DEFAULT,
+ O_RDWR|O_CREAT,
+ 0755,
+ DBWRAP_LOCK_ORDER_1,
+ DBWRAP_FLAG_NONE);
if (db == NULL) {
perror("db_open_ctdb failed");
goto fail;