Protoize
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@993 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -198,10 +198,8 @@ static Authenticator NoAuth = { 0 };
|
||||
static int i_support = 0;
|
||||
static int i_wont_support = 0;
|
||||
|
||||
Authenticator *
|
||||
findauthenticator(type, way)
|
||||
int type;
|
||||
int way;
|
||||
Authenticator *
|
||||
findauthenticator(int type, int way)
|
||||
{
|
||||
Authenticator *ap = authenticators;
|
||||
|
||||
@@ -210,10 +208,8 @@ findauthenticator(type, way)
|
||||
return(ap->type ? ap : 0);
|
||||
}
|
||||
|
||||
void
|
||||
auth_init(name, server)
|
||||
char *name;
|
||||
int server;
|
||||
void
|
||||
auth_init(char *name, int server)
|
||||
{
|
||||
Authenticator *ap = authenticators;
|
||||
|
||||
@@ -238,9 +234,8 @@ auth_init(name, server)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
auth_disable_name(name)
|
||||
char *name;
|
||||
void
|
||||
auth_disable_name(char *name)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < AUTHTYPE_CNT; ++x) {
|
||||
@@ -251,10 +246,8 @@ auth_disable_name(name)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
getauthmask(type, maskp)
|
||||
char *type;
|
||||
int *maskp;
|
||||
int
|
||||
getauthmask(char *type, int *maskp)
|
||||
{
|
||||
register int x;
|
||||
|
||||
@@ -272,24 +265,20 @@ getauthmask(type, maskp)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int
|
||||
auth_enable(type)
|
||||
char *type;
|
||||
int
|
||||
auth_enable(char *type)
|
||||
{
|
||||
return(auth_onoff(type, 1));
|
||||
}
|
||||
|
||||
int
|
||||
auth_disable(type)
|
||||
char *type;
|
||||
int
|
||||
auth_disable(char *type)
|
||||
{
|
||||
return(auth_onoff(type, 0));
|
||||
}
|
||||
|
||||
int
|
||||
auth_onoff(type, on)
|
||||
char *type;
|
||||
int on;
|
||||
int
|
||||
auth_onoff(char *type, int on)
|
||||
{
|
||||
int i, mask = -1;
|
||||
Authenticator *ap;
|
||||
@@ -319,9 +308,8 @@ auth_onoff(type, on)
|
||||
return(1);
|
||||
}
|
||||
|
||||
int
|
||||
auth_togdebug(on)
|
||||
int on;
|
||||
int
|
||||
auth_togdebug(int on)
|
||||
{
|
||||
if (on < 0)
|
||||
auth_debug_mode ^= 1;
|
||||
@@ -331,8 +319,8 @@ auth_togdebug(on)
|
||||
return(1);
|
||||
}
|
||||
|
||||
int
|
||||
auth_status()
|
||||
int
|
||||
auth_status(void)
|
||||
{
|
||||
Authenticator *ap;
|
||||
int i, mask;
|
||||
@@ -358,8 +346,8 @@ auth_status()
|
||||
* This routine is called by the server to start authentication
|
||||
* negotiation.
|
||||
*/
|
||||
void
|
||||
auth_request()
|
||||
void
|
||||
auth_request(void)
|
||||
{
|
||||
static unsigned char str_request[64] = { IAC, SB,
|
||||
TELOPT_AUTHENTICATION,
|
||||
@@ -398,10 +386,8 @@ auth_request()
|
||||
* with KERBEROS instead of LOGIN (which is against what the
|
||||
* protocol says)) you will have to hack this code...
|
||||
*/
|
||||
void
|
||||
auth_send(data, cnt)
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
auth_send(unsigned char *data, int cnt)
|
||||
{
|
||||
Authenticator *ap;
|
||||
static unsigned char str_none[] = { IAC, SB, TELOPT_AUTHENTICATION,
|
||||
@@ -484,8 +470,8 @@ auth_send(data, cnt)
|
||||
#endif /* KANNAN */
|
||||
}
|
||||
|
||||
void
|
||||
auth_send_retry()
|
||||
void
|
||||
auth_send_retry(void)
|
||||
{
|
||||
/*
|
||||
* if auth_send_cnt <= 0 then auth_send will end up rejecting
|
||||
@@ -494,10 +480,8 @@ auth_send_retry()
|
||||
auth_send(auth_send_data, auth_send_cnt);
|
||||
}
|
||||
|
||||
void
|
||||
auth_is(data, cnt)
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
auth_is(unsigned char *data, int cnt)
|
||||
{
|
||||
Authenticator *ap;
|
||||
|
||||
@@ -517,10 +501,8 @@ auth_is(data, cnt)
|
||||
Name, *data);
|
||||
}
|
||||
|
||||
void
|
||||
auth_reply(data, cnt)
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
auth_reply(unsigned char *data, int cnt)
|
||||
{
|
||||
Authenticator *ap;
|
||||
|
||||
@@ -535,10 +517,8 @@ auth_reply(data, cnt)
|
||||
Name, *data);
|
||||
}
|
||||
|
||||
void
|
||||
auth_name(data, cnt)
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
auth_name(unsigned char *data, int cnt)
|
||||
{
|
||||
unsigned char savename[256];
|
||||
|
||||
@@ -560,10 +540,8 @@ auth_name(data, cnt)
|
||||
auth_encrypt_user(savename);
|
||||
}
|
||||
|
||||
int
|
||||
auth_sendname(cp, len)
|
||||
unsigned char *cp;
|
||||
int len;
|
||||
int
|
||||
auth_sendname(unsigned char *cp, int len)
|
||||
{
|
||||
static unsigned char str_request[256+6]
|
||||
= { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, };
|
||||
@@ -583,27 +561,23 @@ auth_sendname(cp, len)
|
||||
return(1);
|
||||
}
|
||||
|
||||
void
|
||||
auth_finished(ap, result)
|
||||
Authenticator *ap;
|
||||
int result;
|
||||
void
|
||||
auth_finished(Authenticator *ap, int result)
|
||||
{
|
||||
if (!(authenticated = ap))
|
||||
authenticated = &NoAuth;
|
||||
validuser = result;
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
auth_intr(sig)
|
||||
int sig;
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
auth_intr(int sig)
|
||||
{
|
||||
auth_finished(0, AUTH_REJECT);
|
||||
}
|
||||
|
||||
int
|
||||
auth_wait(name)
|
||||
char *name;
|
||||
int
|
||||
auth_wait(char *name)
|
||||
{
|
||||
if (auth_debug_mode)
|
||||
printf(">>>%s: in auth_wait.\r\n", Name);
|
||||
@@ -634,17 +608,14 @@ auth_wait(name)
|
||||
return(validuser);
|
||||
}
|
||||
|
||||
void
|
||||
auth_debug(mode)
|
||||
int mode;
|
||||
void
|
||||
auth_debug(int mode)
|
||||
{
|
||||
auth_debug_mode = mode;
|
||||
}
|
||||
|
||||
void
|
||||
auth_printsub(data, cnt, buf, buflen)
|
||||
unsigned char *data, *buf;
|
||||
int cnt, buflen;
|
||||
void
|
||||
auth_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
||||
{
|
||||
Authenticator *ap;
|
||||
|
||||
@@ -654,10 +625,8 @@ auth_printsub(data, cnt, buf, buflen)
|
||||
auth_gen_printsub(data, cnt, buf, buflen);
|
||||
}
|
||||
|
||||
void
|
||||
auth_gen_printsub(data, cnt, buf, buflen)
|
||||
unsigned char *data, *buf;
|
||||
int cnt, buflen;
|
||||
void
|
||||
auth_gen_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
||||
{
|
||||
register unsigned char *cp;
|
||||
unsigned char tbuf[16];
|
||||
|
Reference in New Issue
Block a user