From 64faf800a3b8b18e7dbb28db5bb6cde612885863 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Wed, 28 Jun 1995 00:32:33 +0000 Subject: [PATCH] * encode.c: make declarations use KRB5_PROTOTYPE, and use old style definitions, per V5 coding style. Also deleted Makefile (from original code) since it gets stomped by configure git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6172 dc483132-0cff-0310-8789-dd5450dbe970 --- src/krb524/ChangeLog | 4 +++ src/krb524/Makefile | 77 -------------------------------------------- src/krb524/encode.c | 52 +++++++++++++++++++++--------- 3 files changed, 40 insertions(+), 93 deletions(-) delete mode 100644 src/krb524/Makefile diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 61730c471..5c0db8fd9 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,7 @@ +Tue Jun 27 20:27:06 1995 Mark Eichin + + * encode.c: make declarations use KRB5_PROTOTYPE, and use old + style definitions, per V5 coding style. Tue Jun 27 15:54:57 EDT 1995 Paul Park (pjpark@mit.edu) * cnv_tkt_skey.c - Cast key contents argument to conform to prototype. diff --git a/src/krb524/Makefile b/src/krb524/Makefile deleted file mode 100644 index fb088d6ae..000000000 --- a/src/krb524/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1994 by OpenVision Technologies, Inc. -# -# Permission to use, copy, modify, distribute, and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appears in all copies and -# that both that copyright notice and this permission notice appear in -# supporting documentation, and that the name of OpenVision not be used -# in advertising or publicity pertaining to distribution of the software -# without specific, written prior permission. OpenVision makes no -# representations about the suitability of this software for any -# purpose. It is provided "as is" without express or implied warranty. -# -# OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -# EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR -# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF -# USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -# PERFORMANCE OF THIS SOFTWARE. -# -# $Id$ - -KRB5TOP = /ua/software/build/sun4/krb5.src.B2/src - -# Library sources -SRCS = conv_creds.c conv_princ.c conv_tkt.c cnv_tkt_skey.c \ - encode.c misc.c globals.c sendmsg.c krb524_err.et -OBJS = conv_creds.o conv_princ.o conv_tkt.o cnv_tkt_skey.o \ - encode.o misc.o globals.o sendmsg.o krb524_err.o - -GENS = krb524_err.c krb524_err.h - -# Server stuff. -LDFLAGS= -L. -L/usr/local/lib -LIBS = -lkrb524 -lkdb5 -lkrb5 -lkrb -lcrypto /usr/local/lib/libdes.a \ - -lisode -lcom_err - -CL_LIBS = -lkrb524 -lkrb5 -lcrypto -lisode -lkrb -lcom_err - -CC = gcc -CFLAGS = -g -DUSE_MASTER -I. -I/usr/local/include - -all: libkrb524.a krb524d test k524init - -libkrb524.a: $(OBJS) - ar cru libkrb524.a $(OBJS) - ranlib libkrb524.a - -test: libkrb524.a test.o - $(CC) -o test $(LDFLAGS) test.o $(LIBS) - -krb524d: libkrb524.a krb524d.o - $(CC) -o krb524d krb524d.o $(LDFLAGS) $(LIBS) - -k524init: libkrb524.a k524init.o - $(CC) -o k524init $(LDFLAGS) k524init.o $(CL_LIBS) - -krb524d.o: krb524d.c - $(CC) -c $(CFLAGS) -I$(KRB5TOP)/include $*.c - -test.o: test.c - $(CC) -c $(CFLAGS) -I$(KRB5TOP)/include $*.c - -depend: $(GENS) - makedepend -- $(CFLAGS) -I$(KRB5TOP)/include -- $(SRCS) \ - test.c krb524d.c - -clean: - -rm -f libkrb524.a $(OBJS) $(GENS) core *~ *.bak #* - -rm -f test krb524d k524init test.o krb524d.o k524init.o - -krb524_err.c krb524_err.h: krb524_err.et - compile_et krb524_err.et - -.SUFFIXES: .et - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/src/krb524/encode.c b/src/krb524/encode.c index 8698847e3..b45f361c0 100644 --- a/src/krb524/encode.c +++ b/src/krb524/encode.c @@ -38,17 +38,21 @@ * the wheel is hidden. */ -int encode_v4tkt(KTEXT_ST *, char *, int *), - encode_ktext(char **, int *, KTEXT_ST *), - encode_bytes(char **, int *, char *, int), - encode_int32(char **, int *, krb5_int32 *); - -int decode_v4tkt(KTEXT_ST *, char *, int *), - decode_ktext(char **, int *, KTEXT_ST *), - decode_bytes(char **, int *, char *, int), - decode_int32(char **, int *, krb5_int32 *); - -int encode_bytes(char **out, int *outlen, char *in, int len) +int encode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)), + encode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)), + encode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)), + encode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *)); + +int decode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)), + decode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)), + decode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)), + decode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *)); + +int encode_bytes(out, outlen, in, len) + char **out; + int *outlen; + char *in; + int len; { if (len > *outlen) return KRB524_ENCFULL; @@ -58,7 +62,10 @@ int encode_bytes(char **out, int *outlen, char *in, int len) return 0; } -int encode_int32(char **out, int *outlen, krb5_int32 *v) +int encode_int32(out, outlen, v) + char **out; + int *outlen; + krb5_int32 *v; { int nv; @@ -66,7 +73,10 @@ int encode_int32(char **out, int *outlen, krb5_int32 *v) return encode_bytes(out, outlen, (char *) &nv, sizeof(nv)); } -int encode_v4tkt(KTEXT_ST *v4tkt, char *buf, int *encoded_len) +int encode_v4tkt(v4tkt, buf, encoded_len) + KTEXT_ST *v4tkt; + char *buf; + int *encoded_len; { int buflen, ret; @@ -85,7 +95,11 @@ int encode_v4tkt(KTEXT_ST *v4tkt, char *buf, int *encoded_len) /* decode functions */ -int decode_bytes(char **out, int *outlen, char *in, int len) +int decode_bytes(out, outlen, in, len) + char **out; + int *outlen; + char *in; + int len; { if (len > *outlen) return KRB524_DECEMPTY; @@ -95,7 +109,10 @@ int decode_bytes(char **out, int *outlen, char *in, int len) return 0; } -int decode_int32(char **out, int *outlen, krb5_int32 *v) +int decode_int32(out, outlen, v) + char **out; + int *outlen; + krb5_int32 *v; { int ret; int nv; @@ -106,7 +123,10 @@ int decode_int32(char **out, int *outlen, krb5_int32 *v) return 0; } -int decode_v4tkt(KTEXT_ST *v4tkt, char *buf, int *encoded_len) +int decode_v4tkt(v4tkt, buf, encoded_len) + KTEXT_ST *v4tkt; + char *buf; + int *encoded_len; { int buflen, ret; -- 2.26.2