]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/include/auth.h
turn ptrdiff_t into a 64 bit type
[plan9front.git] / sys / include / auth.h
old mode 100755 (executable)
new mode 100644 (file)
index 6387676..8b350a6
@@ -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