summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-03-09 14:51:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:11:09 -0500
commite11a85eebd660073f3f68b7d6d289476e5193d28 (patch)
tree4d0d340f8be436f7e19b3d2d54526a432a435001 /source3/libads
parentaeea749548f691fa870a1c0668495973849a235b (diff)
downloadsamba-e11a85eebd660073f3f68b7d6d289476e5193d28.tar.gz
samba-e11a85eebd660073f3f68b7d6d289476e5193d28.tar.bz2
samba-e11a85eebd660073f3f68b7d6d289476e5193d28.zip
r14074: Some cleanup; there is no point in declaring and mapping
KRB5KRB_ERR_RESPONSE_TOO_BIG when the krb5 library does not know about this. Guenther (This used to be commit 4a1a3c4808307e09fa8ff85da9a963a4a6f0e9ae)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/krb5_errs.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/source3/libads/krb5_errs.c b/source3/libads/krb5_errs.c
index 0277596436..0c2e704702 100644
--- a/source3/libads/krb5_errs.c
+++ b/source3/libads/krb5_errs.c
@@ -23,7 +23,7 @@
#ifdef HAVE_KRB5
static const struct {
- long krb5_code;
+ krb5_error_code krb5_code;
NTSTATUS ntstatus;
} krb5_to_nt_status_map[] = {
{KRB5_CC_IO, NT_STATUS_UNEXPECTED_IO_ERROR},
@@ -52,13 +52,15 @@ static const struct {
{KRB5KRB_AP_ERR_SKEW, NT_STATUS_TIME_DIFFERENCE_AT_DC},
{KRB5KRB_AP_ERR_TKT_EXPIRED, NT_STATUS_LOGON_FAILURE},
{KRB5KRB_ERR_GENERIC, NT_STATUS_UNSUCCESSFUL},
+#if defined(KRB5KRB_ERR_RESPONSE_TOO_BIG)
{KRB5KRB_ERR_RESPONSE_TOO_BIG, NT_STATUS_PROTOCOL_UNREACHABLE},
+#endif
{0, NT_STATUS_OK}
};
static const struct {
NTSTATUS ntstatus;
- long krb5_code;
+ krb5_error_code krb5_code;
} nt_status_to_krb5_map[] = {
{NT_STATUS_LOGON_FAILURE, KRB5KDC_ERR_PREAUTH_FAILED},
{NT_STATUS_NO_LOGON_SERVERS, KRB5_KDC_UNREACH},
@@ -68,7 +70,7 @@ static const struct {
/*****************************************************************************
convert a KRB5 error to a NT status32 code
*****************************************************************************/
-NTSTATUS krb5_to_nt_status(int kerberos_error)
+ NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error)
{
int i;
@@ -87,7 +89,7 @@ NTSTATUS krb5_to_nt_status(int kerberos_error)
/*****************************************************************************
convert an NT status32 code to a KRB5 error
*****************************************************************************/
-int nt_status_to_krb5(NTSTATUS nt_status)
+ krb5_error_code nt_status_to_krb5(NTSTATUS nt_status)
{
int i;
@@ -103,30 +105,5 @@ int nt_status_to_krb5(NTSTATUS nt_status)
return KRB5KRB_ERR_GENERIC;
}
-#else
-
-/*****************************************************************************
-convert a KRB5 error to a NT status32 code
- *****************************************************************************/
-NTSTATUS krb5_to_nt_status(int kerberos_error)
-{
- if (kerberos_error == 0) {
- return NT_STATUS_OK;
- }
-
- return NT_STATUS_UNSUCCESSFUL;
-}
-
-/*****************************************************************************
-convert an NT status32 code to a KRB5 error
- *****************************************************************************/
-int nt_status_to_krb5(NTSTATUS nt_status)
-{
- if (NT_STATUS_EQUAL(nt_status, NT_STATUS_OK)) {
- return 0;
- }
- return -1; /* FIXME: what to return here ? */
-}
-
#endif