ref: 7a95bef00e41cbab2d97f6392b221e6192335343
parent: 2c505c160e4ada69f8663a5c42979d3633314087
author: ftrvxmtrx <[email protected]>
date: Tue Jun 9 19:53:07 EDT 2015
authsrv: remove unused opasstokey
--- a/sys/include/authsrv.h
+++ b/sys/include/authsrv.h
@@ -126,7 +126,6 @@
/*
* convert ascii password to DES key
*/
-extern int opasstokey(char*, char*);
extern int passtokey(char*, char*);
/*
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -66,7 +66,6 @@
Omittedlib["brk_"] = 1
Omittedlib["creadimage"] = 1
Omittedlib["main"] = 1
- Omittedlib["opasstokey"] = 1
Omittedlib["oseek"] = 1
Omittedlib["sysr1"] = 1
}
--- a/sys/src/cmd/unix/9pfreebsd/mount_9fs/9auth.h
+++ b/sys/src/cmd/unix/9pfreebsd/mount_9fs/9auth.h
@@ -139,7 +139,6 @@
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*);
--- a/sys/src/libauthsrv/mkfile
+++ b/sys/src/libauthsrv/mkfile
@@ -14,7 +14,6 @@
convT2M.$O\
convTR2M.$O\
nvcsum.$O\
- opasstokey.$O\
passtokey.$O\
readnvram.$O\
--- a/sys/src/libauthsrv/opasstokey.c
+++ /dev/null
@@ -1,29 +1,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;
-}