summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-05 18:56:16 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-05 18:56:16 +0000
commit551ea37576333968c760f3f080a8dfe51ca9b06a (patch)
tree824a61c317213749b57ba877a700ff7102ea4dd7 /auth.h
parentc4bcb7d9e3a381a4dd5048ee23e4bd2cd6023de7 (diff)
- 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.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/auth.h b/auth.h
index 1e02923c9..20c3ebb78 100644
--- a/auth.h
+++ b/auth.h
@@ -21,7 +21,7 @@
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 * 23 *
24 * $OpenBSD: auth.h,v 1.15 2001/04/12 19:15:24 markus Exp $ 24 * $OpenBSD: auth.h,v 1.16 2001/05/18 14:13:28 markus Exp $
25 */ 25 */
26#ifndef AUTH_H 26#ifndef AUTH_H
27#define AUTH_H 27#define AUTH_H
@@ -36,6 +36,8 @@
36#endif 36#endif
37 37
38typedef struct Authctxt Authctxt; 38typedef struct Authctxt Authctxt;
39typedef struct KbdintDevice KbdintDevice;
40
39struct Authctxt { 41struct Authctxt {
40 int success; 42 int success;
41 int postponed; 43 int postponed;
@@ -46,12 +48,31 @@ struct Authctxt {
46 char *service; 48 char *service;
47 struct passwd *pw; 49 struct passwd *pw;
48 char *style; 50 char *style;
51 void *kbdintctxt;
49#ifdef BSD_AUTH 52#ifdef BSD_AUTH
50 auth_session_t *as; 53 auth_session_t *as;
51#endif 54#endif
52}; 55};
53 56
54/* 57/*
58 * Keyboard interactive device:
59 * init_ctx returns: non NULL upon success
60 * query returns: 0 - success, otherwise failure
61 * respond returns: 0 - success, 1 - need further interaction,
62 * otherwise - failure
63 */
64struct KbdintDevice
65{
66 const char *name;
67 void* (*init_ctx) __P((Authctxt*));
68 int (*query) __P((void *ctx, char **name, char **infotxt,
69 u_int *numprompts, char ***prompts,
70 u_int **echo_on));
71 int (*respond) __P((void *ctx, u_int numresp, char **responses));
72 void (*free_ctx) __P((void *ctx));
73};
74
75/*
55 * Tries to authenticate the user using the .rhosts file. Returns true if 76 * Tries to authenticate the user using the .rhosts file. Returns true if
56 * authentication succeeds. If ignore_rhosts is non-zero, this will not 77 * authentication succeeds. If ignore_rhosts is non-zero, this will not
57 * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). 78 * consider .rhosts and .shosts (/etc/hosts.equiv will still be used).
@@ -133,8 +154,8 @@ int auth2_challenge(Authctxt *authctxt, char *devs);
133 154
134int allowed_user(struct passwd * pw); 155int allowed_user(struct passwd * pw);
135 156
136char *get_challenge(Authctxt *authctxt, char *devs); 157char *get_challenge(Authctxt *authctxt);
137int verify_response(Authctxt *authctxt, char *response); 158int verify_response(Authctxt *authctxt, const char *response);
138 159
139struct passwd * auth_get_user(void); 160struct passwd * auth_get_user(void);
140 161