X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fauth.h;h=27a828bc4a7758f9433b65c2ec723a9b573f1267;hb=3616b334bc6426e973e08b612a5e8fd30ad80a5f;hp=0763841097cee07ae44f41a1667713188efc1cad;hpb=9e5f2b29cf819c9f79113bf3ae7edcb484d8ee14;p=doldaconnect.git diff --git a/daemon/auth.h b/daemon/auth.h index 0763841..27a828b 100644 --- a/daemon/auth.h +++ b/daemon/auth.h @@ -21,6 +21,8 @@ #include +#include "net.h" + #define AUTH_SUCCESS 0 /* Authentication successful and done */ #define AUTH_DENIED 1 /* Ultimately failed - reason in handle->text */ #define AUTH_PASS 2 /* Pass data - look in handle->prompt */ @@ -41,10 +43,11 @@ struct authmech wchar_t *name; int (*inithandle)(struct authhandle *handle, char *username); void (*release)(struct authhandle *handle); - int (*authenticate)(struct authhandle *handle, char *data); + int (*authenticate)(struct authhandle *handle, struct socket *sk, char *data); int (*renewcred)(struct authhandle *handle); int (*opensess)(struct authhandle *handle); int (*closesess)(struct authhandle *handle); + int (*available)(struct socket *sk); }; struct authhandle @@ -56,7 +59,7 @@ struct authhandle void *mechdata; }; -int authenticate(struct authhandle *handle, char *data); +int authenticate(struct authhandle *handle, struct socket *sk, char *data); struct authhandle *initauth(wchar_t *mechname, char *username); void authgethandle(struct authhandle *auth); void authputhandle(struct authhandle *auth); @@ -64,6 +67,7 @@ int authrenewcred(struct authhandle *handle); int authopensess(struct authhandle *handle); int authclosesess(struct authhandle *handle); void regmech(struct authmech *mech); +int authavailable(struct authmech *mech, struct socket *sk); extern struct authmech *mechs;