1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

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>
This commit is contained in:
Martin Schwenke 2009-04-16 10:25:29 +10:00 committed by Michael Adam
parent 56aae35a23
commit 448b434a86

View File

@ -340,6 +340,14 @@ static int net_conf_import(struct net_context *c, struct smbconf_ctx *conf_ctx,
if (!W_ERROR_IS_OK(werr)) { if (!W_ERROR_IS_OK(werr)) {
goto cancel; 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); werr = import_process_service(c, conf_ctx, service);
if (!W_ERROR_IS_OK(werr)) { if (!W_ERROR_IS_OK(werr)) {
goto cancel; goto cancel;