Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 1995 12:38:04 -0400 (EDT)
From:      John Capo <jc@irbs.com>
To:        freebsd-current@freefall.FreeBSD.org (freebsd-current)
Subject:   Kerberos patch that works
Message-ID:  <199509061638.MAA08588@irbs.irbs.com>

next in thread | raw e-mail | index | archive | help
Didn't look at a last second change close enough.

John Capo
IRBS Engineering


*** eBones/kerberos/kerberos.c.orig	Wed Sep  6 11:16:36 1995
--- eBones/kerberos/kerberos.c	Wed Sep  6 12:34:05 1995
***************
*** 67,73 ****
  static char *req_name_ptr;
  static char *req_inst_ptr;
  static char *req_realm_ptr;
- static u_char req_no_req;
  static u_long req_time_ws;
  
  int req_act_vno = KRB_PROT_VERSION; /* Temporary for version skew */
--- 67,72 ----
***************
*** 83,90 ****
  static long n_auth_req;
  static long n_appl_req;
  static long n_packets;
- static long n_user;
- static long n_server;
  
  static long max_age = -1;
  static long pause_int = -1;
--- 82,87 ----
***************
*** 334,340 ****
  
      static struct in_addr client_host;
      static int msg_byte_order;
-     static int swap_bytes;
      static u_char k_flags;
      char   *p_name, *instance;
      u_long  lifetime;
--- 331,336 ----
***************
*** 355,360 ****
--- 351,369 ----
  
      req_act_vno = req_version;
  
+     /* set up and correct for byte order and alignment */
+     req_name_ptr = (char *) pkt_a_name(pkt);
+     req_inst_ptr = (char *) pkt_a_inst(pkt);
+     req_realm_ptr = (char *) pkt_a_realm(pkt);
+ 
+     msg_byte_order = req_msg_type & 1;
+     bcopy(pkt_time_ws(pkt), &req_time_ws, sizeof(req_time_ws));
+ 
+     if (msg_byte_order != HOST_BYTE_ORDER) {
+     /* time has to be diddled */
+ 	swap_u_long(req_time_ws);
+     }
+ 
      /* check packet version */
      if (req_version != KRB_PROT_VERSION) {
  	lt = klog(L_KRB_PERR,
***************
*** 364,375 ****
  	kerb_err_reply(client, pkt, KERB_ERR_PKT_VER, lt);
  	return;
      }
-     msg_byte_order = req_msg_type & 1;
- 
-     swap_bytes = 0;
-     if (msg_byte_order != HOST_BYTE_ORDER) {
- 	swap_bytes++;
-     }
      klog(L_KRB_PINFO,
  	"Prot version: %d, Byte order: %d, Message type: %d",
  	 req_version, msg_byte_order, req_msg_type);
--- 373,378 ----
***************
*** 387,402 ****
  	    tk->length = 0;
  	    k_flags = 0;	/* various kerberos flags */
  
- 
- 	    /* set up and correct for byte order and alignment */
- 	    req_name_ptr = (char *) pkt_a_name(pkt);
- 	    req_inst_ptr = (char *) pkt_a_inst(pkt);
- 	    req_realm_ptr = (char *) pkt_a_realm(pkt);
- 	    bcopy(pkt_time_ws(pkt), &req_time_ws, sizeof(req_time_ws));
- 	    /* time has to be diddled */
- 	    if (swap_bytes) {
- 		swap_u_long(req_time_ws);
- 	    }
  	    ptr = (char *) pkt_time_ws(pkt) + 4;
  
  	    req_life = (u_long) (*ptr++);
--- 390,395 ----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509061638.MAA08588>