diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-22 11:26:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:38 -0500 |
commit | 6cb5cda53b04ad21142c6ca7b1d014847ae363cc (patch) | |
tree | 3d2b8a637277c8b472aee3ea52b4802453cf5bfd /source4 | |
parent | d04ef04c7abea3692b1dc507e1f958f6a2777071 (diff) | |
download | samba-6cb5cda53b04ad21142c6ca7b1d014847ae363cc.tar.gz samba-6cb5cda53b04ad21142c6ca7b1d014847ae363cc.tar.bz2 samba-6cb5cda53b04ad21142c6ca7b1d014847ae363cc.zip |
r12432: Re-indent and consistantly cancel the transaction.
Andrew Bartlett
(This used to be commit 2c8b988eb869d06328ebae586caeb565d7f6f054)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |