Added realm compare function
authorTheodore Tso <tytso@mit.edu>
Thu, 29 Sep 1994 19:29:34 +0000 (19:29 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 29 Sep 1994 19:29:34 +0000 (19:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4377 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/ChangeLog
src/include/krb5/func-proto.h
src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/princ_comp.c

index c24eb4065b47119d5c62180223f541e010a1558b..cc7b695a3640dc4c76099a71bb7e1516d44ede62 100644 (file)
@@ -1,3 +1,8 @@
+Thu Sep 29 15:07:30 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * func_proto.h (krb5_realm_compare): Added prototype for functin
+               donated by OpenVision.  (Compares two realms).
+
 Wed Sep 21 18:10:55 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * func_proto.h (krb5_check_transited_list): Added prototype for
index f341a429dfce6ccd5c948192f59f9a6e7b5c67b8..faf9db40c1bd198341b50d59ef3331f27bd9ea0a 100644 (file)
@@ -128,6 +128,9 @@ krb5_boolean krb5_address_compare
 int krb5_address_order
        PROTOTYPE((const krb5_address *,
                   const krb5_address *));
+krb5_boolean krb5_realm_compare
+       PROTOTYPE((krb5_const_principal,
+                  krb5_const_principal));
 krb5_boolean krb5_principal_compare
        PROTOTYPE((krb5_const_principal,
                   krb5_const_principal));
index 665d800e2ef7e47ac8aecc6e054288076ec417ba..720529402c33c291772c0d4b8bd928826ad9b461 100644 (file)
@@ -1,3 +1,8 @@
+Thu Sep 29 15:10:42 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * princ_comp.c (krb5_realm_compare): Added new function from
+               OpenVision.
+
 Wed Sep 21 17:57:35 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * rd_req_dec.c (krb5_rd_req_decoded): Added Changes from Cybersafe
index 118bd769d898f6834287076942a81aa5e9dc22da..f1eedad1467f28cb64fac4155e64e7c563fd7da8 100644 (file)
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
+krb5_boolean
+krb5_realm_compare(princ1, princ2)
+krb5_const_principal princ1;
+krb5_const_principal princ2;
+{
+    if (krb5_princ_realm(princ1)->length != krb5_princ_realm(princ2)->length ||
+       memcmp (krb5_princ_realm(princ1)->data, krb5_princ_realm(princ2)->data,
+               krb5_princ_realm(princ2)->length))
+       return FALSE;
+
+    return TRUE;
+}
+
 krb5_boolean
 krb5_principal_compare(princ1, princ2)
 krb5_const_principal princ1;
@@ -40,9 +53,7 @@ krb5_const_principal princ2;
     if (nelem != krb5_princ_size(princ2))
        return FALSE;
 
-    if (krb5_princ_realm(princ1)->length != krb5_princ_realm(princ2)->length ||
-       memcmp (krb5_princ_realm(princ1)->data, krb5_princ_realm(princ2)->data,
-               krb5_princ_realm(princ2)->length))
+    if (! krb5_realm_compare(princ1, princ2))
        return FALSE;
 
     for (i = 0; i < nelem; i++) {