X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fauth.h;h=4d89b902fa6fcca9075869f9700a18543fd85d96;hb=3c7f2d14ba774a61baea64c9180b8d70cbe3e020;hp=0763841097cee07ae44f41a1667713188efc1cad;hpb=d3372da97568d5e1f35fa19787c8ec8af93a0435;p=doldaconnect.git diff --git a/daemon/auth.h b/daemon/auth.h index 0763841..4d89b90 100644 --- a/daemon/auth.h +++ b/daemon/auth.h @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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;