From 08105192fdb9441284ac37e309f6359d74aee596 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Fri, 22 Mar 2002 02:50:06 +0000 Subject: - markus@cvs.openbsd.org 2002/03/19 10:35:39 [auth-options.c auth.h session.c session.h sshd.c] clean up prototypes --- ChangeLog | 6 +++++- auth-options.c | 4 ++-- auth.h | 21 +++++++++++++++++++-- session.c | 4 ++-- session.h | 3 ++- sshd.c | 6 +++--- 6 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05e9382f2..c02042dc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -86,6 +86,10 @@ use xfree() after xstrdup(). markus@ ok + - markus@cvs.openbsd.org 2002/03/19 10:35:39 + [auth-options.c auth.h session.c session.h sshd.c] + clean up prototypes + 20020317 - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, warn if directory does not exist. Put system directories in front of @@ -7931,4 +7935,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1949 2002/03/22 02:47:28 mouring Exp $ +$Id: ChangeLog,v 1.1950 2002/03/22 02:50:06 mouring Exp $ diff --git a/auth-options.c b/auth-options.c index 48be6d8e0..3408b3d8f 100644 --- a/auth-options.c +++ b/auth-options.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-options.c,v 1.22 2002/03/18 17:50:31 provos Exp $"); +RCSID("$OpenBSD: auth-options.c,v 1.23 2002/03/19 10:35:39 markus Exp $"); #include "packet.h" #include "xmalloc.h" @@ -42,7 +42,7 @@ struct envstring *custom_environment = NULL; extern ServerOptions options; -void +static void auth_send_debug(Buffer *m) { char *msg; diff --git a/auth.h b/auth.h index 3e4a55010..a336926fc 100644 --- a/auth.h +++ b/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.34 2002/03/18 17:50:31 provos Exp $ */ +/* $OpenBSD: auth.h,v 1.35 2002/03/19 10:35:39 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -88,7 +88,7 @@ struct KbdintDevice void (*free_ctx)(void *ctx); }; -int auth_rhosts(struct passwd *, const char *); +int auth_rhosts(struct passwd *, const char *); int auth_rhosts2(struct passwd *, const char *, const char *, const char *); @@ -96,6 +96,13 @@ int auth_rhosts_rsa(struct passwd *, char *, Key *); int auth_password(Authctxt *, const char *); int auth_rsa(struct passwd *, BIGNUM *); int auth_rsa_challenge_dialog(Key *); +BIGNUM *auth_rsa_generate_challenge(Key *); +int auth_rsa_verify_response(Key *, BIGNUM *, u_char[]); +int auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **); + +int auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *); +int hostbased_key_allowed(struct passwd *, const char *, char *, Key *); +int user_key_allowed(struct passwd *, Key *); #ifdef KRB4 #include @@ -133,6 +140,10 @@ void privsep_challenge_enable(void); int auth2_challenge(Authctxt *, char *); void auth2_challenge_stop(Authctxt *); +int bsdauth_query(void *, char **, char **, u_int *, char ***, u_int **); +int bsdauth_respond(void *, u_int, char **); +int skey_query(void *, char **, char **, u_int *, char ***, u_int **); +int skey_respond(void *, u_int, char **); int allowed_user(struct passwd *); struct passwd * getpwnamallow(const char *user); @@ -153,6 +164,12 @@ HostStatus check_key_in_hostfiles(struct passwd *, Key *, const char *, const char *, const char *); +/* hostkey handling */ +Key *get_hostkey_by_index(int); +Key *get_hostkey_by_type(int); +int get_hostkey_index(Key *); +int ssh1_session_key(BIGNUM *); + #define AUTH_FAIL_MAX 6 #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) #define AUTH_FAIL_MSG "Too many authentication failures for %.100s" diff --git a/session.c b/session.c index e5ea637d5..1b0d652e4 100644 --- a/session.c +++ b/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.130 2002/03/18 17:50:31 provos Exp $"); +RCSID("$OpenBSD: session.c,v 1.131 2002/03/19 10:35:39 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1114,7 +1114,7 @@ do_setusercontext(struct passwd *pw) fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); } -void +static void launch_login(struct passwd *pw, const char *hostname) { /* Launch login(1). */ diff --git a/session.h b/session.h index 81f024c9b..fad3abe1c 100644 --- a/session.h +++ b/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.15 2002/03/18 17:50:31 provos Exp $ */ +/* $OpenBSD: session.h,v 1.16 2002/03/19 10:35:39 markus Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -59,6 +59,7 @@ int session_input_channel_req(Channel *, const char *); void session_close_by_pid(pid_t, int); void session_close_by_channel(int, void *); void session_destroy_all(void (*)(Session *)); +void session_pty_cleanup2(void *); Session *session_new(void); Session *session_by_tty(char *); diff --git a/sshd.c b/sshd.c index c788ac016..d34b1a79d 100644 --- a/sshd.c +++ b/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.232 2002/03/19 03:03:43 stevesk Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.233 2002/03/19 10:35:39 markus Exp $"); #include #include @@ -516,7 +516,7 @@ demote_sensitive_data(void) /* We do not clear ssh1_host key and cookie. XXX - Okay Niels? */ } -void +static void privsep_preauth_child(void) { u_int32_t rand[256]; @@ -546,7 +546,7 @@ privsep_preauth_child(void) setuid(options.unprivileged_user); } -void +static void privsep_postauth(Authctxt *authctxt, pid_t pid) { extern Authctxt *x_authctxt; -- cgit v1.2.3