diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 1996-01-01 11:01:15 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 1996-01-01 11:01:15 +0000 |
commit | 26ce5ad3876f0ea63ab67a8bdb2ed1a5a1591a3e (patch) | |
tree | 69e72e626f1337094ba2f18cd7fded3ecaa930bf /eBones/lib/libkrb/pkt_clen.c | |
parent | a3ab491d642b34f2d3efbc0562abc8e79b38ce09 (diff) | |
download | src-e841b8130f0baf69a1599e0ac35a6281c4e3202b.tar.gz src-e841b8130f0baf69a1599e0ac35a6281c4e3202b.zip |
Diffstat (limited to 'eBones/lib/libkrb/pkt_clen.c')
-rw-r--r-- | eBones/lib/libkrb/pkt_clen.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/eBones/lib/libkrb/pkt_clen.c b/eBones/lib/libkrb/pkt_clen.c deleted file mode 100644 index f8dacae34faa..000000000000 --- a/eBones/lib/libkrb/pkt_clen.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute - * of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * from: pkt_clen.c,v 4.7 88/11/15 16:56:36 jtkohl Exp $ - * $Id: pkt_clen.c,v 1.3 1995/07/18 16:39:27 mark Exp $ - */ - -#if 0 -#ifndef lint -static char *rcsid = -"$Id: pkt_clen.c,v 1.3 1995/07/18 16:39:27 mark Exp $"; -#endif /* lint */ -#endif - -#include <string.h> - -#include <krb.h> -#include <prot.h> - -extern int krb_debug; -extern int swap_bytes; - -/* - * Given a pointer to an AUTH_MSG_KDC_REPLY packet, return the length of - * its ciphertext portion. The external variable "swap_bytes" is assumed - * to have been set to indicate whether or not the packet is in local - * byte order. pkt_clen() takes this into account when reading the - * ciphertext length out of the packet. - */ - -int -pkt_clen(pkt) - KTEXT pkt; -{ - static unsigned short temp,temp2; - int clen = 0; - - /* Start of ticket list */ - unsigned char *ptr = pkt_a_realm(pkt) + 10 - + strlen((char *)pkt_a_realm(pkt)); - - /* Finally the length */ - bcopy((char *)(++ptr),(char *)&temp,2); /* alignment */ - if (swap_bytes) { - /* assume a short is 2 bytes?? */ - swab((char *)&temp,(char *)&temp2,2); - temp = temp2; - } - - clen = (int) temp; - - if (krb_debug) - printf("Clen is %d\n",clen); - return(clen); -} |