authsrv: remove unused opasstokey

front
ftrvxmtrx 2015-06-09 23:53:07 +02:00
parent 2c505c160e
commit 7a95bef00e
5 changed files with 0 additions and 33 deletions

View File

@ -126,7 +126,6 @@ extern void convM2PR(char*, Passwordreq*, char*);
/*
* convert ascii password to DES key
*/
extern int opasstokey(char*, char*);
extern int passtokey(char*, char*);
/*

View File

@ -66,7 +66,6 @@ BEGIN {
Omittedlib["brk_"] = 1
Omittedlib["creadimage"] = 1
Omittedlib["main"] = 1
Omittedlib["opasstokey"] = 1
Omittedlib["oseek"] = 1
Omittedlib["sysr1"] = 1
}

View File

@ -139,7 +139,6 @@ extern void convM2TR(char*, Ticketreq*);
extern int convPR2M(Passwordreq*, char*, char*);
extern void convM2PR(char*, Passwordreq*, char*);
extern u_char nvcsum(void*, int);
extern int opasstokey(char*, char*);
extern int passtokey(char*, char*);
extern int authenticate(int, int);
extern int newns(char*, char*);

View File

@ -14,7 +14,6 @@ OFILES=\
convT2M.$O\
convTR2M.$O\
nvcsum.$O\
opasstokey.$O\
passtokey.$O\
readnvram.$O\

View File

@ -1,29 +0,0 @@
#include <u.h>
#include <libc.h>
#include <authsrv.h>
int
opasstokey(char *key, char *p)
{
uchar t[10];
int c, n;
n = strlen(p);
memset(t, ' ', sizeof t);
if(n < 5)
return 0;
if(n > 10)
n = 10;
strncpy((char*)t, p, n);
if(n >= 9){
c = p[8] & 0xf;
if(n == 10)
c += p[9] << 4;
for(n = 0; n < 8; n++)
if(c & (1 << n))
t[n] -= ' ';
}
for(n = 0; n < 7; n++)
key[n] = (t[n] >> n) + (t[n+1] << (8 - (n+1)));
return 1;
}