summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2009-04-16 10:25:29 +1000
committerMichael Adam <obnox@samba.org>2009-04-16 10:38:38 +0200
commit448b434a862da0ca621c3b695dc800e9ec5e8fcf (patch)
treed0389d41ed0ccb8fc3cd6a45002fffd98cb226d5
parent56aae35a234f19eda9702ce321b92fa382a1ada6 (diff)
downloadsamba-448b434a862da0ca621c3b695dc800e9ec5e8fcf.tar.gz
samba-448b434a862da0ca621c3b695dc800e9ec5e8fcf.tar.bz2
samba-448b434a862da0ca621c3b695dc800e9ec5e8fcf.zip
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 <martin@meltin.net> Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/utils/net_conf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 3fa547baf4..663c5925c7 100644
--- a/source3/utils/net_conf.c
+++ b/source3/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",
+ win_errstr(werr));
+ goto done;
+ }
+
werr = import_process_service(c, conf_ctx, service);
if (!W_ERROR_IS_OK(werr)) {
goto cancel;