summaryrefslogtreecommitdiffstats
path: root/eBones/krb/recvauth.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
committermarkm <markm@FreeBSD.org>1995-08-25 22:52:32 +0000
commita83b802bada404e3b2eccf92c3499966deaad171 (patch)
tree45f2ba147600b7d47d9e9695cf572877c7fa4773 /eBones/krb/recvauth.c
parent2d8492d7c86b21502ee9277e20ef1e6e931b7c44 (diff)
downloadFreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.zip
FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.tar.gz
Start the eBones cleanup ball rolling.
These are the start of a lot of work to clean up the FreeBSD eBones code. these changes include, but are not limited to: - Create prototypes for all the library routines - Make all the libraries compile clean with -Wall set - Fix numerous small bugs shown up in the above process - Prepare the code for libdes's removal to secure/ - add register, registerd and make_keypair to the make Lots more will follow in days to come. OK'ed by: rgrimes
Diffstat (limited to 'eBones/krb/recvauth.c')
-rw-r--r--eBones/krb/recvauth.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/eBones/krb/recvauth.c b/eBones/krb/recvauth.c
index 2ab364f..8e9a6bb 100644
--- a/eBones/krb/recvauth.c
+++ b/eBones/krb/recvauth.c
@@ -4,21 +4,25 @@
* <Copyright.MIT>.
*
* from: recvauth.c,v 4.4 90/03/10 19:03:08 jon Exp $";
- * $Id: recvauth.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $
+ * $Id: recvauth.c,v 1.3 1995/07/18 16:39:38 mark Exp $
*/
+#if 0
#ifndef lint
static char rcsid[] =
-"$Id: recvauth.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $";
+"$Id: recvauth.c,v 1.3 1995/07/18 16:39:38 mark Exp $";
#endif lint
+#endif
-#include <krb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <syslog.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#include <strings.h>
+#include <krb.h>
#define KRB_SENDAUTH_VERS "AUTHV0.1" /* MUST be KRB_SENDAUTH_VLEN
@@ -30,8 +34,6 @@ static char rcsid[] =
* be sure to support old versions of krb_sendauth!
*/
-extern int errno;
-
/*
* krb_recvauth() reads (and optionally responds to) a message sent
* using krb_sendauth(). The "options" argument is a bit-field of
@@ -118,24 +120,14 @@ extern int errno;
#endif /* max */
int
-krb_recvauth(options, fd, ticket, service, instance, faddr, laddr, kdata,
- filename, schedule, version)
-long options; /* bit-pattern of options */
-int fd; /* file descr. to read from */
-KTEXT ticket; /* storage for client's ticket */
-char *service; /* service expected */
-char *instance; /* inst expected (may be filled in) */
-struct sockaddr_in *faddr; /* address of foreign host on fd */
-struct sockaddr_in *laddr; /* local address */
-AUTH_DAT *kdata; /* kerberos data (returned) */
-char *filename; /* name of file with service keys */
-Key_schedule schedule; /* key schedule (return) */
-char *version; /* version string (filled in) */
+krb_recvauth(long options, int fd, KTEXT ticket, char *service, char *instance,
+ struct sockaddr_in *faddr, struct sockaddr_in *laddr, AUTH_DAT *kdata,
+ char *filename, des_key_schedule schedule, char *version)
{
int i, cc, old_vers = 0;
char krb_vers[KRB_SENDAUTH_VLEN + 1]; /* + 1 for the null terminator */
- char *cp;
+ char *cp = NULL;
int rem;
long tkt_len, priv_len;
u_long cksum;
@@ -250,7 +242,7 @@ char *version; /* version string (filled in) */
cksum = kdata->checksum + 1;
cksum = htonl(cksum);
#ifndef NOENCRYPTION
- key_sched(kdata->session,schedule);
+ key_sched((des_cblock *)kdata->session,schedule);
#endif
priv_len = krb_mk_priv((unsigned char *)&cksum,
tmp_buf,
OpenPOWER on IntegriCloud