svn commit: samba r23381 - in branches/SAMBA_4_0/source: libcli/util librpc/idl rpc_server/netlogon torture/rpc

gd at samba.org gd at samba.org
Fri Jun 8 10:32:30 GMT 2007


Author: gd
Date: 2007-06-08 10:32:29 +0000 (Fri, 08 Jun 2007)
New Revision: 23381

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23381

Log:
Merge netr_GetDcName WERROR return and WERROR_DOMAIN_CONTROLLER_NOT_FOUND from
SAMBA_3_0.

Guenther

Modified:
   branches/SAMBA_4_0/source/libcli/util/doserr.c
   branches/SAMBA_4_0/source/libcli/util/doserr.h
   branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
   branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
   branches/SAMBA_4_0/source/torture/rpc/netlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/doserr.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/util/doserr.c	2007-06-08 10:29:46 UTC (rev 23380)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.c	2007-06-08 10:32:29 UTC (rev 23381)
@@ -63,6 +63,7 @@
 	{ "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 },

Modified: branches/SAMBA_4_0/source/libcli/util/doserr.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/util/doserr.h	2007-06-08 10:29:46 UTC (rev 23380)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.h	2007-06-08 10:32:29 UTC (rev 23381)
@@ -214,6 +214,7 @@
 #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)
 

Modified: branches/SAMBA_4_0/source/librpc/idl/netlogon.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/netlogon.idl	2007-06-08 10:29:46 UTC (rev 23380)
+++ branches/SAMBA_4_0/source/librpc/idl/netlogon.idl	2007-06-08 10:32:29 UTC (rev 23381)
@@ -756,7 +756,7 @@
 	/*****************/
 	/* 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

Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c	2007-06-08 10:29:46 UTC (rev 23380)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c	2007-06-08 10:32:29 UTC (rev 23381)
@@ -692,7 +692,7 @@
 /* 
   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);

Modified: branches/SAMBA_4_0/source/torture/rpc/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/netlogon.c	2007-06-08 10:29:46 UTC (rev 23380)
+++ branches/SAMBA_4_0/source/torture/rpc/netlogon.c	2007-06-08 10:32:29 UTC (rev 23381)
@@ -839,8 +839,8 @@
 	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;
 	}
 



More information about the samba-cvs mailing list