summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
Diffstat (limited to 'auth.h')
-rw-r--r--auth.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/auth.h b/auth.h
index 29835ae92..23ce67caf 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.93 2017/08/18 05:36:45 djm Exp $ */ 1/* $OpenBSD: auth.h,v 1.95 2018/03/03 03:15:51 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -42,9 +42,11 @@
42#include <krb5.h> 42#include <krb5.h>
43#endif 43#endif
44 44
45struct passwd;
45struct ssh; 46struct ssh;
46struct sshkey;
47struct sshbuf; 47struct sshbuf;
48struct sshkey;
49struct sshauthopt;
48 50
49typedef struct Authctxt Authctxt; 51typedef struct Authctxt Authctxt;
50typedef struct Authmethod Authmethod; 52typedef struct Authmethod Authmethod;
@@ -128,11 +130,12 @@ struct KbdintDevice
128int 130int
129auth_rhosts2(struct passwd *, const char *, const char *, const char *); 131auth_rhosts2(struct passwd *, const char *, const char *, const char *);
130 132
131int auth_password(Authctxt *, const char *); 133int auth_password(struct ssh *, const char *);
132 134
133int hostbased_key_allowed(struct passwd *, const char *, char *, 135int hostbased_key_allowed(struct passwd *, const char *, char *,
134 struct sshkey *); 136 struct sshkey *);
135int user_key_allowed(struct passwd *, struct sshkey *, int); 137int user_key_allowed(struct ssh *, struct passwd *, struct sshkey *, int,
138 struct sshauthopt **);
136int auth2_key_already_used(Authctxt *, const struct sshkey *); 139int auth2_key_already_used(Authctxt *, const struct sshkey *);
137 140
138/* 141/*
@@ -163,14 +166,12 @@ int auth_shadow_pwexpired(Authctxt *);
163#include "audit.h" 166#include "audit.h"
164void remove_kbdint_device(const char *); 167void remove_kbdint_device(const char *);
165 168
166void disable_forwarding(void);
167
168void do_authentication2(Authctxt *); 169void do_authentication2(Authctxt *);
169 170
170void auth_log(Authctxt *, int, int, const char *, const char *); 171void auth_log(Authctxt *, int, int, const char *, const char *);
171void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); 172void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn));
172void userauth_finish(struct ssh *, int, const char *, const char *); 173void userauth_finish(struct ssh *, int, const char *, const char *);
173int auth_root_allowed(const char *); 174int auth_root_allowed(struct ssh *, const char *);
174 175
175void userauth_send_banner(const char *); 176void userauth_send_banner(const char *);
176 177
@@ -214,14 +215,29 @@ int get_hostkey_index(struct sshkey *, int, struct ssh *);
214int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **, 215int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **,
215 size_t *, const u_char *, size_t, const char *, u_int); 216 size_t *, const u_char *, size_t, const char *, u_int);
216 217
218/* Key / cert options linkage to auth layer */
219const struct sshauthopt *auth_options(struct ssh *);
220int auth_activate_options(struct ssh *, struct sshauthopt *);
221void auth_restrict_session(struct ssh *);
222int auth_authorise_keyopts(struct ssh *, struct passwd *pw,
223 struct sshauthopt *, int, const char *);
224void auth_log_authopts(const char *, const struct sshauthopt *, int);
225
217/* debug messages during authentication */ 226/* debug messages during authentication */
218void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); 227void auth_debug_add(const char *fmt,...)
228 __attribute__((format(printf, 1, 2)));
219void auth_debug_send(void); 229void auth_debug_send(void);
220void auth_debug_reset(void); 230void auth_debug_reset(void);
221 231
222struct passwd *fakepw(void); 232struct passwd *fakepw(void);
223 233
224int sys_auth_passwd(Authctxt *, const char *); 234#define SSH_SUBPROCESS_STDOUT_DISCARD (1) /* Discard stdout */
235#define SSH_SUBPROCESS_STDOUT_CAPTURE (1<<1) /* Redirect stdout */
236#define SSH_SUBPROCESS_STDERR_DISCARD (1<<2) /* Discard stderr */
237pid_t subprocess(const char *, struct passwd *,
238 const char *, int, char **, FILE **, u_int flags);
239
240int sys_auth_passwd(struct ssh *, const char *);
225 241
226#define SKEY_PROMPT "\nS/Key Password: " 242#define SKEY_PROMPT "\nS/Key Password: "
227 243