From 9a28b28314c6a76cf619fc5f1b676d1f4229e3e1 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 16 Apr 2009 10:25:29 +1000 Subject: [PATCH] In net_conf_import, start a transaction when importing a single share. Commit d69c3db9d44ad5d9fd1f5d7a9499f3bd79ecfb47 caused the transaction start to be conditional but the commit is still unconditional, so an error occurs when importing a single share. An alternate fix would be to return the transaction start to be unconditional but then it would occur before other error checking. Signed-off-by: Martin Schwenke Signed-off-by: Michael Adam --- source/utils/net_conf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/utils/net_conf.c b/source/utils/net_conf.c index dea6209c78e..f6e3712bb8f 100644 --- a/source/utils/net_conf.c +++ b/source/utils/net_conf.c @@ -340,6 +340,14 @@ static int net_conf_import(struct net_context *c, struct smbconf_ctx *conf_ctx, if (!W_ERROR_IS_OK(werr)) { goto cancel; } + + werr = smbconf_transaction_start(conf_ctx); + if (!W_ERROR_IS_OK(werr)) { + d_printf("error starting transaction: %s\n", + dos_errstr(werr)); + goto done; + } + werr = import_process_service(c, conf_ctx, service); if (!W_ERROR_IS_OK(werr)) { goto cancel; -- 2.34.1