summaryrefslogtreecommitdiff
path: root/source3/lib/errmap_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/errmap_unix.c')
-rw-r--r--source3/lib/errmap_unix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c
index 91a620ecce..b4a98f9634 100644
--- a/source3/lib/errmap_unix.c
+++ b/source3/lib/errmap_unix.c
@@ -141,6 +141,12 @@ NTSTATUS map_nt_error_from_unix(int unix_error)
return NT_STATUS_ACCESS_DENIED;
}
+/* Convert a Unix error code to a WERROR. */
+WERROR unix_to_werror(int unix_error)
+{
+ return ntstatus_to_werror(map_nt_error_from_unix(unix_error));
+}
+
/* Return a UNIX errno from a NT status code */
static const struct {
NTSTATUS status;