summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index d90dfeed98..a806a22907 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -2089,15 +2089,19 @@ NTSTATUS _lsa_QuerySecurity(pipes_struct *p,
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&handle))
return NT_STATUS_INVALID_HANDLE;
- if (handle->type == LSA_HANDLE_POLICY_TYPE) {
+ switch (handle->type) {
+ case LSA_HANDLE_POLICY_TYPE:
status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size,
&lsa_policy_mapping, NULL, 0);
- } else if (handle->type == LSA_HANDLE_ACCOUNT_TYPE) {
+ break;
+ case LSA_HANDLE_ACCOUNT_TYPE:
status = make_lsa_object_sd(p->mem_ctx, &psd, &sd_size,
&lsa_account_mapping,
&handle->sid, LSA_ACCOUNT_ALL_ACCESS);
- } else {
+ break;
+ default:
status = NT_STATUS_INVALID_HANDLE;
+ break;
}
if (!NT_STATUS_IS_OK(status)) {