diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 18:56:16 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-05 18:56:16 +0000 |
commit | 551ea37576333968c760f3f080a8dfe51ca9b06a (patch) | |
tree | 824a61c317213749b57ba877a700ff7102ea4dd7 /auth.h | |
parent | c4bcb7d9e3a381a4dd5048ee23e4bd2cd6023de7 (diff) | |
download | openssh-git-551ea37576333968c760f3f080a8dfe51ca9b06a.tar.gz |
- markus@cvs.openbsd.org 2001/05/18 14:13:29
[auth-chall.c auth.h auth1.c auth2-chall.c auth2.c readconf.c
readconf.h servconf.c servconf.h sshconnect1.c sshconnect2.c sshd.c]
improved kbd-interactive support. work by per@appgate.com and me
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: auth.h,v 1.15 2001/04/12 19:15:24 markus Exp $ + * $OpenBSD: auth.h,v 1.16 2001/05/18 14:13:28 markus Exp $ */ #ifndef AUTH_H #define AUTH_H @@ -36,6 +36,8 @@ #endif typedef struct Authctxt Authctxt; +typedef struct KbdintDevice KbdintDevice; + struct Authctxt { int success; int postponed; @@ -46,12 +48,31 @@ struct Authctxt { char *service; struct passwd *pw; char *style; + void *kbdintctxt; #ifdef BSD_AUTH auth_session_t *as; #endif }; /* + * Keyboard interactive device: + * init_ctx returns: non NULL upon success + * query returns: 0 - success, otherwise failure + * respond returns: 0 - success, 1 - need further interaction, + * otherwise - failure + */ +struct KbdintDevice +{ + const char *name; + void* (*init_ctx) __P((Authctxt*)); + int (*query) __P((void *ctx, char **name, char **infotxt, + u_int *numprompts, char ***prompts, + u_int **echo_on)); + int (*respond) __P((void *ctx, u_int numresp, char **responses)); + void (*free_ctx) __P((void *ctx)); +}; + +/* * Tries to authenticate the user using the .rhosts file. Returns true if * authentication succeeds. If ignore_rhosts is non-zero, this will not * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). @@ -133,8 +154,8 @@ int auth2_challenge(Authctxt *authctxt, char *devs); int allowed_user(struct passwd * pw); -char *get_challenge(Authctxt *authctxt, char *devs); -int verify_response(Authctxt *authctxt, char *response); +char *get_challenge(Authctxt *authctxt); +int verify_response(Authctxt *authctxt, const char *response); struct passwd * auth_get_user(void); |