X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=sys%2Finclude%2Fauth.h;h=8b350a64cf0e69eb30fdd45f4a9825660f50e178;hb=2f67e21393c25943f25e116fa6912b7d92dbca4e;hp=63876765cf7cc5c12a0372d1be301e0c4b8d4a36;hpb=c558a99e0be506a9abdf677f0ca4490644e05fc1;p=plan9front.git diff --git a/sys/include/auth.h b/sys/include/auth.h old mode 100755 new mode 100644 index 63876765c..8b350a64c --- a/sys/include/auth.h +++ b/sys/include/auth.h @@ -35,7 +35,7 @@ enum struct AuthRpc { int afd; - char ibuf[AuthRpcMax]; + char ibuf[AuthRpcMax+1]; /* +1 for NUL in auth_rpc.c */ char obuf[AuthRpcMax]; char *arg; uint narg; @@ -53,6 +53,7 @@ struct AuthInfo struct Chalstate { char *user; + char *dom; char chal[MAXCHLEN]; int nchal; void *resp; @@ -71,7 +72,7 @@ struct Chapreply /* for protocol "chap" */ char resp[MD5LEN]; }; -struct MSchapreply /* for protocol "mschap" */ +struct MSchapreply /* for protocol "mschap" and "ntlm" */ { char LMresp[24]; /* Lan Manager response */ char NTresp[24]; /* NT response */ @@ -89,15 +90,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 { @@ -127,7 +126,8 @@ extern void auth_freeAI(AuthInfo *ai); extern int auth_chuid(AuthInfo *ai, char *ns); extern Chalstate *auth_challenge(char*, ...); extern AuthInfo* auth_response(Chalstate*); -extern int auth_respond(void*, uint, char*, uint, void*, uint, AuthGetkey *getkey, char*, ...); +extern int auth_respond(void*, uint, char*, uint, void*, uint, AuthGetkey*, char*, ...); +extern int auth_respondAI(void *, uint, char*, uint, void*, uint, AuthInfo**, AuthGetkey*, char*, ...); extern void auth_freechal(Chalstate*); extern AuthInfo* auth_userpasswd(char *user, char *passwd); extern UserPasswd* auth_getuserpasswd(AuthGetkey *getkey, char*, ...); @@ -136,8 +136,8 @@ 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 +#pragma varargck argpos auth_respondAI 9 #pragma varargck argpos auth_getuserpasswd 2