From 57a4319baaee011f2604eadeac655ff1c84d4312 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Mon, 24 Mar 2014 11:52:48 +0000 Subject: Allow FSRVP access generic HRESULT error message descriptions FSRVP can possibly return any HRESULT error in addition to it's own specific errors. This change searches the HRESULT errors for a description if the error doesn't match any of the known FSRVP ones. Also removed some errors defined in fsrvp.idl (now that they are defined in hresult.h) Signed-off-by: Noel Power Reviewed-by: David Disseldorp Reviewed-by: Stefan Metzmacher --- source3/rpcclient/cmd_fss.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3') diff --git a/source3/rpcclient/cmd_fss.c b/source3/rpcclient/cmd_fss.c index 945f4d994e0..54fade7ee11 100644 --- a/source3/rpcclient/cmd_fss.c +++ b/source3/rpcclient/cmd_fss.c @@ -23,6 +23,7 @@ #include "rpcclient.h" #include "../librpc/gen_ndr/ndr_fsrvp.h" #include "../librpc/gen_ndr/ndr_fsrvp_c.h" +#include "../libcli/util/hresult.h" static const struct { uint32_t error_code; @@ -100,6 +101,13 @@ static const char *get_error_str(uint32_t code) break; } } + /* error isn't specific fsrvp one, check hresult errors */ + if (result == default_err) { + const char *hres_err = hresult_errstr_const(HRES_ERROR(code)); + if (hres_err) { + result = hres_err; + } + } return result; }; -- cgit