Protoize
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@992 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -98,17 +98,17 @@ static char *Name = "Noname";
|
||||
|
||||
static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
| typemask(ENCTYPE_DES_OFB64);
|
||||
static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64)
|
||||
| typemask(ENCTYPE_DES_OFB64);
|
||||
static long i_wont_support_encrypt = 0;
|
||||
static long i_wont_support_decrypt = 0;
|
||||
static long i_wont_support_encrypt = 0;
|
||||
static long i_wont_support_decrypt = 0;
|
||||
#define I_SUPPORT_ENCRYPT (i_support_encrypt & ~i_wont_support_encrypt)
|
||||
#define I_SUPPORT_DECRYPT (i_support_decrypt & ~i_wont_support_decrypt)
|
||||
|
||||
static long remote_supports_encrypt = 0;
|
||||
static long remote_supports_decrypt = 0;
|
||||
static long remote_supports_encrypt = 0;
|
||||
static long remote_supports_decrypt = 0;
|
||||
|
||||
static Encryptions encryptions[] = {
|
||||
static Encryptions encryptions[] = {
|
||||
#if defined(DES_ENCRYPTION)
|
||||
{ "DES_CFB64", ENCTYPE_DES_CFB64,
|
||||
cfb64_encrypt,
|
||||
@@ -132,7 +132,7 @@ static Encryptions encryptions[] = {
|
||||
ofb64_printsub },
|
||||
#endif
|
||||
{ 0, },
|
||||
};
|
||||
};
|
||||
|
||||
static unsigned char str_send[64] = { IAC, SB, TELOPT_ENCRYPT,
|
||||
ENCRYPT_SUPPORT };
|
||||
|
@@ -46,7 +46,8 @@ static char sccsid[] = "@(#)genget.c 8.2 (Berkeley) 5/30/95";
|
||||
* the length of *s1 is returned.
|
||||
*/
|
||||
|
||||
int isprefix(char *s1, char *s2)
|
||||
int
|
||||
isprefix(char *s1, char *s2)
|
||||
{
|
||||
char *os1;
|
||||
register char c1, c2;
|
||||
@@ -67,11 +68,11 @@ int isprefix(char *s1, char *s2)
|
||||
|
||||
static char *ambiguous; /* special return value for command routines */
|
||||
|
||||
char **
|
||||
genget(name, table, stlen)
|
||||
char *name; /* name to match */
|
||||
char **table; /* name entry in table */
|
||||
int stlen;
|
||||
char **
|
||||
genget(char *name, char **table, int stlen)
|
||||
/* name to match */
|
||||
/* name entry in table */
|
||||
|
||||
{
|
||||
register char **c, **found;
|
||||
register int n;
|
||||
@@ -95,9 +96,8 @@ genget(name, table, stlen)
|
||||
/*
|
||||
* Function call version of Ambiguous()
|
||||
*/
|
||||
int
|
||||
Ambiguous(s)
|
||||
char *s;
|
||||
int
|
||||
Ambiguous(char *s)
|
||||
{
|
||||
return((char **)s == &ambiguous);
|
||||
}
|
||||
|
@@ -103,12 +103,8 @@ static des_cblock session_key;
|
||||
static des_key_schedule sched;
|
||||
static des_cblock challenge;
|
||||
|
||||
static int
|
||||
Data(ap, type, d, c)
|
||||
Authenticator *ap;
|
||||
int type;
|
||||
void *d;
|
||||
int c;
|
||||
static int
|
||||
Data(Authenticator *ap, int type, void *d, int c)
|
||||
{
|
||||
unsigned char *p = str_data + 4;
|
||||
unsigned char *cd = (unsigned char *)d;
|
||||
@@ -138,10 +134,8 @@ Data(ap, type, d, c)
|
||||
return(net_write(str_data, p - str_data));
|
||||
}
|
||||
|
||||
int
|
||||
kerberos4_init(ap, server)
|
||||
Authenticator *ap;
|
||||
int server;
|
||||
int
|
||||
kerberos4_init(Authenticator *ap, int server)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
@@ -165,8 +159,8 @@ kerberos4_send(char *name, Authenticator *ap)
|
||||
KTEXT_ST auth;
|
||||
char instance[INST_SZ];
|
||||
char *realm;
|
||||
char *krb_realmofhost();
|
||||
char *krb_get_phost();
|
||||
char *krb_realmofhost(const char *);
|
||||
char *krb_get_phost(const char *);
|
||||
CREDENTIALS cred;
|
||||
int r;
|
||||
|
||||
@@ -263,11 +257,8 @@ kerberos4_send_oneway(Authenticator *ap)
|
||||
return kerberos4_send("KERBEROS4", ap);
|
||||
}
|
||||
|
||||
void
|
||||
kerberos4_is(ap, data, cnt)
|
||||
Authenticator *ap;
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
{
|
||||
char realm[REALM_SZ];
|
||||
char instance[INST_SZ];
|
||||
@@ -368,11 +359,8 @@ kerberos4_is(ap, data, cnt)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
kerberos4_reply(ap, data, cnt)
|
||||
Authenticator *ap;
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
kerberos4_reply(Authenticator *ap, unsigned char *data, int cnt)
|
||||
{
|
||||
Session_Key skey;
|
||||
|
||||
@@ -424,11 +412,8 @@ kerberos4_reply(ap, data, cnt)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
kerberos4_status(ap, name, level)
|
||||
Authenticator *ap;
|
||||
char *name;
|
||||
int level;
|
||||
int
|
||||
kerberos4_status(Authenticator *ap, char *name, int level)
|
||||
{
|
||||
if (level < AUTH_USER)
|
||||
return(level);
|
||||
@@ -443,10 +428,8 @@ kerberos4_status(ap, name, level)
|
||||
#define BUMP(buf, len) while (*(buf)) {++(buf), --(len);}
|
||||
#define ADDC(buf, len, c) if ((len) > 0) {*(buf)++ = (c); --(len);}
|
||||
|
||||
void
|
||||
kerberos4_printsub(data, cnt, buf, buflen)
|
||||
unsigned char *data, *buf;
|
||||
int cnt, buflen;
|
||||
void
|
||||
kerberos4_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
||||
{
|
||||
char lbuf[32];
|
||||
register int i;
|
||||
@@ -498,10 +481,8 @@ kerberos4_printsub(data, cnt, buf, buflen)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
kerberos4_cksum(d, n)
|
||||
unsigned char *d;
|
||||
int n;
|
||||
int
|
||||
kerberos4_cksum(unsigned char *d, int n)
|
||||
{
|
||||
int ck = 0;
|
||||
|
||||
|
@@ -45,12 +45,8 @@ char *LocalHostName;
|
||||
char *UserNameRequested = 0;
|
||||
int ConnectedCount = 0;
|
||||
|
||||
void
|
||||
auth_encrypt_init(local, remote, name, server)
|
||||
char *local;
|
||||
char *remote;
|
||||
char *name;
|
||||
int server;
|
||||
void
|
||||
auth_encrypt_init(char *local, char *remote, char *name, int server)
|
||||
{
|
||||
RemoteHostName = remote;
|
||||
LocalHostName = local;
|
||||
@@ -66,27 +62,23 @@ auth_encrypt_init(local, remote, name, server)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
auth_encrypt_user(name)
|
||||
char *name;
|
||||
void
|
||||
auth_encrypt_user(char *name)
|
||||
{
|
||||
extern char *strdup();
|
||||
extern char *strdup(const char *);
|
||||
|
||||
if (UserNameRequested)
|
||||
free(UserNameRequested);
|
||||
UserNameRequested = name ? strdup(name) : 0;
|
||||
}
|
||||
|
||||
void
|
||||
auth_encrypt_connect(cnt)
|
||||
int cnt;
|
||||
void
|
||||
auth_encrypt_connect(int cnt)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
printd(data, cnt)
|
||||
unsigned char *data;
|
||||
int cnt;
|
||||
void
|
||||
printd(unsigned char *data, int cnt)
|
||||
{
|
||||
if (cnt > 16)
|
||||
cnt = 16;
|
||||
|
Reference in New Issue
Block a user