updates for new mk_safe/mk_priv interfaces
authorJohn Kohl <jtkohl@mit.edu>
Wed, 27 Feb 1991 11:49:07 +0000 (11:49 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 27 Feb 1991 11:49:07 +0000 (11:49 +0000)
add KRB5_*_NOTIME flag to insure we don't do time

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1798 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/kprop.c
src/slave/kpropd.c

index 98fc7e79ec9f201049b1bd1480ba94c66aab14be..45ae9b2607cbdabb58ac48038d31bada0eb6083b 100644 (file)
@@ -2,7 +2,8 @@
  * $Source$
  * $Author$
  *
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
  *
  * For copying and distribution information, please see the file
  * <krb5/copyright.h>.
@@ -14,7 +15,6 @@ static char rcsid_kprop_c[] =
 "$Id$";
 #endif /* !lint && !SABER */
 
-#include <krb5/copyright.h>
 #include <krb5/krb5.h>
 #include <krb5/asn1.h>
 #include <krb5/osconf.h>
@@ -382,7 +382,7 @@ void kerberos_authenticate(fd, me)
                exit(1);
        }
        his_seq_num = rep_result->seq_number;
-       krb5_free_ap_rep_enc_part(repl);
+       krb5_free_ap_rep_enc_part(rep_result);
 }
 
 /*
@@ -471,7 +471,9 @@ xmit_database(fd, database_fd, database_size)
        if (retval = krb5_mk_safe(&inbuf, KPROP_CKSUMTYPE,
                                  &my_creds.keyblock, 
                                  &sender_addr, &receiver_addr,
-                                 my_seq_num++, KRB5_PRIV_DOSEQUENCE,
+                                 my_seq_num++,
+                                 KRB5_PRIV_DOSEQUENCE|KRB5_SAFE_NOTIME,
+                                 0,    /* no rcache when NOTIME */
                                  &outbuf)) {
                com_err(progname, retval, "while encoding database size");
                send_error(fd, "while encoding database size", retval);
@@ -507,7 +509,8 @@ xmit_database(fd, database_fd, database_size)
                                          &sender_addr,
                                          &receiver_addr,
                                          my_seq_num++,
-                                         KRB5_PRIV_DOSEQUENCE,
+                                         KRB5_PRIV_DOSEQUENCE|KRB5_PRIV_NOTIME,
+                                         0, /* again, no rcache */
                                          i_vector,
                                          &outbuf)) {
                        sprintf(buf,
@@ -572,7 +575,8 @@ xmit_database(fd, database_fd, database_size)
        }
        if (retval = krb5_rd_safe(&inbuf, &my_creds.keyblock, &receiver_addr,
                                  &sender_addr, his_seq_num++,
-                                 KRB5_SAFE_DOSEQUENCE, 0, &outbuf)) {
+                                 KRB5_SAFE_DOSEQUENCE|KRB5_SAFE_NOTIME,
+                                 0, &outbuf)) {
                com_err(progname, retval,
                        "while decoding final size packet from server");
                exit(1);
index 9dff84dc4729211e5a3426f71142bd8d6e43cac4..002ad5b4b290f0c94a5be04027ece0870a7b1212 100644 (file)
@@ -2,7 +2,8 @@
  * $Source$
  * $Author$
  *
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
  *
  * For copying and distribution information, please see the file
  * <krb5/copyright.h>.
@@ -14,7 +15,6 @@ static char rcsid_kpropd_c[] =
 "$Id$";
 #endif /* !lint && !SABER */
 
-#include <krb5/copyright.h>
 #include <krb5/krb5.h>
 #include <krb5/asn1.h>
 #include <krb5/osconf.h>
@@ -26,7 +26,10 @@ static char rcsid_kpropd_c[] =
 #include <errno.h>
 
 #include <stdio.h>
+#ifndef __STDC__
+/* com_err.h gets <stdarg.h> */
 #include <varargs.h>
+#endif
 #include <ctype.h>
 #include <sys/file.h>
 #include <signal.h>
@@ -587,7 +590,8 @@ recv_database(fd, database_fd)
                recv_error(&inbuf);
        if (retval = krb5_rd_safe(&inbuf, session_key, &sender_addr,
                                  &receiver_addr, his_seq_num++,
-                                 KRB5_SAFE_DOSEQUENCE, 0, &outbuf)) {
+                                 KRB5_SAFE_DOSEQUENCE|KRB5_SAFE_NOTIME,
+                                 0, &outbuf)) {
                send_error(fd, retval, "while decoding database size");
                xfree(inbuf.data);
                com_err(progname, retval,
@@ -627,7 +631,8 @@ recv_database(fd, database_fd)
                        recv_error(&inbuf);
                if (retval = krb5_rd_priv(&inbuf, session_key,
                                          &sender_addr, &receiver_addr,
-                                         his_seq_num++, KRB5_PRIV_DOSEQUENCE,
+                                         his_seq_num++,
+                                         KRB5_PRIV_DOSEQUENCE|KRB5_PRIV_NOTIME,
                                          i_vector, 0, &outbuf)) {
                        sprintf(buf,
                                "while decoding database block starting at offset %d",
@@ -673,7 +678,9 @@ recv_database(fd, database_fd)
                                  /* Note these are reversed because */
                                  /* we are sending, not receiving! */
                                  &receiver_addr, &sender_addr, 
-                                 my_seq_num++, KRB5_PRIV_DOSEQUENCE,
+                                 my_seq_num++,
+                                 KRB5_PRIV_DOSEQUENCE|KRB5_PRIV_NOTIME,
+                                 0,    /* no rcache when NOTIME */
                                  &outbuf)) {
                com_err(progname, retval,
                        "while encoding # of receieved bytes");