diff options
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 34 |
1 files changed, 25 insertions, 9 deletions
@@ -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 | ||
45 | struct passwd; | ||
45 | struct ssh; | 46 | struct ssh; |
46 | struct sshkey; | ||
47 | struct sshbuf; | 47 | struct sshbuf; |
48 | struct sshkey; | ||
49 | struct sshauthopt; | ||
48 | 50 | ||
49 | typedef struct Authctxt Authctxt; | 51 | typedef struct Authctxt Authctxt; |
50 | typedef struct Authmethod Authmethod; | 52 | typedef struct Authmethod Authmethod; |
@@ -128,11 +130,12 @@ struct KbdintDevice | |||
128 | int | 130 | int |
129 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); | 131 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); |
130 | 132 | ||
131 | int auth_password(Authctxt *, const char *); | 133 | int auth_password(struct ssh *, const char *); |
132 | 134 | ||
133 | int hostbased_key_allowed(struct passwd *, const char *, char *, | 135 | int hostbased_key_allowed(struct passwd *, const char *, char *, |
134 | struct sshkey *); | 136 | struct sshkey *); |
135 | int user_key_allowed(struct passwd *, struct sshkey *, int); | 137 | int user_key_allowed(struct ssh *, struct passwd *, struct sshkey *, int, |
138 | struct sshauthopt **); | ||
136 | int auth2_key_already_used(Authctxt *, const struct sshkey *); | 139 | int 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" |
164 | void remove_kbdint_device(const char *); | 167 | void remove_kbdint_device(const char *); |
165 | 168 | ||
166 | void disable_forwarding(void); | ||
167 | |||
168 | void do_authentication2(Authctxt *); | 169 | void do_authentication2(Authctxt *); |
169 | 170 | ||
170 | void auth_log(Authctxt *, int, int, const char *, const char *); | 171 | void auth_log(Authctxt *, int, int, const char *, const char *); |
171 | void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); | 172 | void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); |
172 | void userauth_finish(struct ssh *, int, const char *, const char *); | 173 | void userauth_finish(struct ssh *, int, const char *, const char *); |
173 | int auth_root_allowed(const char *); | 174 | int auth_root_allowed(struct ssh *, const char *); |
174 | 175 | ||
175 | void userauth_send_banner(const char *); | 176 | void userauth_send_banner(const char *); |
176 | 177 | ||
@@ -214,14 +215,29 @@ int get_hostkey_index(struct sshkey *, int, struct ssh *); | |||
214 | int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **, | 215 | int 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 */ | ||
219 | const struct sshauthopt *auth_options(struct ssh *); | ||
220 | int auth_activate_options(struct ssh *, struct sshauthopt *); | ||
221 | void auth_restrict_session(struct ssh *); | ||
222 | int auth_authorise_keyopts(struct ssh *, struct passwd *pw, | ||
223 | struct sshauthopt *, int, const char *); | ||
224 | void auth_log_authopts(const char *, const struct sshauthopt *, int); | ||
225 | |||
217 | /* debug messages during authentication */ | 226 | /* debug messages during authentication */ |
218 | void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 227 | void auth_debug_add(const char *fmt,...) |
228 | __attribute__((format(printf, 1, 2))); | ||
219 | void auth_debug_send(void); | 229 | void auth_debug_send(void); |
220 | void auth_debug_reset(void); | 230 | void auth_debug_reset(void); |
221 | 231 | ||
222 | struct passwd *fakepw(void); | 232 | struct passwd *fakepw(void); |
223 | 233 | ||
224 | int 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 */ | ||
237 | pid_t subprocess(const char *, struct passwd *, | ||
238 | const char *, int, char **, FILE **, u_int flags); | ||
239 | |||
240 | int 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 | ||