From ac4899eaa1d1b998959aa694f6cac5c2c425ecfc Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Jun 2012 15:35:32 +0200 Subject: [PATCH] s3:net registry import: implement dry-run with "--test" Pair-Programmed-With: Gregor Beck Autobuild-User(master): Michael Adam Autobuild-Date(master): Tue Jun 26 21:43:49 CEST 2012 on sn-devel-104 --- source3/utils/net_registry.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 44ebef5bf2..0993b958b1 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -1303,6 +1303,12 @@ static int net_registry_import(struct net_context *c, int argc, SMB_ASSERT(ret == 0); + if (c->opt_testmode) { + d_printf("Testmode: not committing changes.\n"); + regdb_transaction_cancel(); + goto done; + } + werr = regdb_transaction_commit(); if (!W_ERROR_IS_OK(werr)) { d_printf("Failed to commit transaction on regdb: %s\n", -- 2.34.1