summaryrefslogtreecommitdiffstats
path: root/eBones/lib/libkrb/recvauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'eBones/lib/libkrb/recvauth.c')
-rw-r--r--eBones/lib/libkrb/recvauth.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/eBones/lib/libkrb/recvauth.c b/eBones/lib/libkrb/recvauth.c
index 8e9a6bb..45d68ee 100644
--- a/eBones/lib/libkrb/recvauth.c
+++ b/eBones/lib/libkrb/recvauth.c
@@ -14,6 +14,7 @@ static char rcsid[] =
#endif lint
#endif
+#include <krb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <syslog.h>
@@ -22,7 +23,6 @@ static char rcsid[] =
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
-#include <krb.h>
#define KRB_SENDAUTH_VERS "AUTHV0.1" /* MUST be KRB_SENDAUTH_VLEN
@@ -34,6 +34,8 @@ 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
@@ -120,14 +122,24 @@ static char rcsid[] =
#endif /* max */
int
-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)
+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) */
{
int i, cc, old_vers = 0;
char krb_vers[KRB_SENDAUTH_VLEN + 1]; /* + 1 for the null terminator */
- char *cp = NULL;
+ char *cp;
int rem;
long tkt_len, priv_len;
u_long cksum;
@@ -242,7 +254,7 @@ krb_recvauth(long options, int fd, KTEXT ticket, char *service, char *instance,
cksum = kdata->checksum + 1;
cksum = htonl(cksum);
#ifndef NOENCRYPTION
- key_sched((des_cblock *)kdata->session,schedule);
+ key_sched((C_Block *)kdata->session,schedule);
#endif
priv_len = krb_mk_priv((unsigned char *)&cksum,
tmp_buf,
OpenPOWER on IntegriCloud