diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-19 10:35:40 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-19 10:35:40 +0000 |
commit | 03482f625a1bc6c0298ee8a358f167cf8acff402 (patch) | |
tree | 9f5bb7b8f57b1d739f10d3f6df5bac3c128466be /usr.bin | |
parent | 2b0d6b668d8d82c5fc7bf01aecfbd7643d77cf21 (diff) |
clean up prototypes
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/auth-options.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/auth.h | 21 | ||||
-rw-r--r-- | usr.bin/ssh/monitor.c | 35 | ||||
-rw-r--r-- | usr.bin/ssh/monitor.h | 5 | ||||
-rw-r--r-- | usr.bin/ssh/monitor_mm.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/monitor_wrap.c | 8 | ||||
-rw-r--r-- | usr.bin/ssh/monitor_wrap.h | 1 | ||||
-rw-r--r-- | usr.bin/ssh/session.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/session.h | 3 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 6 |
10 files changed, 46 insertions, 47 deletions
diff --git a/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c index 48be6d8e0f4..3408b3d8f78 100644 --- a/usr.bin/ssh/auth-options.c +++ b/usr.bin/ssh/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/usr.bin/ssh/auth.h b/usr.bin/ssh/auth.h index 93b427f8c15..e6f6609df9b 100644 --- a/usr.bin/ssh/auth.h +++ b/usr.bin/ssh/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 <krb.h> @@ -130,6 +137,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); @@ -150,6 +161,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/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index 4b41da528b6..508942c5ea5 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.1 2002/03/18 17:28:37 provos Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.2 2002/03/19 10:35:39 markus Exp $"); #include <openssl/dh.h> @@ -91,31 +91,6 @@ struct { u_int olen; } child_state; -/* Prototypes for request sending and receiving */ -void mm_request_send(int, enum monitor_reqtype, Buffer *); -void mm_request_receive(int, Buffer *); -void mm_request_receive_expect(int, enum monitor_reqtype, Buffer *); - -/* Prototypes for authentication functions */ -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 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 *); -Key *get_hostkey_by_index(int); -Key *get_hostkey_by_type(int); -int get_hostkey_index(Key *); -int ssh1_session_key(BIGNUM *); -int auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **); -int auth_rsa_verify_response(Key *, BIGNUM *, u_char *); -BIGNUM *auth_rsa_generate_challenge(Key *); - -void session_pty_cleanup2(void *); -Session *session_by_tty(char *); - /* Functions on the montior that answer unprivileged requests */ int mm_answer_moduli(int, Buffer *); @@ -690,7 +665,7 @@ mm_answer_skeyrespond(int socket, Buffer *m) } #endif -void +static void mm_append_debug(Buffer *m) { if (auth_debug_init && buffer_len(&auth_debug)) { @@ -931,7 +906,7 @@ mm_answer_keyverify(int socket, Buffer *m) return (verified); } -void +static void mm_record_login(Session *s, struct passwd *pw) { socklen_t fromlen; @@ -1284,7 +1259,7 @@ monitor_apply_keystate(struct monitor *monitor) xfree(child_state.output); } -Kex * +static Kex * mm_get_kex(Buffer *m) { Kex *kex; @@ -1418,7 +1393,7 @@ mm_init_compression(struct mm_master *mm) fatal("fcntl(%d, F_SETFD)", x); \ } while (0) -void +static void monitor_socketpair(int *pair) { if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) diff --git a/usr.bin/ssh/monitor.h b/usr.bin/ssh/monitor.h index 3dc05cad186..da7f780b20c 100644 --- a/usr.bin/ssh/monitor.h +++ b/usr.bin/ssh/monitor.h @@ -70,4 +70,9 @@ void monitor_child_postauth(struct monitor *); struct mon_table; int monitor_read(struct monitor*, struct mon_table *, struct mon_table **); +/* Prototypes for request sending and receiving */ +void mm_request_send(int, enum monitor_reqtype, Buffer *); +void mm_request_receive(int, Buffer *); +void mm_request_receive_expect(int, enum monitor_reqtype, Buffer *); + #endif /* _MONITOR_H_ */ diff --git a/usr.bin/ssh/monitor_mm.c b/usr.bin/ssh/monitor_mm.c index 30d4aecb9a5..45d3d432795 100644 --- a/usr.bin/ssh/monitor_mm.c +++ b/usr.bin/ssh/monitor_mm.c @@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_mm.c,v 1.1 2002/03/18 17:26:58 provos Exp $"); +RCSID("$OpenBSD: monitor_mm.c,v 1.2 2002/03/19 10:35:39 markus Exp $"); #include <sys/mman.h> @@ -100,7 +100,7 @@ mm_create(struct mm_master *mmalloc, size_t size) /* Frees either the allocated or the free list */ -void +static void mm_freelist(struct mm_master *mmalloc, struct mmtree *head) { struct mm_share *mms, *next; @@ -260,7 +260,7 @@ mm_free(struct mm_master *mm, void *address) mm_free(mm->mmalloc, mms); } -void +static void mm_sync_list(struct mmtree *oldtree, struct mmtree *newtree, struct mm_master *mm, struct mm_master *mmold) { diff --git a/usr.bin/ssh/monitor_wrap.c b/usr.bin/ssh/monitor_wrap.c index f796cee5391..a103cad64e2 100644 --- a/usr.bin/ssh/monitor_wrap.c +++ b/usr.bin/ssh/monitor_wrap.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_wrap.c,v 1.1 2002/03/18 17:28:37 provos Exp $"); +RCSID("$OpenBSD: monitor_wrap.c,v 1.2 2002/03/19 10:35:39 markus Exp $"); #include <openssl/bn.h> #include <openssl/dh.h> @@ -285,7 +285,7 @@ mm_auth_rhosts_rsa_key_allowed(struct passwd *pw, char *user, return (ret); } -void +static void mm_send_debug(Buffer *m) { char *msg; @@ -487,7 +487,7 @@ mm_newkeys_to_blob(int mode, u_char **blobp, u_int *lenp) return len; } -void +static void mm_send_kex(Buffer *m, Kex *kex) { buffer_put_string(m, kex->session_id, kex->session_id_len); @@ -665,7 +665,7 @@ mm_ssh1_session_key(BIGNUM *num) return (rsafail); } -void +static void mm_chall_setup(char **name, char **infotxt, u_int *numprompts, char ***prompts, u_int **echo_on) { diff --git a/usr.bin/ssh/monitor_wrap.h b/usr.bin/ssh/monitor_wrap.h index 24b224bd8fb..587685540aa 100644 --- a/usr.bin/ssh/monitor_wrap.h +++ b/usr.bin/ssh/monitor_wrap.h @@ -37,6 +37,7 @@ struct monitor; struct mm_master; struct passwd; struct Authctxt; + DH *mm_choose_dh(int, int, int); int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int); void mm_inform_authserv(char *, char *); diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 8cf4b39ace0..66d754e3a02 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/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" @@ -939,7 +939,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/usr.bin/ssh/session.h b/usr.bin/ssh/session.h index 81f024c9bf1..fad3abe1ca2 100644 --- a/usr.bin/ssh/session.h +++ b/usr.bin/ssh/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/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 094566e7e6d..269c5c43cdf 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/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 <openssl/dh.h> #include <openssl/bn.h> @@ -507,7 +507,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]; @@ -537,7 +537,7 @@ privsep_preauth_child(void) setuid(options.unprivileged_user); } -void +static void privsep_postauth(Authctxt *authctxt, pid_t pid) { extern Authctxt *x_authctxt; |