summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-08-18 20:38:48 +0000
committerTheodore Tso <tytso@mit.edu>1994-08-18 20:38:48 +0000
commite2e2b3e4b2e962a39b0d7feb2530d0cc556acd2d (patch)
tree8292ae7e15f842727d06c7c64d5697637addfd39 /src/lib
parent35173f3f598cb8bd56d2b30c567a044bc6e99f8a (diff)
downloadkrb5-e2e2b3e4b2e962a39b0d7feb2530d0cc556acd2d.tar.gz
krb5-e2e2b3e4b2e962a39b0d7feb2530d0cc556acd2d.tar.xz
krb5-e2e2b3e4b2e962a39b0d7feb2530d0cc556acd2d.zip
Fix to srvmatch so that when comparing the server, we ignore the realm for
the purposes of the comparison. This used to be the what this worked, but it was broken in the krb5 principal cutover long ago. Since we weren't doing cross-realm authentication, no one noticed.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4185 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/ccache/file/ChangeLog6
-rw-r--r--src/lib/krb5/ccache/file/fcc_retrv.c10
-rw-r--r--src/lib/krb5/ccache/stdio/ChangeLog6
-rw-r--r--src/lib/krb5/ccache/stdio/scc_retrv.c10
4 files changed, 30 insertions, 2 deletions
diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog
index 587798143..97748b5d2 100644
--- a/src/lib/krb5/ccache/file/ChangeLog
+++ b/src/lib/krb5/ccache/file/ChangeLog
@@ -1,3 +1,9 @@
+Thu Aug 18 16:33:33 1994 Theodore Y. Ts'o (tytso at tsx-11)
+
+ * fcc_retrv.c (srvname_match): Fix bug in srvname_match where so
+ that the server realm is really ignored in the compare, like it's
+ supposed to be.
+
Mon Jun 20 19:36:19 1994 Theodore Y. Ts'o (tytso at tsx-11)
* fcc.h: #include <krb5/osconf.h> so that build works using imake.
diff --git a/src/lib/krb5/ccache/file/fcc_retrv.c b/src/lib/krb5/ccache/file/fcc_retrv.c
index 134e4ff95..dceac5d15 100644
--- a/src/lib/krb5/ccache/file/fcc_retrv.c
+++ b/src/lib/krb5/ccache/file/fcc_retrv.c
@@ -180,10 +180,18 @@ srvname_match(mcreds, creds)
register const krb5_creds *mcreds, *creds;
{
krb5_boolean retval;
+ krb5_principal_data p1, p2;
+
retval = krb5_principal_compare(mcreds->client,creds->client);
if (retval != TRUE)
return retval;
- return krb5_principal_compare(mcreds->server, creds->server);
+ /*
+ * Hack to ignore the server realm for the purposes of the compare.
+ */
+ p1 = *mcreds->server;
+ p2 = *creds->server;
+ p1.realm = p2.realm;
+ return krb5_principal_compare(&p1, &p2);
}
static krb5_boolean
diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog
index 22070133e..56d6d4fb3 100644
--- a/src/lib/krb5/ccache/stdio/ChangeLog
+++ b/src/lib/krb5/ccache/stdio/ChangeLog
@@ -1,3 +1,9 @@
+Thu Aug 18 16:34:51 1994 Theodore Y. Ts'o (tytso at tsx-11)
+
+ * scc_retrv.c (srvname_match): Fix bug in srvname_match where so
+ that the server realm is really ignored in the compare, like it's
+ supposed to be.
+
Tue Aug 2 04:07:17 1994 Tom Yu (tlyu@dragons-lair)
* scc_maybe.c (krb5_scc_open_file): changed an #ifdef from
diff --git a/src/lib/krb5/ccache/stdio/scc_retrv.c b/src/lib/krb5/ccache/stdio/scc_retrv.c
index 5ee423737..071bd3005 100644
--- a/src/lib/krb5/ccache/stdio/scc_retrv.c
+++ b/src/lib/krb5/ccache/stdio/scc_retrv.c
@@ -78,10 +78,18 @@ srvname_match(mcreds, creds)
register const krb5_creds *mcreds, *creds;
{
krb5_boolean retval;
+ krb5_principal_data p1, p2;
+
retval = krb5_principal_compare(mcreds->client,creds->client);
if (retval != TRUE)
return retval;
- return krb5_principal_compare(mcreds->server, creds->server);
+ /*
+ * Hack to ignore the server realm for the purposes of the compare.
+ */
+ p1 = *mcreds->server;
+ p2 = *creds->server;
+ p1.realm = p2.realm;
+ return krb5_principal_compare(&p1, &p2);
}