diff options
author | markm <markm@FreeBSD.org> | 1995-09-07 21:39:00 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1995-09-07 21:39:00 +0000 |
commit | 2539acf77b018acd7416a9857a14c466e55cd7e8 (patch) | |
tree | 96ff3578d62372822240f11a1567e45b880f3910 /eBones/usr.sbin/kstash | |
parent | eed9438eb23b62f78af7685dc226228e2bf5c524 (diff) | |
download | FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.zip FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.tar.gz |
Major cleanup of eBones code:
- Get all functions prototyped or at least defined before use.
- Make code compile (Mostly) clean with -Wall set
- Start to reduce the degree to which DES aka libdes is built in.
- get all functions to the same uniform standard of definition:
int
foo(a, b)
int a;
int *b;
{
:
}
- fix numerous bugs exposed by above processes.
Note - this replaces the previous work which used an unpopular function
definition style.
Diffstat (limited to 'eBones/usr.sbin/kstash')
-rw-r--r-- | eBones/usr.sbin/kstash/Makefile | 8 | ||||
-rw-r--r-- | eBones/usr.sbin/kstash/kstash.c | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/eBones/usr.sbin/kstash/Makefile b/eBones/usr.sbin/kstash/Makefile index b194a2c..1387f8c 100644 --- a/eBones/usr.sbin/kstash/Makefile +++ b/eBones/usr.sbin/kstash/Makefile @@ -2,9 +2,9 @@ # $Id: Makefile,v 1.3 1995/07/18 16:40:14 mark Exp $ PROG= kstash -CFLAGS+=-DKERBEROS -DDEBUG -I${.CURDIR}/../include -DPADD= ${LIBKDB} ${LIBKRB} ${LIBDES} -LDADD= -L${KDBOBJDIR} -lkdb -L${KRBOBJDIR} -lkrb -L${DESOBJDIR} -ldes -NOMAN= noman +CFLAGS+=-DKERBEROS -DDEBUG -I${.CURDIR}/../include -Wall +DPADD= ${LIBKDB} ${LIBKRB} +LDADD= -L${KDBOBJDIR} -lkdb -L${KRBOBJDIR} -lkrb -ldes +MAN8= kstash.8 .include <bsd.prog.mk> diff --git a/eBones/usr.sbin/kstash/kstash.c b/eBones/usr.sbin/kstash/kstash.c index d5a59bf..ce26a1d 100644 --- a/eBones/usr.sbin/kstash/kstash.c +++ b/eBones/usr.sbin/kstash/kstash.c @@ -8,12 +8,17 @@ * $Id: kstash.c,v 1.3 1995/07/18 16:40:16 mark Exp $ */ +#if 0 #ifndef lint static char rcsid[] = "$Id: kstash.c,v 1.3 1995/07/18 16:40:16 mark Exp $"; #endif lint +#endif +#include <unistd.h> #include <stdio.h> +#include <string.h> +#include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> @@ -31,27 +36,23 @@ static char rcsid[] = #include <krb_db.h> #include <kdc.h> -extern int errno; - /* change this later, but krblib_dbm needs it for now */ char *progname; static C_Block master_key; static Key_schedule master_key_schedule; -static Principal s_name_data; /* for services requested */ -static unsigned char master_key_version; int debug; -static int more; static int kfile; static void clear_secrets(); +int main(argc, argv) int argc; char **argv; { long n; - if (n = kerb_init()) { - fprintf(stderr, "Kerberos db and cache init failed = %d\n", n); + if ((n = kerb_init())) { + fprintf(stderr, "Kerberos db and cache init failed = %ld\n", n); exit(1); } @@ -82,6 +83,7 @@ main(argc, argv) } (void) close(kfile); clear_secrets(); + return(0); } static void |