From cf0cb0add9ed47b8974272237fee0e1a4ba7bf68 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 27 Jan 2014 14:49:12 +0100 Subject: dbwrap: add a dbwrap_flags argument to db_open() This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher --- source3/utils/net_idmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/utils/net_idmap.c') diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 1095f143d5..ec2b05087e 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -206,7 +206,7 @@ static bool net_idmap_opendb_autorid(TALLOC_CTX *mem_ctx, if (readonly) { *db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDONLY, 0, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (*db == NULL) { d_fprintf(stderr, _("Could not open autorid db (%s): %s\n"), @@ -261,7 +261,7 @@ static int net_idmap_dump(struct net_context *c, int argc, const char **argv) d_fprintf(stderr, _("dumping id mapping from %s\n"), dbfile); db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDONLY, 0, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db == NULL) { d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"), dbfile, strerror(errno)); @@ -387,7 +387,7 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) } db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db == NULL) { d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"), dbfile, strerror(errno)); @@ -598,7 +598,7 @@ static int net_idmap_delete_mapping(struct net_context *c, int argc, d_fprintf(stderr, _("deleting id mapping from %s\n"), dbfile); db = db_open(mem_ctx, dbfile, 0, TDB_DEFAULT, O_RDWR, 0, - DBWRAP_LOCK_ORDER_1); + DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); if (db == NULL) { d_fprintf(stderr, _("Could not open idmap db (%s): %s\n"), dbfile, strerror(errno)); -- cgit