summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-06-26 15:35:32 +0200
committerMichael Adam <obnox@samba.org>2012-06-26 21:43:49 +0200
commitac4899eaa1d1b998959aa694f6cac5c2c425ecfc (patch)
treeebc76ef1d733f35ff49f0be6095839db4ec44345 /source3/utils
parent3705119bb06123068cb8f3780342fd4e6e501b08 (diff)
downloadsamba-ac4899eaa1d1b998959aa694f6cac5c2c425ecfc.tar.gz
samba-ac4899eaa1d1b998959aa694f6cac5c2c425ecfc.tar.bz2
samba-ac4899eaa1d1b998959aa694f6cac5c2c425ecfc.zip
s3:net registry import: implement dry-run with "--test"
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Jun 26 21:43:49 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_registry.c6
1 files changed, 6 insertions, 0 deletions
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",