git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@993 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-11-17 00:18:18 +00:00
parent 74c0bb16f5
commit 1fecad00ea

View File

@@ -199,9 +199,7 @@ static int i_support = 0;
static int i_wont_support = 0; static int i_wont_support = 0;
Authenticator * Authenticator *
findauthenticator(type, way) findauthenticator(int type, int way)
int type;
int way;
{ {
Authenticator *ap = authenticators; Authenticator *ap = authenticators;
@@ -211,9 +209,7 @@ findauthenticator(type, way)
} }
void void
auth_init(name, server) auth_init(char *name, int server)
char *name;
int server;
{ {
Authenticator *ap = authenticators; Authenticator *ap = authenticators;
@@ -239,8 +235,7 @@ auth_init(name, server)
} }
void void
auth_disable_name(name) auth_disable_name(char *name)
char *name;
{ {
int x; int x;
for (x = 0; x < AUTHTYPE_CNT; ++x) { for (x = 0; x < AUTHTYPE_CNT; ++x) {
@@ -252,9 +247,7 @@ auth_disable_name(name)
} }
int int
getauthmask(type, maskp) getauthmask(char *type, int *maskp)
char *type;
int *maskp;
{ {
register int x; register int x;
@@ -273,23 +266,19 @@ getauthmask(type, maskp)
} }
int int
auth_enable(type) auth_enable(char *type)
char *type;
{ {
return(auth_onoff(type, 1)); return(auth_onoff(type, 1));
} }
int int
auth_disable(type) auth_disable(char *type)
char *type;
{ {
return(auth_onoff(type, 0)); return(auth_onoff(type, 0));
} }
int int
auth_onoff(type, on) auth_onoff(char *type, int on)
char *type;
int on;
{ {
int i, mask = -1; int i, mask = -1;
Authenticator *ap; Authenticator *ap;
@@ -320,8 +309,7 @@ auth_onoff(type, on)
} }
int int
auth_togdebug(on) auth_togdebug(int on)
int on;
{ {
if (on < 0) if (on < 0)
auth_debug_mode ^= 1; auth_debug_mode ^= 1;
@@ -332,7 +320,7 @@ auth_togdebug(on)
} }
int int
auth_status() auth_status(void)
{ {
Authenticator *ap; Authenticator *ap;
int i, mask; int i, mask;
@@ -359,7 +347,7 @@ auth_status()
* negotiation. * negotiation.
*/ */
void void
auth_request() auth_request(void)
{ {
static unsigned char str_request[64] = { IAC, SB, static unsigned char str_request[64] = { IAC, SB,
TELOPT_AUTHENTICATION, TELOPT_AUTHENTICATION,
@@ -399,9 +387,7 @@ auth_request()
* protocol says)) you will have to hack this code... * protocol says)) you will have to hack this code...
*/ */
void void
auth_send(data, cnt) auth_send(unsigned char *data, int cnt)
unsigned char *data;
int cnt;
{ {
Authenticator *ap; Authenticator *ap;
static unsigned char str_none[] = { IAC, SB, TELOPT_AUTHENTICATION, static unsigned char str_none[] = { IAC, SB, TELOPT_AUTHENTICATION,
@@ -485,7 +471,7 @@ auth_send(data, cnt)
} }
void void
auth_send_retry() auth_send_retry(void)
{ {
/* /*
* if auth_send_cnt <= 0 then auth_send will end up rejecting * if auth_send_cnt <= 0 then auth_send will end up rejecting
@@ -495,9 +481,7 @@ auth_send_retry()
} }
void void
auth_is(data, cnt) auth_is(unsigned char *data, int cnt)
unsigned char *data;
int cnt;
{ {
Authenticator *ap; Authenticator *ap;
@@ -518,9 +502,7 @@ auth_is(data, cnt)
} }
void void
auth_reply(data, cnt) auth_reply(unsigned char *data, int cnt)
unsigned char *data;
int cnt;
{ {
Authenticator *ap; Authenticator *ap;
@@ -536,9 +518,7 @@ auth_reply(data, cnt)
} }
void void
auth_name(data, cnt) auth_name(unsigned char *data, int cnt)
unsigned char *data;
int cnt;
{ {
unsigned char savename[256]; unsigned char savename[256];
@@ -561,9 +541,7 @@ auth_name(data, cnt)
} }
int int
auth_sendname(cp, len) auth_sendname(unsigned char *cp, int len)
unsigned char *cp;
int len;
{ {
static unsigned char str_request[256+6] static unsigned char str_request[256+6]
= { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, }; = { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, };
@@ -584,9 +562,7 @@ auth_sendname(cp, len)
} }
void void
auth_finished(ap, result) auth_finished(Authenticator *ap, int result)
Authenticator *ap;
int result;
{ {
if (!(authenticated = ap)) if (!(authenticated = ap))
authenticated = &NoAuth; authenticated = &NoAuth;
@@ -595,15 +571,13 @@ auth_finished(ap, result)
/* ARGSUSED */ /* ARGSUSED */
static void static void
auth_intr(sig) auth_intr(int sig)
int sig;
{ {
auth_finished(0, AUTH_REJECT); auth_finished(0, AUTH_REJECT);
} }
int int
auth_wait(name) auth_wait(char *name)
char *name;
{ {
if (auth_debug_mode) if (auth_debug_mode)
printf(">>>%s: in auth_wait.\r\n", Name); printf(">>>%s: in auth_wait.\r\n", Name);
@@ -635,16 +609,13 @@ auth_wait(name)
} }
void void
auth_debug(mode) auth_debug(int mode)
int mode;
{ {
auth_debug_mode = mode; auth_debug_mode = mode;
} }
void void
auth_printsub(data, cnt, buf, buflen) auth_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
unsigned char *data, *buf;
int cnt, buflen;
{ {
Authenticator *ap; Authenticator *ap;
@@ -655,9 +626,7 @@ auth_printsub(data, cnt, buf, buflen)
} }
void void
auth_gen_printsub(data, cnt, buf, buflen) auth_gen_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
unsigned char *data, *buf;
int cnt, buflen;
{ {
register unsigned char *cp; register unsigned char *cp;
unsigned char tbuf[16]; unsigned char tbuf[16];