[Patch] fix regression in NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error mapping [bug #12585]

Stefan Metzmacher metze at samba.org
Tue Feb 21 14:55:45 UTC 2017


Hi,

here's a patch that fixes the error mapping
for NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE.
https://bugzilla.samba.org/show_bug.cgi?id=12585

Please review and push:-)

Thanks!
metze
-------------- next part --------------
From f5479f41bd1828a5872292c763319f6f186b2d13 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 15 Feb 2017 08:07:06 +0100
Subject: [PATCH] librpc/rpc: fix regression in
 NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error mapping

Commit 1eef70872930fa4f9d3dedd23476b34cae638428 changed the mapping for
DCERPC_NCA_S_FAULT_INVALID_TAG from NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE
to NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12585

Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
 librpc/rpc/dcerpc_error.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/librpc/rpc/dcerpc_error.c b/librpc/rpc/dcerpc_error.c
index bfcd216..d8ff0ab 100644
--- a/librpc/rpc/dcerpc_error.c
+++ b/librpc/rpc/dcerpc_error.c
@@ -50,12 +50,10 @@ static const struct dcerpc_fault_table dcerpc_faults[] =
 	_FAULT_STR(DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_INT_OVERFLOW, NT_STATUS_RPC_FP_OVERFLOW),
 	/*
-	 * What's the difference between NT_STATUS_RPC_INVALID_TAG
-	 * and NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE ???
-	 *
-	 * Our callers expect NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE.
+	 * Our callers expect NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE
+	 * instead of NT_STATUS_RPC_INVALID_TAG.
 	 */
-	_FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE),
+	_FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG, NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_TAG, NT_STATUS_RPC_INVALID_TAG),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_INVALID_BOUND, NT_STATUS_RPC_INVALID_BOUND),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH, NT_STATUS_RPC_PROTOCOL_ERROR),
-- 
1.9.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170221/bc41ed2a/signature.sig>


More information about the samba-technical mailing list