summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-09-29 02:27:50 +0000
committerKeith Vetter <keithv@fusion.com>1995-09-29 02:27:50 +0000
commit4e848f98be5178109409aacfbc7e7749d54c5499 (patch)
treecedec7873b9d1e49bace53077af3807ddfcbf5ac /src/lib
parentbb7017e221c8f2af6d234c4d236415b91bb610c5 (diff)
downloadkrb5-4e848f98be5178109409aacfbc7e7749d54c5499.tar.gz
krb5-4e848f98be5178109409aacfbc7e7749d54c5499.tar.xz
krb5-4e848f98be5178109409aacfbc7e7749d54c5499.zip
Misc Mac cleanups
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6881 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gssapi/generic/ChangeLog9
-rw-r--r--src/lib/gssapi/generic/gssapi_generic.h6
-rw-r--r--src/lib/krb5/krb/ChangeLog6
-rw-r--r--src/lib/krb5/krb/gc_via_tkt.c56
4 files changed, 53 insertions, 24 deletions
diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog
index d123ad025..2bf0aad4a 100644
--- a/src/lib/gssapi/generic/ChangeLog
+++ b/src/lib/gssapi/generic/ChangeLog
@@ -1,3 +1,12 @@
+Mon Sep 28 12:00:00 1995 John Rivlin <jrivlin@fusion.com>
+
+ * gssapi_generic.h: Modified to use build in compiler symbols rather
+ than relying on _MACINTOSH so the projects can include the file
+ without using our headers.
+
+ * Makefile.in: Removed "foo:: foo-$(WHAT)" lines from the
+ Makefile.
+
Mon Sep 25 16:53:00 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in: Removed "foo:: foo-$(WHAT)" lines from the
diff --git a/src/lib/gssapi/generic/gssapi_generic.h b/src/lib/gssapi/generic/gssapi_generic.h
index 462414de6..fe2282796 100644
--- a/src/lib/gssapi/generic/gssapi_generic.h
+++ b/src/lib/gssapi/generic/gssapi_generic.h
@@ -23,10 +23,10 @@
#ifndef _GSSAPI_GENERIC_H_
#define _GSSAPI_GENERIC_H_
-#ifndef _MACINTOSH
-#include <gssapi/gssapi.h>
-#else
+#if defined(__MWERKS__) || defined(applec) || defined(THINK_C)
#include <gssapi.h>
+#else
+#include <gssapi/gssapi.h>
#endif
extern const gss_OID_desc FAR * const gss_nt_user_name;
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index abd822e5c..b1a51a6e4 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,3 +1,9 @@
+Thu Sep 28 12:00:00 1995 John Rivlin <jrivlin@fusion.com)
+
+ * gc_via_tkt.c: Cleaned up corrupt ticket error testing to
+ make it more debugable and I think work around a compiler
+ bug.
+
Mon Sep 25 16:57:59 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in: Removed "foo:: foo-$(WHAT)" lines from the
diff --git a/src/lib/krb5/krb/gc_via_tkt.c b/src/lib/krb5/krb/gc_via_tkt.c
index b310a10f9..b2ca37fc5 100644
--- a/src/lib/krb5/krb/gc_via_tkt.c
+++ b/src/lib/krb5/krb/gc_via_tkt.c
@@ -179,29 +179,43 @@ krb5_get_cred_via_tkt (context, tkt, kdcoptions, address, in_cred, out_cred)
retval = KRB5KRB_AP_ERR_MSG_TYPE;
goto error_3;
}
-
+
/* make sure the response hasn't been tampered with..... */
- if (!krb5_principal_compare(context, dec_rep->client, tkt->client) ||
- !krb5_principal_compare(context, dec_rep->enc_part2->server,
- in_cred->server) ||
- !krb5_principal_compare(context, dec_rep->ticket->server,
- in_cred->server) ||
- (dec_rep->enc_part2->nonce != tgsrep.expected_nonce) ||
- ((in_cred->times.starttime != 0) &&
- (in_cred->times.starttime != dec_rep->enc_part2->times.starttime)) ||
- ((in_cred->times.endtime != 0) &&
- (dec_rep->enc_part2->times.endtime > in_cred->times.endtime)) ||
- ((kdcoptions & KDC_OPT_RENEWABLE) &&
- (in_cred->times.renew_till != 0) &&
- (dec_rep->enc_part2->times.renew_till > in_cred->times.renew_till)) ||
- ((kdcoptions & KDC_OPT_RENEWABLE_OK) &&
- (dec_rep->enc_part2->flags & KDC_OPT_RENEWABLE) &&
- (in_cred->times.endtime != 0) &&
- (dec_rep->enc_part2->times.renew_till > in_cred->times.endtime))
- ) {
+ retval = 0;
+
+ if (!krb5_principal_compare(context, dec_rep->client, tkt->client))
retval = KRB5_KDCREP_MODIFIED;
- goto error_3;
- }
+
+ if (!krb5_principal_compare(context, dec_rep->enc_part2->server, in_cred->server))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if (!krb5_principal_compare(context, dec_rep->ticket->server, in_cred->server))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if (dec_rep->enc_part2->nonce != tgsrep.expected_nonce)
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if ((in_cred->times.starttime != 0) &&
+ (in_cred->times.starttime != dec_rep->enc_part2->times.starttime))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if ((in_cred->times.endtime != 0) &&
+ (dec_rep->enc_part2->times.endtime > in_cred->times.endtime))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if ((kdcoptions & KDC_OPT_RENEWABLE) &&
+ (in_cred->times.renew_till != 0) &&
+ (dec_rep->enc_part2->times.renew_till > in_cred->times.renew_till))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if ((kdcoptions & KDC_OPT_RENEWABLE_OK) &&
+ (dec_rep->enc_part2->flags & KDC_OPT_RENEWABLE) &&
+ (in_cred->times.endtime != 0) &&
+ (dec_rep->enc_part2->times.renew_till > in_cred->times.endtime))
+ retval = KRB5_KDCREP_MODIFIED;
+
+ if (retval != 0)
+ goto error_3;
if (!in_cred->times.starttime &&
!in_clock_skew(dec_rep->enc_part2->times.starttime,