summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/util/errormap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 8fcf60b44e..29f2331cde 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1383,6 +1383,12 @@ NTSTATUS map_nt_error_from_unix(int unix_error)
return NT_STATUS_UNSUCCESSFUL;
}
+/* Convert a Unix error code to WERROR */
+WERROR unix_to_werror(int unix_error)
+{
+ return ntstatus_to_werror(map_nt_error_from_unix(unix_error));
+}
+
NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
{
switch (ndr_err) {