summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-27 00:00:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:53 -0500
commit3adeddcc4a948ec230db7ea4a6b0d3f1640ff3a6 (patch)
treeb86b4e19060203b81051e70e9da937c3efae60cf /source3/libads
parentf091c04392cec7c4f8f0185566b3560095b899c8 (diff)
downloadsamba-3adeddcc4a948ec230db7ea4a6b0d3f1640ff3a6.tar.gz
samba-3adeddcc4a948ec230db7ea4a6b0d3f1640ff3a6.tar.bz2
samba-3adeddcc4a948ec230db7ea4a6b0d3f1640ff3a6.zip
r21967: Add conversion from gss errors to nt status.
Jeremy (This used to be commit 8ba138efd097b08dcfe98f99b67c77579babf250)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ads_status.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/libads/ads_status.c b/source3/libads/ads_status.c
index d022e5b323..0e1a2d55d5 100644
--- a/source3/libads/ads_status.c
+++ b/source3/libads/ads_status.c
@@ -87,7 +87,7 @@ NTSTATUS ads_ntstatus(ADS_STATUS status)
#endif
#ifdef HAVE_GSSAPI
case ENUM_ADS_ERROR_GSS:
- return NT_STATUS_UNSUCCESSFUL;
+ return map_nt_error_from_gss(status.err.rc, status.minor_status);
#endif
default:
break;
@@ -145,5 +145,14 @@ const char *ads_errstr(ADS_STATUS status)
default:
return "Unknown ADS error type!? (not compiled in?)";
}
+}
+#ifdef HAVE_GSSAPI
+NTSTATUS gss_err_to_ntstatus(OM_uint32 maj, OM_uint32 min)
+{
+ ADS_STATUS adss = ADS_ERROR_GSS(maj, min);
+ DEBUG(10,("gss_err_to_ntstatus: Error %s\n",
+ ads_errstr(adss) ));
+ return ads_ntstatus(adss);
}
+#endif