libauth: remove auth_wep() function, and non-existing httpauth() declaration

This commit is contained in:
cinap_lenrek 2018-01-02 04:31:21 +01:00
parent 1d7bb80793
commit e1ca49d625
3 changed files with 1 additions and 55 deletions

View file

@ -89,15 +89,13 @@ extern int addns(char*, char*);
extern int noworld(char*);
extern int amount(int, char*, int, char*);
/* these two may get generalized away -rsc */
extern int login(char*, char*, char*);
extern int httpauth(char*, char*);
typedef struct Attr Attr;
enum {
AttrNameval, /* name=val -- when matching, must have name=val */
AttrQuery, /* name? -- when matching, must be present */
AttrDefault, /* name:=val -- when matching, if present must match INTERNAL */
AttrDefault, /* name=val -- when matching, if present must match INTERNAL */
};
struct Attr
{
@ -136,7 +134,6 @@ extern AuthRpc* auth_allocrpc(int afd);
extern Attr* auth_attr(AuthRpc *rpc);
extern void auth_freerpc(AuthRpc *rpc);
extern uint auth_rpc(AuthRpc *rpc, char *verb, void *a, int n);
extern int auth_wep(char*, char*, ...);
#pragma varargck argpos auth_proxy 3
#pragma varargck argpos auth_challenge 1
#pragma varargck argpos auth_respond 8

View file

@ -1,50 +0,0 @@
#include <u.h>
#include <libc.h>
#include <auth.h>
#include "authlocal.h"
/*
* make factotum add wep keys to an 802.11 device
*/
int
auth_wep(char *dev, char *fmt, ...)
{
AuthRpc *rpc;
char *params, *p;
int fd;
va_list arg;
int rv;
rv = -1;
if(dev == nil){
werrstr("no device specified");
return rv;
}
fd = open("/mnt/factotum/rpc", ORDWR);
if(fd < 0)
return rv;
rpc = auth_allocrpc(fd);
if(rpc != nil){
quotefmtinstall(); /* just in case */
va_start(arg, fmt);
params = vsmprint(fmt, arg);
va_end(arg);
if(params != nil){
p = smprint("proto=wep %s", params);
if(p != nil){
if(auth_rpc(rpc, "start", p, strlen(p)) == ARok
&& auth_rpc(rpc, "write", dev, strlen(dev)) == ARok)
rv = 0;
free(p);
}
free(params);
}
auth_freerpc(rpc);
}
close(fd);
return rv;
}

View file

@ -14,7 +14,6 @@ OFILES=\
auth_respond.$O\
auth_rpc.$O\
auth_userpasswd.$O\
auth_wep.$O\
login.$O\
newns.$O\
noworld.$O\