r23381: Merge netr_GetDcName WERROR return and WERROR_DOMAIN_CONTROLLER_NOT_FOUND...
authorGünther Deschner <gd@samba.org>
Fri, 8 Jun 2007 10:32:29 +0000 (10:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:53:13 +0000 (14:53 -0500)
SAMBA_3_0.

Guenther
(This used to be commit 841ad140a34648ff52d5e44a6642f346ef9eee02)

source4/libcli/util/doserr.c
source4/libcli/util/doserr.h
source4/librpc/idl/netlogon.idl
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/torture/rpc/netlogon.c

index 716ca438db12d0b025f4f16f4ae2a035dd3d2dfb..76c59570a958c1bae5aec55299986404ad0532a0 100644 (file)
@@ -63,6 +63,7 @@ static const struct werror_code_struct dos_errs[] =
        { "WERR_JOB_NOT_FOUND", WERR_JOB_NOT_FOUND },
        { "WERR_DEST_NOT_FOUND", WERR_DEST_NOT_FOUND },
        { "WERR_NOT_LOCAL_DOMAIN", WERR_NOT_LOCAL_DOMAIN },
+       { "WERR_DOMAIN_CONTROLLER_NOT_FOUND", WERR_DOMAIN_CONTROLLER_NOT_FOUND },
        { "WERR_DEVICE_NOT_AVAILABLE", WERR_DEVICE_NOT_AVAILABLE },
        { "WERR_PRINTER_DRIVER_IN_USE", WERR_PRINTER_DRIVER_IN_USE },
        { "WERR_STATUS_MORE_ENTRIES", WERR_STATUS_MORE_ENTRIES },
index ddcc060eb620e9482df6bb036d400751ae071696..b091a290b9e4f61442430dee8bf7863ffd982d13 100644 (file)
 #define WERR_SESSION_NOT_FOUND W_ERROR(2312)
 #define WERR_FID_NOT_FOUND W_ERROR(2314)
 #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320)
+#define WERR_DOMAIN_CONTROLLER_NOT_FOUND W_ERROR(2453)
 #define WERR_DEVICE_NOT_AVAILABLE W_ERROR(4319)
 #define WERR_STATUS_MORE_ENTRIES   W_ERROR(0x0105)
 
index b83454908ef5b008ebc9578959372da0f16de372..eede7ed0353d21038476501c66b4dd4a87ed05c2 100644 (file)
@@ -756,7 +756,7 @@ interface netlogon
        /*****************/
        /* Function 0x0B */
 
-       NTSTATUS netr_GetDcName(
+       WERROR netr_GetDcName(
                [in]  [string,charset(UTF16)] uint16 logon_server[],
                [in]  [string,charset(UTF16)] uint16 *domainname,
                [out] [string,charset(UTF16)] uint16 *dcname
index 38356f7260a3d33a2319dd7c226a42d7be1c4511..20f2959abc1f6f5e7b03d0f1e663534e1cdd719b 100644 (file)
@@ -692,7 +692,7 @@ static NTSTATUS dcesrv_netr_AccountSync(struct dcesrv_call_state *dce_call, TALL
 /* 
   netr_GetDcName 
 */
-static NTSTATUS dcesrv_netr_GetDcName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR dcesrv_netr_GetDcName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                       struct netr_GetDcName *r)
 {
        DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
index 2c566d38ce0ba17ff3d8be31a983a95c499ed4d5..ec4ee5d18c8dcbb10f5f23ac5cbc304fa61857d1 100644 (file)
@@ -839,8 +839,8 @@ static BOOL test_GetDcName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        printf("Testing GetDcName\n");
 
        status = dcerpc_netr_GetDcName(p, mem_ctx, &r);
-       if (!NT_STATUS_IS_OK(status)) {
-               printf("GetDcName - %s\n", nt_errstr(status));
+       if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
+               printf("GetDcName - %s/%s\n", nt_errstr(status), win_errstr(r.out.result));
                return False;
        }