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 27a1a88ec..15ba7073e 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;
@@ -129,11 +131,12 @@ struct KbdintDevice
129int 131int
130auth_rhosts2(struct passwd *, const char *, const char *, const char *); 132auth_rhosts2(struct passwd *, const char *, const char *, const char *);
131 133
132int auth_password(Authctxt *, const char *); 134int auth_password(struct ssh *, const char *);
133 135
134int hostbased_key_allowed(struct passwd *, const char *, char *, 136int hostbased_key_allowed(struct passwd *, const char *, char *,
135 struct sshkey *); 137 struct sshkey *);
136int user_key_allowed(struct passwd *, struct sshkey *, int); 138int user_key_allowed(struct ssh *, struct passwd *, struct sshkey *, int,
139 struct sshauthopt **);
137int auth2_key_already_used(Authctxt *, const struct sshkey *); 140int auth2_key_already_used(Authctxt *, const struct sshkey *);
138 141
139/* 142/*
@@ -164,14 +167,12 @@ int auth_shadow_pwexpired(Authctxt *);
164#include "audit.h" 167#include "audit.h"
165void remove_kbdint_device(const char *); 168void remove_kbdint_device(const char *);
166 169
167void disable_forwarding(void);
168
169void do_authentication2(Authctxt *); 170void do_authentication2(Authctxt *);
170 171
171void auth_log(Authctxt *, int, int, const char *, const char *); 172void auth_log(Authctxt *, int, int, const char *, const char *);
172void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); 173void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn));
173void userauth_finish(struct ssh *, int, const char *, const char *); 174void userauth_finish(struct ssh *, int, const char *, const char *);
174int auth_root_allowed(const char *); 175int auth_root_allowed(struct ssh *, const char *);
175 176
176void userauth_send_banner(const char *); 177void userauth_send_banner(const char *);
177 178
@@ -215,14 +216,29 @@ int get_hostkey_index(struct sshkey *, int, struct ssh *);
215int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **, 216int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **,
216 size_t *, const u_char *, size_t, const char *, u_int); 217 size_t *, const u_char *, size_t, const char *, u_int);
217 218
219/* Key / cert options linkage to auth layer */
220const struct sshauthopt *auth_options(struct ssh *);
221int auth_activate_options(struct ssh *, struct sshauthopt *);
222void auth_restrict_session(struct ssh *);
223int auth_authorise_keyopts(struct ssh *, struct passwd *pw,
224 struct sshauthopt *, int, const char *);
225void auth_log_authopts(const char *, const struct sshauthopt *, int);
226
218/* debug messages during authentication */ 227/* debug messages during authentication */
219void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); 228void auth_debug_add(const char *fmt,...)
229 __attribute__((format(printf, 1, 2)));
220void auth_debug_send(void); 230void auth_debug_send(void);
221void auth_debug_reset(void); 231void auth_debug_reset(void);
222 232
223struct passwd *fakepw(void); 233struct passwd *fakepw(void);
224 234
225int sys_auth_passwd(Authctxt *, const char *); 235#define SSH_SUBPROCESS_STDOUT_DISCARD (1) /* Discard stdout */
236#define SSH_SUBPROCESS_STDOUT_CAPTURE (1<<1) /* Redirect stdout */
237#define SSH_SUBPROCESS_STDERR_DISCARD (1<<2) /* Discard stderr */
238pid_t subprocess(const char *, struct passwd *,
239 const char *, int, char **, FILE **, u_int flags);
240
241int sys_auth_passwd(struct ssh *, const char *);
226 242
227#define SKEY_PROMPT "\nS/Key Password: " 243#define SKEY_PROMPT "\nS/Key Password: "
228 244