summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c177
1 files changed, 74 insertions, 103 deletions
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);
}