From 6cb5cda53b04ad21142c6ca7b1d014847ae363cc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 22 Dec 2005 11:26:12 +0000 Subject: r12432: Re-indent and consistantly cancel the transaction. Andrew Bartlett (This used to be commit 2c8b988eb869d06328ebae586caeb565d7f6f054) --- source4/rpc_server/samr/dcesrv_samr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 42be226022..1c740628af 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -846,11 +846,18 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX } sid = samdb_result_dom_sid(mem_ctx, msgs[0], "objectSid"); if (sid == NULL) { + ldb_transaction_cancel(d_state->sam_ctx); return NT_STATUS_INTERNAL_DB_CORRUPTION; } + /* Change the account control to be the correct account type. + * The default is for a workstation account */ user_account_control = samdb_result_uint(msgs[0], "userAccountControl", 0); - user_account_control = (user_account_control & ~(UF_NORMAL_ACCOUNT|UF_INTERDOMAIN_TRUST_ACCOUNT|UF_WORKSTATION_TRUST_ACCOUNT|UF_SERVER_TRUST_ACCOUNT)); + user_account_control = (user_account_control & + ~(UF_NORMAL_ACCOUNT | + UF_INTERDOMAIN_TRUST_ACCOUNT | + UF_WORKSTATION_TRUST_ACCOUNT | + UF_SERVER_TRUST_ACCOUNT)); user_account_control |= samdb_acb2uf(r->in.acct_flags); talloc_free(msg); -- cgit