summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/common/common.h16
-rw-r--r--source4/rpc_server/dcerpc_server.c21
-rw-r--r--source4/rpc_server/dcerpc_server.h3
-rw-r--r--source4/rpc_server/echo/rpc_echo.c8
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c177
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c477
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c156
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c148
8 files changed, 451 insertions, 555 deletions
diff --git a/source4/rpc_server/common/common.h b/source4/rpc_server/common/common.h
index bf31958b89..17b76840af 100644
--- a/source4/rpc_server/common/common.h
+++ b/source4/rpc_server/common/common.h
@@ -4,6 +4,7 @@
common macros for the dcerpc server interfaces
Copyright (C) Stefan (metze) Metzmacher 2004
+ Copyright (C) Andrew Tridgell 2004
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,8 +22,15 @@
*/
#define WERR_TALLOC_CHECK(x) do {\
- if (!(x)) {\
- r->out.result = WERR_NOMEM;\
- return NT_STATUS_OK;\
- }\
+ if (!(x)) return WERR_NOMEM;\
} while (0)
+
+/* a useful macro for generating a RPC fault in the backend code */
+#define DCESRV_FAULT(code) do { \
+ dce_call->fault_code = code; \
+ return r->out.result; \
+} while(0)
+
+/* a useful macro for checking the validity of a dcerpc policy handle
+ and giving the right fault code if invalid */
+#define DCESRV_CHECK_HANDLE(h) do {if (!(h)) DCESRV_FAULT(DCERPC_FAULT_CONTEXT_MISMATCH); } while (0)
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 844df37b0e..463cb4fe39 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -368,28 +368,13 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32 fault_code)
dcerpc_set_frag_length(&rep->data, rep->data.length);
DLIST_ADD_END(call->replies, rep, struct dcesrv_call_reply *);
+ DLIST_ADD_END(call->conn->call_list, call, struct dcesrv_call_state *);
return NT_STATUS_OK;
}
/*
- return a dcerpc fault from a ntstatus code
-*/
-static NTSTATUS dcesrv_fault_nt(struct dcesrv_call_state *call, NTSTATUS status)
-{
- uint32 fault_code = DCERPC_FAULT_OTHER;
-
- /* TODO: we need to expand this table to include more mappings */
- if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
- fault_code = DCERPC_FAULT_CONTEXT_MISMATCH;
- }
-
- return dcesrv_fault(call, fault_code);
-}
-
-
-/*
return a dcerpc bind_nak
*/
static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32 reason)
@@ -592,10 +577,12 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
return dcesrv_fault(call, DCERPC_FAULT_NDR);
}
+ call->fault_code = 0;
+
/* call the dispatch function */
status = call->conn->iface->dispatch(call, call->mem_ctx, r);
if (!NT_STATUS_IS_OK(status)) {
- return dcesrv_fault_nt(call, status);
+ return dcesrv_fault(call, call->fault_code);
}
/* form the reply NDR */
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index bd5deab847..3afcc25576 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -77,6 +77,9 @@ struct dcesrv_call_state {
struct dcesrv_call_reply *next, *prev;
DATA_BLOB data;
} *replies;
+
+ /* this is used by the boilerplate code to generate DCERPC faults */
+ uint32 fault_code;
};
#define DCESRV_HANDLE_ANY 255
diff --git a/source4/rpc_server/echo/rpc_echo.c b/source4/rpc_server/echo/rpc_echo.c
index ec5d667b46..25ac28a664 100644
--- a/source4/rpc_server/echo/rpc_echo.c
+++ b/source4/rpc_server/echo/rpc_echo.c
@@ -70,12 +70,9 @@ static NTSTATUS echo_TestCall2(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
{
r->out.info = talloc(mem_ctx, sizeof(*r->out.info));
if (!r->out.info) {
- r->out.result = NT_STATUS_NO_MEMORY;
- return NT_STATUS_OK;
+ return NT_STATUS_NO_MEMORY;
}
- r->out.result = NT_STATUS_OK;
-
switch (r->in.level) {
case 1:
r->out.info->info1.v = 10;
@@ -105,8 +102,7 @@ static NTSTATUS echo_TestCall2(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
r->out.info->info7.info4.v.high = 0;
break;
default:
- r->out.result = NT_STATUS_INVALID_LEVEL;
- break;
+ return NT_STATUS_INVALID_LEVEL;
}
return NT_STATUS_OK;
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index e4dcf398a2..309f9f6eba 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -79,9 +79,8 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
/* make sure the sam database is accessible */
if (samdb_connect() != 0) {
- r->out.result = NT_STATUS_INVALID_SYSTEM_SERVICE;
talloc_destroy(state->mem_ctx);
- return NT_STATUS_OK;
+ return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
handle = dcesrv_handle_new(dce_call->conn, SAMR_HANDLE_CONNECT);
@@ -95,7 +94,6 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
state->access_mask = r->in.access_mask;
*r->out.handle = handle->wire_handle;
- r->out.result = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -110,16 +108,13 @@ static NTSTATUS samr_Close(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn,
r->in.handle,
DCESRV_HANDLE_ANY);
- if (!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+ DCESRV_CHECK_HANDLE(h);
/* this causes the callback samr_XXX_destroy() to be called by
the handle destroy code which destroys the state associated
with the handle */
dcesrv_handle_destroy(dce_call->conn, h);
- r->out.result = NT_STATUS_OK;
ZERO_STRUCTP(r->out.handle);
return NT_STATUS_OK;
@@ -132,7 +127,7 @@ static NTSTATUS samr_Close(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
static NTSTATUS samr_SetSecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetSecurity *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -142,7 +137,7 @@ static NTSTATUS samr_SetSecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_QuerySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QuerySecurity *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -172,35 +167,30 @@ static NTSTATUS samr_LookupDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX
const char *sidstr;
h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, SAMR_HANDLE_CONNECT);
- if (!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+
+ DCESRV_CHECK_HANDLE(h);
r->out.sid = NULL;
if (r->in.domain->name == NULL) {
- r->out.result = NT_STATUS_INVALID_PARAMETER;
- return NT_STATUS_OK;
+ return NT_STATUS_INVALID_PARAMETER;
}
sidstr = samdb_search_string(mem_ctx, "objectSid",
"(&(name=%s)(objectclass=domain))",
r->in.domain->name);
if (sidstr == NULL) {
- r->out.result = NT_STATUS_NO_SUCH_DOMAIN;
- return NT_STATUS_OK;
+ return NT_STATUS_NO_SUCH_DOMAIN;
}
sid = dom_sid_parse_talloc(mem_ctx, sidstr);
if (sid == NULL) {
DEBUG(1,("samdb: Invalid sid '%s' for domain %s\n",
sidstr, r->in.domain->name));
- r->out.result = NT_STATUS_INTERNAL_DB_CORRUPTION;
- return NT_STATUS_OK;
+ return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
r->out.sid = sid;
- r->out.result = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -220,9 +210,8 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
int count, i, start_i;
h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, SAMR_HANDLE_CONNECT);
- if (!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+
+ DCESRV_CHECK_HANDLE(h);
*r->out.resume_handle = 0;
r->out.sam = NULL;
@@ -232,8 +221,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
"name", "(objectclass=domain)");
if (count == -1) {
DEBUG(1,("samdb: no domains found in EnumDomains\n"));
- r->out.result = NT_STATUS_INTERNAL_DB_CORRUPTION;
- return NT_STATUS_OK;
+ return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
*r->out.resume_handle = count;
@@ -242,14 +230,12 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
if (start_i >= count) {
/* search past end of list is not an error for this call */
- r->out.result = NT_STATUS_OK;
return NT_STATUS_OK;
}
array = talloc_p(mem_ctx, struct samr_SamArray);
if (array == NULL) {
- r->out.result = NT_STATUS_NO_MEMORY;
- return NT_STATUS_OK;
+ return NT_STATUS_NO_MEMORY;
}
array->count = 0;
@@ -257,8 +243,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
array->entries = talloc_array_p(mem_ctx, struct samr_SamEntry, count - start_i);
if (array->entries == NULL) {
- r->out.result = NT_STATUS_NO_MEMORY;
- return NT_STATUS_OK;
+ return NT_STATUS_NO_MEMORY;
}
for (i=0;i<count-start_i;i++) {
@@ -269,7 +254,6 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
r->out.sam = array;
r->out.num_entries = i - start_i;
array->count = r->out.num_entries;
- r->out.result = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -281,7 +265,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_OpenDomain *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -291,7 +275,7 @@ static NTSTATUS samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryDomainInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -301,7 +285,7 @@ static NTSTATUS samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_
static NTSTATUS samr_SetDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetDomainInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -311,7 +295,7 @@ static NTSTATUS samr_SetDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_CreateDomainGroup *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -321,7 +305,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_EnumDomainGroups(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_EnumDomainGroups *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -331,7 +315,7 @@ static NTSTATUS samr_EnumDomainGroups(struct dcesrv_call_state *dce_call, TALLOC
static NTSTATUS samr_CreateUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_CreateUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -341,7 +325,7 @@ static NTSTATUS samr_CreateUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS samr_EnumDomainUsers(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_EnumDomainUsers *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -351,7 +335,7 @@ static NTSTATUS samr_EnumDomainUsers(struct dcesrv_call_state *dce_call, TALLOC_
static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_CreateDomAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -361,7 +345,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_EnumDomainAliases(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_EnumDomainAliases *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -371,7 +355,7 @@ static NTSTATUS samr_EnumDomainAliases(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_GetAliasMembership(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetAliasMembership *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -381,7 +365,7 @@ static NTSTATUS samr_GetAliasMembership(struct dcesrv_call_state *dce_call, TALL
static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_LookupNames *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -391,7 +375,7 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_LookupRids(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_LookupRids *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -401,7 +385,7 @@ static NTSTATUS samr_LookupRids(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_OpenGroup *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -411,7 +395,7 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
static NTSTATUS samr_QueryGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryGroupInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -421,7 +405,7 @@ static NTSTATUS samr_QueryGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_SetGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetGroupInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -431,7 +415,7 @@ static NTSTATUS samr_SetGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_AddGroupMember(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_AddGroupMember *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -441,7 +425,7 @@ static NTSTATUS samr_AddGroupMember(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_DeleteDomainGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_DeleteDomainGroup *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -451,7 +435,7 @@ static NTSTATUS samr_DeleteDomainGroup(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_DeleteGroupMember(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_DeleteGroupMember *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -461,7 +445,7 @@ static NTSTATUS samr_DeleteGroupMember(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_QueryGroupMember(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryGroupMember *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -471,7 +455,7 @@ static NTSTATUS samr_QueryGroupMember(struct dcesrv_call_state *dce_call, TALLOC
static NTSTATUS samr_SetMemberAttributesOfGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetMemberAttributesOfGroup *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -481,7 +465,7 @@ static NTSTATUS samr_SetMemberAttributesOfGroup(struct dcesrv_call_state *dce_ca
static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_OpenAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -491,7 +475,7 @@ static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
static NTSTATUS samr_QueryAliasInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryAliasInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -501,7 +485,7 @@ static NTSTATUS samr_QueryAliasInfo(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_SetAliasInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetAliasInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -511,7 +495,7 @@ static NTSTATUS samr_SetAliasInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_DeleteDomAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_DeleteDomAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -521,7 +505,7 @@ static NTSTATUS samr_DeleteDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_AddAliasMember(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_AddAliasMember *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -531,7 +515,7 @@ static NTSTATUS samr_AddAliasMember(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_DeleteAliasMember(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_DeleteAliasMember *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -541,7 +525,7 @@ static NTSTATUS samr_DeleteAliasMember(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_GetMembersInAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetMembersInAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -551,7 +535,7 @@ static NTSTATUS samr_GetMembersInAlias(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_OpenUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -561,7 +545,7 @@ static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_DeleteUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -571,7 +555,7 @@ static NTSTATUS samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryUserInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -581,7 +565,7 @@ static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetUserInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -591,7 +575,7 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_ChangePasswordUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -601,7 +585,7 @@ static NTSTATUS samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALL
static NTSTATUS samr_GetGroupsForUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetGroupsForUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -611,7 +595,7 @@ static NTSTATUS samr_GetGroupsForUser(struct dcesrv_call_state *dce_call, TALLOC
static NTSTATUS samr_QueryDisplayInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryDisplayInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -621,7 +605,7 @@ static NTSTATUS samr_QueryDisplayInfo(struct dcesrv_call_state *dce_call, TALLOC
static NTSTATUS samr_GetDisplayEnumerationIndex(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetDisplayEnumerationIndex *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -631,7 +615,7 @@ static NTSTATUS samr_GetDisplayEnumerationIndex(struct dcesrv_call_state *dce_ca
static NTSTATUS samr_TestPrivateFunctionsDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_TestPrivateFunctionsDomain *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -641,7 +625,7 @@ static NTSTATUS samr_TestPrivateFunctionsDomain(struct dcesrv_call_state *dce_ca
static NTSTATUS samr_TestPrivateFunctionsUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_TestPrivateFunctionsUser *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -651,7 +635,7 @@ static NTSTATUS samr_TestPrivateFunctionsUser(struct dcesrv_call_state *dce_call
static NTSTATUS samr_GetUserPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetUserPwInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -661,7 +645,7 @@ static NTSTATUS samr_GetUserPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
static NTSTATUS samr_RemoveMemberFromForeignDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_RemoveMemberFromForeignDomain *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -671,7 +655,7 @@ static NTSTATUS samr_RemoveMemberFromForeignDomain(struct dcesrv_call_state *dce
static NTSTATUS samr_QueryDomainInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryDomainInfo2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -681,7 +665,7 @@ static NTSTATUS samr_QueryDomainInfo2(struct dcesrv_call_state *dce_call, TALLOC
static NTSTATUS samr_QueryUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryUserInfo2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -691,7 +675,7 @@ static NTSTATUS samr_QueryUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_C
static NTSTATUS samr_QueryDisplayInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryDisplayInfo2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -701,7 +685,7 @@ static NTSTATUS samr_QueryDisplayInfo2(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_GetDisplayEnumerationIndex2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetDisplayEnumerationIndex2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -711,7 +695,7 @@ static NTSTATUS samr_GetDisplayEnumerationIndex2(struct dcesrv_call_state *dce_c
static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_CreateUser2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -721,7 +705,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_QueryDisplayInfo3(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_QueryDisplayInfo3 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -731,7 +715,7 @@ static NTSTATUS samr_QueryDisplayInfo3(struct dcesrv_call_state *dce_call, TALLO
static NTSTATUS samr_AddMultipleMembersToAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_AddMultipleMembersToAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -741,7 +725,7 @@ static NTSTATUS samr_AddMultipleMembersToAlias(struct dcesrv_call_state *dce_cal
static NTSTATUS samr_RemoveMultipleMembersFromAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_RemoveMultipleMembersFromAlias *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -751,7 +735,7 @@ static NTSTATUS samr_RemoveMultipleMembersFromAlias(struct dcesrv_call_state *dc
static NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_OemChangePasswordUser2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -761,7 +745,7 @@ static NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
static NTSTATUS samr_ChangePasswordUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_ChangePasswordUser2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -771,7 +755,7 @@ static NTSTATUS samr_ChangePasswordUser2(struct dcesrv_call_state *dce_call, TAL
static NTSTATUS samr_GetDomPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetDomPwInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -782,16 +766,12 @@ static NTSTATUS samr_Connect2(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
struct samr_Connect2 *r)
{
struct samr_Connect c;
- NTSTATUS status;
c.in.system_name = NULL;
c.in.access_mask = r->in.access_mask;
c.out.handle = r->out.handle;
- status = samr_Connect(dce_call, mem_ctx, &c);
- r->out.result = c.out.result;
-
- return status;
+ return samr_Connect(dce_call, mem_ctx, &c);
}
@@ -801,7 +781,7 @@ static NTSTATUS samr_Connect2(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS samr_SetUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetUserInfo2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -811,7 +791,7 @@ static NTSTATUS samr_SetUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX
static NTSTATUS samr_SetBootKeyInformation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetBootKeyInformation *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -821,7 +801,7 @@ static NTSTATUS samr_SetBootKeyInformation(struct dcesrv_call_state *dce_call, T
static NTSTATUS samr_GetBootKeyInformation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetBootKeyInformation *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -832,16 +812,12 @@ static NTSTATUS samr_Connect3(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
struct samr_Connect3 *r)
{
struct samr_Connect c;
- NTSTATUS status;
c.in.system_name = NULL;
c.in.access_mask = r->in.access_mask;
c.out.handle = r->out.handle;
- status = samr_Connect(dce_call, mem_ctx, &c);
- r->out.result = c.out.result;
-
- return status;
+ return samr_Connect(dce_call, mem_ctx, &c);
}
@@ -852,16 +828,12 @@ static NTSTATUS samr_Connect4(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
struct samr_Connect4 *r)
{
struct samr_Connect c;
- NTSTATUS status;
c.in.system_name = NULL;
c.in.access_mask = r->in.access_mask;
c.out.handle = r->out.handle;
- status = samr_Connect(dce_call, mem_ctx, &c);
- r->out.result = c.out.result;
-
- return status;
+ return samr_Connect(dce_call, mem_ctx, &c);
}
@@ -871,7 +843,7 @@ static NTSTATUS samr_Connect4(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_ChangePasswordUser3 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -893,7 +865,6 @@ static NTSTATUS samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
r->out.info->info1.unknown1 = 3;
r->out.info->info1.unknown2 = 0;
r->out.level = r->in.level;
- r->out.result = c.out.result;
return status;
}
@@ -905,7 +876,7 @@ static NTSTATUS samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS samr_RidToSid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_RidToSid *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -915,7 +886,7 @@ static NTSTATUS samr_RidToSid(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
static NTSTATUS samr_SetDsrmPassword(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_SetDsrmPassword *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -925,7 +896,7 @@ static NTSTATUS samr_SetDsrmPassword(struct dcesrv_call_state *dce_call, TALLOC_
static NTSTATUS samr_ValidatePassword(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_ValidatePassword *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index 1e5a2105d0..96af3d84f4 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -26,13 +26,12 @@
/*
srvsvc_NetCharDevEnum
*/
-static NTSTATUS srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetCharDevEnum *r)
+static WERROR srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetCharDevEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0:
@@ -42,8 +41,8 @@ static NTSTATUS srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 1:
r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevCtr1);
WERR_TALLOC_CHECK(r->out.ctr.ctr1);
@@ -51,66 +50,60 @@ static NTSTATUS srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC
r->out.ctr.ctr1->count = 0;
r->out.ctr.ctr1->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetCharDevGetInfo
*/
-static NTSTATUS srvsvc_NetCharDevGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetCharDevGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevGetInfo *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
case 0:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 1:
r->out.info.info1 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetCharDevControl
*/
-static NTSTATUS srvsvc_NetCharDevControl(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetCharDevControl(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevControl *r)
{
- r->out.result = WERR_NOT_SUPPORTED;
- return NT_STATUS_OK;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetCharDevQEnum
*/
-static NTSTATUS srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetCharDevQEnum *r)
+static WERROR srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetCharDevQEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0:
@@ -120,8 +113,8 @@ static NTSTATUS srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLO
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 1:
r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQCtr1);
WERR_TALLOC_CHECK(r->out.ctr.ctr1);
@@ -129,361 +122,324 @@ static NTSTATUS srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLO
r->out.ctr.ctr1->count = 0;
r->out.ctr.ctr1->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetCharDevQGetInfo
*/
-static NTSTATUS srvsvc_NetCharDevQGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetCharDevQGetInfo *r)
+static WERROR srvsvc_NetCharDevQGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetCharDevQGetInfo *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
case 0:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 1:
r->out.info.info1 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetCharDevQSetInfo
*/
-static NTSTATUS srvsvc_NetCharDevQSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetCharDevQSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevQSetInfo *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
case 0:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
case 1:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetCharDevQPurge
*/
-static NTSTATUS srvsvc_NetCharDevQPurge(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetCharDevQPurge(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetCharDevQPurge *r)
{
- r->out.result = WERR_NOT_SUPPORTED;
- return NT_STATUS_OK;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetCharDevQPurgeSelf
*/
-static NTSTATUS srvsvc_NetCharDevQPurgeSelf(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetCharDevQPurgeSelf *r)
+static WERROR srvsvc_NetCharDevQPurgeSelf(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetCharDevQPurgeSelf *r)
{
- r->out.result = WERR_NOT_SUPPORTED;
- return NT_STATUS_OK;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetConnEnum
*/
-static NTSTATUS srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetConnEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
- case 0: {
+ case 0:
r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr0);
WERR_TALLOC_CHECK(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 1: {
+ return WERR_NOT_SUPPORTED;
+
+ case 1:
r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr1);
WERR_TALLOC_CHECK(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
r->out.ctr.ctr1->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetFileEnum
*/
-static NTSTATUS srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetFileEnum *r)
+static WERROR srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetFileEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
- case 2: {
+ case 2:
r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr2);
WERR_TALLOC_CHECK(r->out.ctr.ctr2);
r->out.ctr.ctr2->count = 0;
r->out.ctr.ctr2->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 3: {
+ return WERR_NOT_SUPPORTED;
+
+ case 3:
r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr3);
WERR_TALLOC_CHECK(r->out.ctr.ctr3);
r->out.ctr.ctr3->count = 0;
r->out.ctr.ctr3->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetFileGetInfo
*/
-static NTSTATUS srvsvc_NetFileGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetFileGetInfo *r)
+static WERROR srvsvc_NetFileGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetFileGetInfo *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
- case 2: {
+ case 2:
r->out.info.info2 = NULL;
+ return WERR_NOT_SUPPORTED;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 3: {
+ case 3:
r->out.info.info3 = NULL;
+ return WERR_NOT_SUPPORTED;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetFileClose
*/
-static NTSTATUS srvsvc_NetFileClose(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetFileClose(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetFileClose *r)
{
- r->out.result = WERR_NOT_SUPPORTED;
- return NT_STATUS_OK;
+ return WERR_NOT_SUPPORTED;
+ return WERR_OK;
}
/*
srvsvc_NetSessEnum
*/
-static NTSTATUS srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetSessEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
- case 0: {
+ case 0:
r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr0);
WERR_TALLOC_CHECK(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 1: {
+ return WERR_NOT_SUPPORTED;
+
+ case 1:
r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr1);
WERR_TALLOC_CHECK(r->out.ctr.ctr1);
r->out.ctr.ctr1->count = 0;
r->out.ctr.ctr1->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 2: {
+ return WERR_NOT_SUPPORTED;
+
+ case 2:
r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr2);
WERR_TALLOC_CHECK(r->out.ctr.ctr2);
r->out.ctr.ctr2->count = 0;
r->out.ctr.ctr2->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 10:{
+ return WERR_NOT_SUPPORTED;
+
+ case 10:
r->out.ctr.ctr10 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr10);
WERR_TALLOC_CHECK(r->out.ctr.ctr10);
r->out.ctr.ctr2->count = 0;
r->out.ctr.ctr2->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 502:{
+ return WERR_NOT_SUPPORTED;
+
+ case 502:
r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr502);
WERR_TALLOC_CHECK(r->out.ctr.ctr502);
r->out.ctr.ctr2->count = 0;
r->out.ctr.ctr2->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetSessDel
*/
-static NTSTATUS srvsvc_NetSessDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetSessDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetSessDel *r)
{
- r->out.result = WERR_NOT_SUPPORTED;
- return NT_STATUS_OK;
+ return WERR_NOT_SUPPORTED;
+ return WERR_OK;
}
/*
srvsvc_NetShareAdd
*/
-static NTSTATUS srvsvc_NetShareAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareAdd *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
case 0:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 1:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 2:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 501:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
case 502:
if (r->in.parm_error) {
r->out.parm_error = r->in.parm_error;
}
- r->out.result = WERR_NOT_SUPPORTED;
- break;
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetShareEnumAll
*/
-static NTSTATUS srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareEnumAll *r)
{
struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0: {
@@ -615,133 +571,124 @@ static NTSTATUS srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLO
break;
}
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetShareGetInfo
*/
-static NTSTATUS srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareGetInfo *r)
{
- r->out.result = WERR_OK;
-
switch (r->in.level) {
- case 0: {
+ case 0:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 1: {
+ return WERR_NOT_SUPPORTED;
+
+ case 1:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 2: {
+ return WERR_NOT_SUPPORTED;
+
+ case 2:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 501:{
+ return WERR_NOT_SUPPORTED;
+
+ case 501:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
- case 502:{
+ return WERR_NOT_SUPPORTED;
+
+ case 502:
r->out.info.info0 = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
+ return WERR_UNKNOWN_LEVEL;
break;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NetShareSetInfo
*/
-static NTSTATUS srvsvc_NetShareSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareSetInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetShareDel
*/
-static NTSTATUS srvsvc_NetShareDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareDel *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetShareDelSticky
*/
-static NTSTATUS srvsvc_NetShareDelSticky(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareDelSticky(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareDelSticky *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetShareCheck
*/
-static NTSTATUS srvsvc_NetShareCheck(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareCheck(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareCheck *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetSrvGetInfo
*/
-static NTSTATUS srvsvc_NetSrvGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetSrvGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetSrvGetInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetSrvSetInfo
*/
-static NTSTATUS srvsvc_NetSrvSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetSrvSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetSrvSetInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetDiskEnum
*/
-static NTSTATUS srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetDiskEnum *r)
{
r->out.count = 0;
r->out.ctr0 = NULL;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0: {
@@ -752,48 +699,47 @@ static NTSTATUS srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CT
r->out.ctr0->count = 0;
r->out.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
+ return WERR_NOT_SUPPORTED;
break;
}
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
+ return WERR_UNKNOWN_LEVEL;
break;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NETRSERVERSTATISTICSGET
*/
-static NTSTATUS srvsvc_NETRSERVERSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERSTATISTICSGET *r)
+static WERROR srvsvc_NETRSERVERSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NETRSERVERSTATISTICSGET *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSERVERTRANSPORTADD
*/
-static NTSTATUS srvsvc_NETRSERVERTRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERTRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERTRANSPORTADD *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetTransportEnum
*/
-static NTSTATUS srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetTransportEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0: {
@@ -803,7 +749,7 @@ static NTSTATUS srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALL
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
+ return WERR_NOT_SUPPORTED;
break;
}
case 1: {
@@ -813,7 +759,7 @@ static NTSTATUS srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALL
r->out.ctr.ctr1->count = 0;
r->out.ctr.ctr1->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
+ return WERR_NOT_SUPPORTED;
break;
}
case 2: {
@@ -823,7 +769,7 @@ static NTSTATUS srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALL
r->out.ctr.ctr2->count = 0;
r->out.ctr.ctr2->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
+ return WERR_NOT_SUPPORTED;
break;
}
case 3: {
@@ -833,119 +779,118 @@ static NTSTATUS srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALL
r->out.ctr.ctr3->count = 0;
r->out.ctr.ctr3->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
+ return WERR_NOT_SUPPORTED;
break;
}
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
+ return WERR_UNKNOWN_LEVEL;
break;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NETRSERVERTRANSPORTDEL
*/
-static NTSTATUS srvsvc_NETRSERVERTRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERTRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERTRANSPORTDEL *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NET_REMOTE_TOD
*/
-static NTSTATUS srvsvc_NET_REMOTE_TOD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NET_REMOTE_TOD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NET_REMOTE_TOD *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSERVERSETSERVICEBITS
*/
-static NTSTATUS srvsvc_NETRSERVERSETSERVICEBITS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERSETSERVICEBITS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERSETSERVICEBITS *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRPRPATHTYPE
*/
-static NTSTATUS srvsvc_NETRPRPATHTYPE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRPRPATHTYPE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRPRPATHTYPE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRPRPATHCANONICALIZE
*/
-static NTSTATUS srvsvc_NETRPRPATHCANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRPRPATHCANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRPRPATHCANONICALIZE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRPRPATHCOMPARE
*/
-static NTSTATUS srvsvc_NETRPRPATHCOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRPRPATHCOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRPRPATHCOMPARE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NET_NAME_VALIDATE
*/
-static NTSTATUS srvsvc_NET_NAME_VALIDATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NET_NAME_VALIDATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NET_NAME_VALIDATE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRPRNAMECANONICALIZE
*/
-static NTSTATUS srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRPRNAMECANONICALIZE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRPRNAMECOMPARE
*/
-static NTSTATUS srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRPRNAMECOMPARE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NetShareEnum
*/
-static NTSTATUS srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetShareEnum *r)
{
struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
case 0: {
@@ -1077,181 +1022,181 @@ static NTSTATUS srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_C
break;
}
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
+ return WERR_UNKNOWN_LEVEL;
break;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
srvsvc_NETRSHAREDELSTART
*/
-static NTSTATUS srvsvc_NETRSHAREDELSTART(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSHAREDELSTART(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSHAREDELSTART *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSHAREDELCOMMIT
*/
-static NTSTATUS srvsvc_NETRSHAREDELCOMMIT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSHAREDELCOMMIT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSHAREDELCOMMIT *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NET_FILE_QUERY_SECDESC
*/
-static NTSTATUS srvsvc_NET_FILE_QUERY_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NET_FILE_QUERY_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NET_FILE_QUERY_SECDESC *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NET_FILE_SET_SECDESC
*/
-static NTSTATUS srvsvc_NET_FILE_SET_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NET_FILE_SET_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NET_FILE_SET_SECDESC *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSERVERTRANSPORTADDEX
*/
-static NTSTATUS srvsvc_NETRSERVERTRANSPORTADDEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERTRANSPORTADDEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERTRANSPORTADDEX *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSERVERSETSERVICEBITSEX
*/
-static NTSTATUS srvsvc_NETRSERVERSETSERVICEBITSEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERSETSERVICEBITSEX *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSGETVERSION
*/
-static NTSTATUS srvsvc_NETRDFSGETVERSION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSGETVERSION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSGETVERSION *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSCREATELOCALPARTITION
*/
-static NTSTATUS srvsvc_NETRDFSCREATELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSCREATELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSDELETELOCALPARTITION
*/
-static NTSTATUS srvsvc_NETRDFSDELETELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSDELETELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSSETLOCALVOLUMESTATE
*/
-static NTSTATUS srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSSETSERVERINFO
*/
-static NTSTATUS srvsvc_NETRDFSSETSERVERINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSSETSERVERINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSSETSERVERINFO *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSCREATEEXITPOINT
*/
-static NTSTATUS srvsvc_NETRDFSCREATEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSCREATEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSCREATEEXITPOINT *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSDELETEEXITPOINT
*/
-static NTSTATUS srvsvc_NETRDFSDELETEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSDELETEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSDELETEEXITPOINT *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSMODIFYPREFIX
*/
-static NTSTATUS srvsvc_NETRDFSMODIFYPREFIX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSMODIFYPREFIX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSMODIFYPREFIX *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSFIXLOCALVOLUME
*/
-static NTSTATUS srvsvc_NETRDFSFIXLOCALVOLUME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSFIXLOCALVOLUME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRDFSMANAGERREPORTSITEINFO
*/
-static NTSTATUS srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
srvsvc_NETRSERVERTRANSPORTDELEX
*/
-static NTSTATUS srvsvc_NETRSERVERTRANSPORTDELEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR srvsvc_NETRSERVERTRANSPORTDELEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index d6012c4dd4..663187ef33 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -62,23 +62,20 @@ static NTSTATUS winreg_bind(struct dcesrv_call_state *dc, const struct dcesrv_in
#define DCESRV_INTERFACE_WINREG_BIND winreg_bind
#define DCESRV_INTERFACE_WINREG_UNBIND winreg_unbind
-#define func_winreg_OpenHive(k,n) static NTSTATUS winreg_Open ## k (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_Open ## k *r) \
+#define func_winreg_OpenHive(k,n) static WERROR winreg_Open ## k (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_Open ## k *r) \
{ \
/*struct _privatedata *data = dce_call->conn->private;*/ \
/*REG_KEY *root = reg_get_root(data->registry);*/ \
REG_KEY *k /*= reg_open_key(root, n)*/; \
-\
if(!k) { \
- r->out.result = WERR_BADFILE; \
+ return WERR_BADFILE; \
} else { \
struct dcesrv_handle *h = dcesrv_handle_new(dce_call->conn, HTYPE_REGKEY); \
+ DCESRV_CHECK_HANDLE(h); \
h->data = k; \
r->out.handle = &h->wire_handle; \
} \
-\
- r->out.result = WERR_OK; \
-\
- return NT_STATUS_OK; \
+ return WERR_OK; \
}
func_winreg_OpenHive(HKCR,"\\HKEY_CLASSES_ROOT")
@@ -94,33 +91,31 @@ func_winreg_OpenHive(HKPN,"\\HKEY_PN")
/*
winreg_CloseKey
*/
-static NTSTATUS winreg_CloseKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_CloseKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_CloseKey *r)
{
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
- if(!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+
+ DCESRV_CHECK_HANDLE(h);
reg_key_free((REG_KEY *)h->data);
dcesrv_handle_destroy(dce_call->conn, h);
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
winreg_CreateKey
*/
-static NTSTATUS winreg_CreateKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_CreateKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_CreateKey *r)
{
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
WERROR error;
REG_KEY *parent;
- if(!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+
+ DCESRV_CHECK_HANDLE(h);
parent = h->data;
error = reg_key_add_name_recursive(parent, r->in.key.name);
@@ -131,283 +126,282 @@ static NTSTATUS winreg_CreateKey(struct dcesrv_call_state *dce_call, TALLOC_CTX
else dcesrv_handle_destroy(dce_call->conn, newh);
}
- r->out.result = error;
-
- return NT_STATUS_OK;
+ return error;
}
/*
winreg_DeleteKey
*/
-static NTSTATUS winreg_DeleteKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_DeleteKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_DeleteKey *r)
{
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
REG_KEY *parent, *key;
- if(!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+ WERROR result;
+
+ DCESRV_CHECK_HANDLE(h);
parent = h->data;
- r->out.result = reg_open_key(parent, r->in.key.name, &key);
- if(W_ERROR_IS_OK(r->out.result)) {
- r->out.result = reg_key_del(key);
+ result = reg_open_key(parent, r->in.key.name, &key);
+
+ if (W_ERROR_IS_OK(result)) {
+ return reg_key_del(key);
}
- return NT_STATUS_OK;
+
+ return result;
}
/*
winreg_DeleteValue
*/
-static NTSTATUS winreg_DeleteValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_DeleteValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_DeleteValue *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_EnumKey
*/
-static NTSTATUS winreg_EnumKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_EnumKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_EnumKey *r)
{
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
REG_KEY *key;
- if(!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+
+ DCESRV_CHECK_HANDLE(h);
key = h->data;
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_EnumValue
*/
-static NTSTATUS winreg_EnumValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_EnumValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_EnumValue *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_FlushKey
*/
-static NTSTATUS winreg_FlushKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_FlushKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_FlushKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_GetKeySecurity
*/
-static NTSTATUS winreg_GetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_GetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_GetKeySecurity *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_LoadKey
*/
-static NTSTATUS winreg_LoadKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_LoadKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_LoadKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_NotifyChangeKeyValue
*/
-static NTSTATUS winreg_NotifyChangeKeyValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_NotifyChangeKeyValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_NotifyChangeKeyValue *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_OpenKey
*/
-static NTSTATUS winreg_OpenKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_OpenKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_OpenKey *r)
{
struct dcesrv_handle *h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
REG_KEY *k, *subkey;
- if(!h) {
- return NT_STATUS_INVALID_HANDLE;
- }
+ WERROR result;
+
+ DCESRV_CHECK_HANDLE(h);
k = h->data;
- r->out.result = reg_open_key(k, r->in.keyname.name, &subkey);
- if(W_ERROR_IS_OK(r->out.result)) {
+ result = reg_open_key(k, r->in.keyname.name, &subkey);
+ if (W_ERROR_IS_OK(result)) {
h->data = subkey;
r->out.handle = &h->wire_handle;
}
- return NT_STATUS_OK;
+ return result;
}
/*
winreg_QueryInfoKey
*/
-static NTSTATUS winreg_QueryInfoKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_QueryInfoKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_QueryInfoKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_QueryValue
*/
-static NTSTATUS winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_QueryValue *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_ReplaceKey
*/
-static NTSTATUS winreg_ReplaceKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_ReplaceKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_ReplaceKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_RestoreKey
*/
-static NTSTATUS winreg_RestoreKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_RestoreKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_RestoreKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_SaveKey
*/
-static NTSTATUS winreg_SaveKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_SaveKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_SaveKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_SetKeySecurity
*/
-static NTSTATUS winreg_SetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_SetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_SetKeySecurity *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_SetValue
*/
-static NTSTATUS winreg_SetValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_SetValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_SetValue *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_UnLoadKey
*/
-static NTSTATUS winreg_UnLoadKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_UnLoadKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_UnLoadKey *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_InitiateSystemShutdown
*/
-static NTSTATUS winreg_InitiateSystemShutdown(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_InitiateSystemShutdown(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_InitiateSystemShutdown *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_AbortSystemShutdown
*/
-static NTSTATUS winreg_AbortSystemShutdown(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_AbortSystemShutdown(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_AbortSystemShutdown *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_GetVersion
*/
-static NTSTATUS winreg_GetVersion(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_GetVersion(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_GetVersion *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_QueryMultipleValues
*/
-static NTSTATUS winreg_QueryMultipleValues(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_QueryMultipleValues(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_QueryMultipleValues *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_InitiateSystemShutdownEx
*/
-static NTSTATUS winreg_InitiateSystemShutdownEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_InitiateSystemShutdownEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_InitiateSystemShutdownEx *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_SaveKeyEx
*/
-static NTSTATUS winreg_SaveKeyEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_SaveKeyEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_SaveKeyEx *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
winreg_QueryMultipleValues2
*/
-static NTSTATUS winreg_QueryMultipleValues2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR winreg_QueryMultipleValues2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct winreg_QueryMultipleValues2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index 9a94c0c5da..973877d8f8 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -26,11 +26,10 @@
/*
wkssvc_NetWkstaGetInfo
*/
-static NTSTATUS wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct wkssvc_NetWkstaGetInfo *r)
{
struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
- r->out.result = WERR_OK;
/* NOTE: win2k3 ignores r->in.server_name completly so we do --metze */
@@ -61,343 +60,336 @@ static NTSTATUS wkssvc_NetWkstaGetInfo(struct dcesrv_call_state *dce_call, TALLO
case 102: {
r->out.info.info102 = NULL;
- r->out.result = WERR_ACCESS_DENIED;
- break;
+ return WERR_ACCESS_DENIED;
}
case 502: {
r->out.info.info502 = NULL;
- r->out.result = WERR_ACCESS_DENIED;
- break;
- }
- default: {
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_ACCESS_DENIED;
}
+ default:
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
wkssvc_NetWkstaSetInfo
*/
-static NTSTATUS wkssvc_NetWkstaSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR wkssvc_NetWkstaSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct wkssvc_NetWkstaSetInfo *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRWKSTAUSERENUM
*/
-static NTSTATUS WKSSVC_NETRWKSTAUSERENUM(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWKSTAUSERENUM(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWKSTAUSERENUM *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRWKSTAUSERGETINFO
*/
-static NTSTATUS WKSSVC_NETRWKSTAUSERGETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWKSTAUSERGETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWKSTAUSERGETINFO *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRWKSTAUSERSETINFO
*/
-static NTSTATUS WKSSVC_NETRWKSTAUSERSETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWKSTAUSERSETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWKSTAUSERSETINFO *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
wkssvc_NetWkstaTransportEnum
*/
-static NTSTATUS wkssvc_NetWkstaTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR wkssvc_NetWkstaTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct wkssvc_NetWkstaTransportEnum *r)
{
r->out.level = r->in.level;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
- r->out.result = WERR_OK;
switch (r->in.level) {
- case 0: {
+ case 0:
r->out.ctr.ctr0 = talloc_p(mem_ctx, struct wkssvc_NetWkstaTransportCtr0);
WERR_TALLOC_CHECK(r->out.ctr.ctr0);
r->out.ctr.ctr0->count = 0;
r->out.ctr.ctr0->array = NULL;
- r->out.result = WERR_NOT_SUPPORTED;
- break;
- }
+ return WERR_NOT_SUPPORTED;
+
default:
- r->out.result = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return NT_STATUS_OK;
+ return WERR_OK;
}
/*
WKSSVC_NETRWKSTATRANSPORTADD
*/
-static NTSTATUS WKSSVC_NETRWKSTATRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWKSTATRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWKSTATRANSPORTADD *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRWKSTATRANSPORTDEL
*/
-static NTSTATUS WKSSVC_NETRWKSTATRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWKSTATRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUSEADD
*/
-static NTSTATUS WKSSVC_NETRUSEADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUSEADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUSEADD *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUSEGETINFO
*/
-static NTSTATUS WKSSVC_NETRUSEGETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUSEGETINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUSEGETINFO *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUSEDEL
*/
-static NTSTATUS WKSSVC_NETRUSEDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUSEDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUSEDEL *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUSEENUM
*/
-static NTSTATUS WKSSVC_NETRUSEENUM(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUSEENUM(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUSEENUM *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRMESSAGEBUFFERSEND
*/
-static NTSTATUS WKSSVC_NETRMESSAGEBUFFERSEND(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRMESSAGEBUFFERSEND(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRWORKSTATIONSTATISTICSGET
*/
-static NTSTATUS WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRLOGONDOMAINNAMEADD
*/
-static NTSTATUS WKSSVC_NETRLOGONDOMAINNAMEADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRLOGONDOMAINNAMEADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRLOGONDOMAINNAMEADD *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRLOGONDOMAINNAMEDEL
*/
-static NTSTATUS WKSSVC_NETRLOGONDOMAINNAMEDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRLOGONDOMAINNAMEDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRLOGONDOMAINNAMEDEL *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRJOINDOMAIN
*/
-static NTSTATUS WKSSVC_NETRJOINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRJOINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRJOINDOMAIN *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUNJOINDOMAIN
*/
-static NTSTATUS WKSSVC_NETRUNJOINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUNJOINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUNJOINDOMAIN *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRRENAMEMACHINEINDOMAIN
*/
-static NTSTATUS WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRVALIDATENAME
*/
-static NTSTATUS WKSSVC_NETRVALIDATENAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRVALIDATENAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRVALIDATENAME *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRGETJOININFORMATION
*/
-static NTSTATUS WKSSVC_NETRGETJOININFORMATION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRGETJOININFORMATION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRGETJOININFORMATION *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRGETJOINABLEOUS
*/
-static NTSTATUS WKSSVC_NETRGETJOINABLEOUS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRGETJOINABLEOUS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRGETJOINABLEOUS *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRJOINDOMAIN2
*/
-static NTSTATUS WKSSVC_NETRJOINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRJOINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRJOINDOMAIN2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRUNJOINDOMAIN2
*/
-static NTSTATUS WKSSVC_NETRUNJOINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRUNJOINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRUNJOINDOMAIN2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRRENAMEMACHINEINDOMAIN2
*/
-static NTSTATUS WKSSVC_NETRRENAMEMACHINEINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRRENAMEMACHINEINDOMAIN2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRVALIDATENAME2
*/
-static NTSTATUS WKSSVC_NETRVALIDATENAME2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRVALIDATENAME2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRVALIDATENAME2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRGETJOINABLEOUS2
*/
-static NTSTATUS WKSSVC_NETRGETJOINABLEOUS2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRGETJOINABLEOUS2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRGETJOINABLEOUS2 *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRADDALTERNATECOMPUTERNAME
*/
-static NTSTATUS WKSSVC_NETRADDALTERNATECOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRADDALTERNATECOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRADDALTERNATECOMPUTERNAME *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME
*/
-static NTSTATUS WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRSETPRIMARYCOMPUTERNAME
*/
-static NTSTATUS WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}
/*
WKSSVC_NETRENUMERATECOMPUTERNAMES
*/
-static NTSTATUS WKSSVC_NETRENUMERATECOMPUTERNAMES(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR WKSSVC_NETRENUMERATECOMPUTERNAMES(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct WKSSVC_NETRENUMERATECOMPUTERNAMES *r)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return WERR_NOT_SUPPORTED;
}