summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authormouring <mouring>2001-06-05 18:56:16 +0000
committermouring <mouring>2001-06-05 18:56:16 +0000
commitfb46d4687a9a9af2f833298baed0703e6bd0e123 (patch)
tree2f739ad90aeb261dcd47f6af19bb0e8ee5691f3b /auth.h
parente43f67407c634deae9933c0f6453d82233a7c349 (diff)
downloadopenssh-fb46d4687a9a9af2f833298baed0703e6bd0e123.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.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/auth.h b/auth.h
index 1e02923c..20c3ebb7 100644
--- a/auth.h
+++ b/auth.h
@@ -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);