summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-28 11:05:59 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-28 14:51:08 +0200
commit4826fdf95f68b63e5d35e13f8d033db0d0949587 (patch)
tree09424d070ac8f9481a9babbbd4e4ee1ab6f3b64a
parentd01e36e64716d8184eb225e1feb84ab464333139 (diff)
downloadsamba-4826fdf95f68b63e5d35e13f8d033db0d0949587.tar.gz
samba-4826fdf95f68b63e5d35e13f8d033db0d0949587.tar.bz2
samba-4826fdf95f68b63e5d35e13f8d033db0d0949587.zip
s4:lsa RPC server - Fix up "dcesrv_lsa_DeleteObject"
- Return always "NT_STATUS_OK" on success - Remove "talloc_free"s on handles since the frees are automatically performed by the DCE/RPC server code
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 57c73e4961..85fddf7d30 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -186,13 +186,12 @@ static NTSTATUS dcesrv_lsa_DeleteObject(struct dcesrv_call_state *dce_call, TALL
case SECURITY_ADMINISTRATOR:
break;
default:
- /* Users and annonymous are not allowed delete things */
+ /* Users and anonymous are not allowed to delete things */
return NT_STATUS_ACCESS_DENIED;
}
ret = ldb_delete(secret_state->sam_ldb,
secret_state->secret_dn);
- talloc_free(h);
if (ret != LDB_SUCCESS) {
return NT_STATUS_INVALID_HANDLE;
}
@@ -200,6 +199,7 @@ static NTSTATUS dcesrv_lsa_DeleteObject(struct dcesrv_call_state *dce_call, TALL
ZERO_STRUCTP(r->out.handle);
return NT_STATUS_OK;
+
} else if (h->wire_handle.handle_type == LSA_HANDLE_TRUSTED_DOMAIN) {
struct lsa_trusted_domain_state *trusted_domain_state =
talloc_get_type(h->data, struct lsa_trusted_domain_state);
@@ -228,10 +228,11 @@ static NTSTATUS dcesrv_lsa_DeleteObject(struct dcesrv_call_state *dce_call, TALL
if (ret != LDB_SUCCESS) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- talloc_free(h);
+
ZERO_STRUCTP(r->out.handle);
return NT_STATUS_OK;
+
} else if (h->wire_handle.handle_type == LSA_HANDLE_ACCOUNT) {
struct lsa_RightSet *rights;
struct lsa_account_state *astate;
@@ -272,6 +273,8 @@ static NTSTATUS dcesrv_lsa_DeleteObject(struct dcesrv_call_state *dce_call, TALL
}
ZERO_STRUCTP(r->out.handle);
+
+ return NT_STATUS_OK;
}
return NT_STATUS_INVALID_HANDLE;