summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2014-03-24 11:52:48 +0000
committerStefan Metzmacher <metze@samba.org>2014-04-02 20:25:07 +0200
commit57a4319baaee011f2604eadeac655ff1c84d4312 (patch)
tree63dc75cf299e010e334214a6adcbc60a720ae227 /source3
parent027afd11ca404f24726013d0f9805f42b14e59d7 (diff)
downloadsamba-57a4319baaee011f2604eadeac655ff1c84d4312.tar.gz
samba-57a4319baaee011f2604eadeac655ff1c84d4312.tar.xz
samba-57a4319baaee011f2604eadeac655ff1c84d4312.zip
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 <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_fss.c8
1 files changed, 8 insertions, 0 deletions
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;
};