[PATCH] -ENOTSUP translates to NT_STATUS_NOT_SUPPORTED

Surbhi Palande surbhi.palande at canonical.com
Thu Aug 19 02:56:30 MDT 2010


https://launchpad.net/bugs/276472

This patch adds the translation of Unix Error code -ENOTSUP to NT Error Code
NT_STATUS_NOT_SUPPORTED. The absense of this translation wrongly sends back to
the client a STATUS_DENIED message in samba3.

Signed-off-by: Surbhi Palande <surbhi.palande at canonical.com>
---
* This patch is tested by one more Ubuntu user. Further testing appreciated.
 source3/lib/errmap_unix.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c
index d5b94e9..91a620e 100644
--- a/source3/lib/errmap_unix.c
+++ b/source3/lib/errmap_unix.c
@@ -105,7 +105,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = {
 #ifdef ECANCELED
 	{ ECANCELED, ERRDOS, ERRbadfid, NT_STATUS_CANCELLED},
 #endif
-
+#ifdef ENOTSUP
+        { ENOTSUP, ERRSRV, ERRnosupport, NT_STATUS_NOT_SUPPORTED},
+#endif
 	{ 0, 0, 0, NT_STATUS_OK }
 };
 
-- 
1.7.0.4



More information about the samba-technical mailing list