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; |
@@ -129,11 +131,12 @@ struct KbdintDevice | |||
129 | int | 131 | int |
130 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); | 132 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); |
131 | 133 | ||
132 | int auth_password(Authctxt *, const char *); | 134 | int auth_password(struct ssh *, const char *); |
133 | 135 | ||
134 | int hostbased_key_allowed(struct passwd *, const char *, char *, | 136 | int hostbased_key_allowed(struct passwd *, const char *, char *, |
135 | struct sshkey *); | 137 | struct sshkey *); |
136 | int user_key_allowed(struct passwd *, struct sshkey *, int); | 138 | int user_key_allowed(struct ssh *, struct passwd *, struct sshkey *, int, |
139 | struct sshauthopt **); | ||
137 | int auth2_key_already_used(Authctxt *, const struct sshkey *); | 140 | int 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" |
165 | void remove_kbdint_device(const char *); | 168 | void remove_kbdint_device(const char *); |
166 | 169 | ||
167 | void disable_forwarding(void); | ||
168 | |||
169 | void do_authentication2(Authctxt *); | 170 | void do_authentication2(Authctxt *); |
170 | 171 | ||
171 | void auth_log(Authctxt *, int, int, const char *, const char *); | 172 | void auth_log(Authctxt *, int, int, const char *, const char *); |
172 | void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); | 173 | void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn)); |
173 | void userauth_finish(struct ssh *, int, const char *, const char *); | 174 | void userauth_finish(struct ssh *, int, const char *, const char *); |
174 | int auth_root_allowed(const char *); | 175 | int auth_root_allowed(struct ssh *, const char *); |
175 | 176 | ||
176 | void userauth_send_banner(const char *); | 177 | void userauth_send_banner(const char *); |
177 | 178 | ||
@@ -215,14 +216,29 @@ int get_hostkey_index(struct sshkey *, int, struct ssh *); | |||
215 | int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **, | 216 | int 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 */ | ||
220 | const struct sshauthopt *auth_options(struct ssh *); | ||
221 | int auth_activate_options(struct ssh *, struct sshauthopt *); | ||
222 | void auth_restrict_session(struct ssh *); | ||
223 | int auth_authorise_keyopts(struct ssh *, struct passwd *pw, | ||
224 | struct sshauthopt *, int, const char *); | ||
225 | void auth_log_authopts(const char *, const struct sshauthopt *, int); | ||
226 | |||
218 | /* debug messages during authentication */ | 227 | /* debug messages during authentication */ |
219 | void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 228 | void auth_debug_add(const char *fmt,...) |
229 | __attribute__((format(printf, 1, 2))); | ||
220 | void auth_debug_send(void); | 230 | void auth_debug_send(void); |
221 | void auth_debug_reset(void); | 231 | void auth_debug_reset(void); |
222 | 232 | ||
223 | struct passwd *fakepw(void); | 233 | struct passwd *fakepw(void); |
224 | 234 | ||
225 | int 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 */ | ||
238 | pid_t subprocess(const char *, struct passwd *, | ||
239 | const char *, int, char **, FILE **, u_int flags); | ||
240 | |||
241 | int 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 | ||