diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 00:27:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-19 00:27:56 +0000 |
commit | 6b0fdff1f7b87ede47d85e90a1d570a842cfcdec (patch) | |
tree | 69e83beb3e4c585a4f1543a3558c53037acb563a /usr.bin | |
parent | 1b4f13da9f72873bc2f66c3b4e80c7c1b2813844 (diff) |
KNF done automatically while reading....
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/auth-bsdauth.c | 8 | ||||
-rw-r--r-- | usr.bin/ssh/auth-skey.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/auth1.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/auth2-chall.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/auth2-none.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/authfd.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/authfd.h | 22 | ||||
-rw-r--r-- | usr.bin/ssh/monitor_wrap.c | 10 | ||||
-rw-r--r-- | usr.bin/ssh/msg.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/nchan.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/radix.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/readconf.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/scp.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sftp.1 | 10 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-add.1 | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-agent.1 | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.1 | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keysign.c | 16 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.1 | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect.h | 24 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 16 | ||||
-rw-r--r-- | usr.bin/ssh/ttymodes.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/xmalloc.h | 4 |
27 files changed, 93 insertions, 98 deletions
diff --git a/usr.bin/ssh/auth-bsdauth.c b/usr.bin/ssh/auth-bsdauth.c index fa06732cc2e..4f1b452b7a7 100644 --- a/usr.bin/ssh/auth-bsdauth.c +++ b/usr.bin/ssh/auth-bsdauth.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth-bsdauth.c,v 1.3 2002/03/18 17:50:31 provos Exp $"); +RCSID("$OpenBSD: auth-bsdauth.c,v 1.4 2002/06/19 00:27:55 deraadt Exp $"); #ifdef BSD_AUTH #include "xmalloc.h" @@ -57,7 +57,7 @@ bsdauth_query(void *ctx, char **name, char **infotxt, debug3("bsdauth_query: style %s", authctxt->style ? authctxt->style : "<default>"); authctxt->as = auth_userchallenge(authctxt->user, - authctxt->style, "auth-ssh", &challenge); + authctxt->style, "auth-ssh", &challenge); if (authctxt->as == NULL) challenge = NULL; debug2("bsdauth_query: <%s>", challenge ? challenge : "empty"); @@ -66,8 +66,8 @@ bsdauth_query(void *ctx, char **name, char **infotxt, if (challenge == NULL) return -1; - *name = xstrdup(""); - *infotxt = xstrdup(""); + *name = xstrdup(""); + *infotxt = xstrdup(""); *numprompts = 1; *prompts = xmalloc(*numprompts * sizeof(char*)); *echo_on = xmalloc(*numprompts * sizeof(u_int)); diff --git a/usr.bin/ssh/auth-skey.c b/usr.bin/ssh/auth-skey.c index b64550443c7..eb13c5cc520 100644 --- a/usr.bin/ssh/auth-skey.c +++ b/usr.bin/ssh/auth-skey.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth-skey.c,v 1.18 2002/05/13 02:37:39 itojun Exp $"); +RCSID("$OpenBSD: auth-skey.c,v 1.19 2002/06/19 00:27:55 deraadt Exp $"); #ifdef SKEY @@ -50,8 +50,8 @@ skey_query(void *ctx, char **name, char **infotxt, if (skeychallenge(&skey, authctxt->user, challenge) == -1) return -1; - *name = xstrdup(""); - *infotxt = xstrdup(""); + *name = xstrdup(""); + *infotxt = xstrdup(""); *numprompts = 1; *prompts = xmalloc(*numprompts * sizeof(char*)); *echo_on = xmalloc(*numprompts * sizeof(u_int)); diff --git a/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c index 27140a9b698..4858aaebaf5 100644 --- a/usr.bin/ssh/auth1.c +++ b/usr.bin/ssh/auth1.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth1.c,v 1.40 2002/04/10 08:21:47 markus Exp $"); +RCSID("$OpenBSD: auth1.c,v 1.41 2002/06/19 00:27:55 deraadt Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -204,7 +204,7 @@ do_authloop(Authctxt *authctxt) if (bits != BN_num_bits(client_host_key->rsa->n)) verbose("Warning: keysize mismatch for client_host_key: " "actual %d, announced %d", - BN_num_bits(client_host_key->rsa->n), bits); + BN_num_bits(client_host_key->rsa->n), bits); packet_check_eom(); authenticated = auth_rhosts_rsa(pw, client_user, diff --git a/usr.bin/ssh/auth2-chall.c b/usr.bin/ssh/auth2-chall.c index 38f955a022c..f35bfb2f8ee 100644 --- a/usr.bin/ssh/auth2-chall.c +++ b/usr.bin/ssh/auth2-chall.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth2-chall.c,v 1.17 2002/03/18 17:50:31 provos Exp $"); +RCSID("$OpenBSD: auth2-chall.c,v 1.18 2002/06/19 00:27:55 deraadt Exp $"); #include "ssh2.h" #include "auth.h" @@ -219,7 +219,7 @@ send_userauth_info_request(Authctxt *authctxt) packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST); packet_put_cstring(name); packet_put_cstring(instr); - packet_put_cstring(""); /* language not used */ + packet_put_cstring(""); /* language not used */ packet_put_int(numprompts); for (i = 0; i < numprompts; i++) { packet_put_cstring(prompts[i]); diff --git a/usr.bin/ssh/auth2-none.c b/usr.bin/ssh/auth2-none.c index 60b4a45419f..0afbc4fe8cc 100644 --- a/usr.bin/ssh/auth2-none.c +++ b/usr.bin/ssh/auth2-none.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-none.c,v 1.2 2002/05/31 11:35:15 markus Exp $"); +RCSID("$OpenBSD: auth2-none.c,v 1.3 2002/06/19 00:27:55 deraadt Exp $"); #include "auth.h" #include "xmalloc.h" @@ -65,7 +65,7 @@ auth2_read_banner(void) return (NULL); } banner[n] = '\0'; - + return (banner); } @@ -88,7 +88,6 @@ userauth_banner(void) done: if (banner) xfree(banner); - return; } static int diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c index c8a95275543..a452a792ee6 100644 --- a/usr.bin/ssh/authfd.c +++ b/usr.bin/ssh/authfd.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.54 2002/06/15 01:27:48 markus Exp $"); +RCSID("$OpenBSD: authfd.c,v 1.55 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/evp.h> @@ -59,7 +59,7 @@ int decode_reply(int type); /* macro to check for "agent failure" message */ #define agent_failed(x) \ ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \ - (x == SSH2_AGENT_FAILURE)) + (x == SSH2_AGENT_FAILURE)) /* Returns the number of the authentication fd, or -1 if there is none. */ diff --git a/usr.bin/ssh/authfd.h b/usr.bin/ssh/authfd.h index d7344bf4b72..b2767e5c1e4 100644 --- a/usr.bin/ssh/authfd.h +++ b/usr.bin/ssh/authfd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.h,v 1.29 2002/06/15 01:27:48 markus Exp $ */ +/* $OpenBSD: authfd.h,v 1.30 2002/06/19 00:27:55 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -40,11 +40,11 @@ /* smartcard */ #define SSH_AGENTC_ADD_SMARTCARD_KEY 20 -#define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21 +#define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21 /* lock/unlock the agent */ #define SSH_AGENTC_LOCK 22 -#define SSH_AGENTC_UNLOCK 23 +#define SSH_AGENTC_UNLOCK 23 /* add key with constraints */ #define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24 @@ -56,21 +56,21 @@ #define SSH2_AGENT_FAILURE 30 /* additional error code for ssh.com's ssh-agent2 */ -#define SSH_COM_AGENT2_FAILURE 102 +#define SSH_COM_AGENT2_FAILURE 102 #define SSH_AGENT_OLD_SIGNATURE 0x01 typedef struct { - int fd; - Buffer identities; - int howmany; -} AuthenticationConnection; + int fd; + Buffer identities; + int howmany; +} AuthenticationConnection; -int ssh_get_authentication_socket(void); -void ssh_close_authentication_socket(int); +int ssh_get_authentication_socket(void); +void ssh_close_authentication_socket(int); AuthenticationConnection *ssh_get_authentication_connection(void); -void ssh_close_authentication_connection(AuthenticationConnection *); +void ssh_close_authentication_connection(AuthenticationConnection *); int ssh_get_num_identities(AuthenticationConnection *, int); Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); diff --git a/usr.bin/ssh/monitor_wrap.c b/usr.bin/ssh/monitor_wrap.c index 6bbeda14649..e6faffc7cbb 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.9 2002/06/14 21:35:00 todd Exp $"); +RCSID("$OpenBSD: monitor_wrap.c,v 1.10 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/bn.h> #include <openssl/dh.h> @@ -68,7 +68,7 @@ mm_request_send(int socket, enum monitor_reqtype type, Buffer *m) debug3("%s entering: type %d", __func__, type); PUT_32BIT(buf, mlen + 1); - buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ + buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ if (atomicio(write, socket, buf, sizeof(buf)) != sizeof(buf)) fatal("%s: write", __func__); if (atomicio(write, socket, buffer_ptr(m), mlen) != mlen) @@ -219,7 +219,7 @@ char* mm_auth2_read_banner(void) mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTH2_READ_BANNER, &m); banner = buffer_get_string(&m, NULL); buffer_free(&m); - + return (banner); } @@ -675,8 +675,8 @@ static void mm_chall_setup(char **name, char **infotxt, u_int *numprompts, char ***prompts, u_int **echo_on) { - *name = xstrdup(""); - *infotxt = xstrdup(""); + *name = xstrdup(""); + *infotxt = xstrdup(""); *numprompts = 1; *prompts = xmalloc(*numprompts * sizeof(char*)); *echo_on = xmalloc(*numprompts * sizeof(u_int)); diff --git a/usr.bin/ssh/msg.c b/usr.bin/ssh/msg.c index a159aae84a7..103aed2cde2 100644 --- a/usr.bin/ssh/msg.c +++ b/usr.bin/ssh/msg.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: msg.c,v 1.1 2002/05/23 19:24:30 markus Exp $"); +RCSID("$OpenBSD: msg.c,v 1.2 2002/06/19 00:27:55 deraadt Exp $"); #include "buffer.h" #include "getput.h" @@ -39,7 +39,7 @@ msg_send(int fd, u_char type, Buffer *m) debug3("msg_send: type %d", type); PUT_32BIT(buf, mlen + 1); - buf[4] = type; /* 1st byte of payload is mesg-type */ + buf[4] = type; /* 1st byte of payload is mesg-type */ if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf)) fatal("msg_send: write"); if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen) diff --git a/usr.bin/ssh/nchan.c b/usr.bin/ssh/nchan.c index 53f493b3a85..b9b304de00c 100644 --- a/usr.bin/ssh/nchan.c +++ b/usr.bin/ssh/nchan.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: nchan.c,v 1.46 2002/06/09 13:32:01 markus Exp $"); +RCSID("$OpenBSD: nchan.c,v 1.47 2002/06/19 00:27:55 deraadt Exp $"); #include "ssh1.h" #include "ssh2.h" @@ -367,7 +367,7 @@ chan_rcvd_ieof(Channel *c) else chan_rcvd_ieof1(c); if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN && - buffer_len(&c->output) == 0 && + buffer_len(&c->output) == 0 && !CHANNEL_EFD_OUTPUT_ACTIVE(c)) chan_obuf_empty(c); } diff --git a/usr.bin/ssh/radix.c b/usr.bin/ssh/radix.c index 019d7a3f996..580e7e07fa6 100644 --- a/usr.bin/ssh/radix.c +++ b/usr.bin/ssh/radix.c @@ -26,7 +26,7 @@ #include "includes.h" #include "uuencode.h" -RCSID("$OpenBSD: radix.c,v 1.20 2002/04/23 12:58:26 markus Exp $"); +RCSID("$OpenBSD: radix.c,v 1.21 2002/06/19 00:27:55 deraadt Exp $"); #ifdef AFS #include <krb.h> @@ -148,7 +148,7 @@ radix_to_creds(const char *buf, CREDENTIALS *creds) goto done; memcpy(&creds->ticket_st.dat, p, len); creds->ticket_st.length = len; - + ret = 1; done: buffer_free(&b); diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index a523b1be352..f07c89aa95c 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.99 2002/06/10 17:45:20 stevesk Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.100 2002/06/19 00:27:55 deraadt Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -92,7 +92,7 @@ RCSID("$OpenBSD: readconf.c,v 1.99 2002/06/10 17:45:20 stevesk Exp $"); typedef enum { oBadOption, oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, - oPasswordAuthentication, oRSAAuthentication, + oPasswordAuthentication, oRSAAuthentication, oChallengeResponseAuthentication, oXAuthLocation, #if defined(KRB4) || defined(KRB5) oKerberosAuthentication, diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 124465dad7b..e2a085ca9a8 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.90 2002/06/17 06:05:56 deraadt Exp $"); +RCSID("$OpenBSD: scp.c,v 1.91 2002/06/19 00:27:55 deraadt Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -219,7 +219,7 @@ main(argc, argv) extern int optind; args.list = NULL; - addargs(&args, "ssh"); /* overwritten with ssh_program */ + addargs(&args, "ssh"); /* overwritten with ssh_program */ addargs(&args, "-x"); addargs(&args, "-oForwardAgent no"); addargs(&args, "-oClearAllForwardings yes"); diff --git a/usr.bin/ssh/sftp.1 b/usr.bin/ssh/sftp.1 index 2faaff13417..0f2212cb8db 100644 --- a/usr.bin/ssh/sftp.1 +++ b/usr.bin/ssh/sftp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sftp.1,v 1.33 2002/02/26 19:06:43 deraadt Exp $ +.\" $OpenBSD: sftp.1,v 1.34 2002/06/19 00:27:55 deraadt Exp $ .\" .\" Copyright (c) 2001 Damien Miller. All rights reserved. .\" @@ -100,7 +100,7 @@ does not have an sftp subsystem configured. .It Fl v Raise logging level. This option is also passed to ssh. .It Fl B Ar buffer_size -Specify the size of the buffer that +Specify the size of the buffer that .Nm uses when transferring files. Larger buffers require fewer round trips at the cost of higher memory consumption. The default is 32768 bytes. @@ -115,13 +115,13 @@ per-user configuration file for This option is directly passed to .Xr ssh 1 . .It Fl P Ar sftp_server path -Connect directly to a local -.Nm sftp-server +Connect directly to a local +.Nm sftp-server (rather than via .Nm ssh ) This option may be useful in debugging the client and server. .It Fl R Ar num_requests -Specify how many requests may be outstanding at any one time. Increasing +Specify how many requests may be outstanding at any one time. Increasing this may slightly improve file transfer speed but will increase memory usage. The default is 16 outstanding requests. .It Fl S Ar program diff --git a/usr.bin/ssh/ssh-add.1 b/usr.bin/ssh/ssh-add.1 index bbf34203dc5..2a34a513317 100644 --- a/usr.bin/ssh/ssh-add.1 +++ b/usr.bin/ssh/ssh-add.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-add.1,v 1.34 2002/06/10 17:36:22 stevesk Exp $ +.\" $OpenBSD: ssh-add.1,v 1.35 2002/06/19 00:27:55 deraadt Exp $ .\" .\" -*- nroff -*- .\" @@ -58,7 +58,7 @@ adds RSA or DSA identities to the authentication agent, .Xr ssh-agent 1 . When run without arguments, it adds the files .Pa $HOME/.ssh/id_rsa , -.Pa $HOME/.ssh/id_dsa +.Pa $HOME/.ssh/id_dsa and .Pa $HOME/.ssh/identity . Alternative file names can be given on the command line. diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 78639be5ca0..53a4a3099a7 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.60 2002/06/15 01:27:48 markus Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.61 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/evp.h> @@ -238,7 +238,7 @@ lock_agent(AuthenticationConnection *ac, int lock) { char prompt[100], *p1, *p2; int passok = 1, ret = -1; - + strlcpy(prompt, "Enter lock password: ", sizeof(prompt)); p1 = read_passphrase(prompt, RP_ALLOW_STDIN); if (lock) { diff --git a/usr.bin/ssh/ssh-agent.1 b/usr.bin/ssh/ssh-agent.1 index 5f498b7e3a4..e5ea1e32558 100644 --- a/usr.bin/ssh/ssh-agent.1 +++ b/usr.bin/ssh/ssh-agent.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-agent.1,v 1.32 2002/06/05 16:08:07 markus Exp $ +.\" $OpenBSD: ssh-agent.1,v 1.33 2002/06/19 00:27:55 deraadt Exp $ .\" .\" Author: Tatu Ylonen <ylo@cs.hut.fi> .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -102,7 +102,7 @@ When executed without arguments, .Xr ssh-add 1 adds the files .Pa $HOME/.ssh/id_rsa , -.Pa $HOME/.ssh/id_dsa +.Pa $HOME/.ssh/id_dsa and .Pa $HOME/.ssh/identity . If the identity has a passphrase, diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index b85dbc06595..84f75fd8b94 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -35,7 +35,7 @@ #include "includes.h" #include <sys/queue.h> -RCSID("$OpenBSD: ssh-agent.c,v 1.94 2002/06/15 01:27:48 markus Exp $"); +RCSID("$OpenBSD: ssh-agent.c,v 1.95 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/evp.h> #include <openssl/md5.h> @@ -361,7 +361,6 @@ process_remove_all_identities(SocketEntry *e, int version) /* Send success. */ buffer_put_int(&e->output, 1); buffer_put_char(&e->output, SSH_AGENT_SUCCESS); - return; } static void @@ -495,11 +494,10 @@ process_lock_agent(SocketEntry *e, int lock) } memset(passwd, 0, strlen(passwd)); xfree(passwd); - + buffer_put_int(&e->output, 1); buffer_put_char(&e->output, success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE); - return; } static void diff --git a/usr.bin/ssh/ssh-keygen.1 b/usr.bin/ssh/ssh-keygen.1 index 6ad94e6eb95..35b0bb91605 100644 --- a/usr.bin/ssh/ssh-keygen.1 +++ b/usr.bin/ssh/ssh-keygen.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keygen.1,v 1.53 2002/02/16 14:53:37 stevesk Exp $ +.\" $OpenBSD: ssh-keygen.1,v 1.54 2002/06/19 00:27:55 deraadt Exp $ .\" .\" -*- nroff -*- .\" @@ -86,7 +86,7 @@ generates, manages and converts authentication keys for .Xr ssh 1 . .Nm -can create RSA keys for use by SSH protocol version 1 and RSA or DSA +can create RSA keys for use by SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. The type of key to be generated is specified with the .Fl t diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 0e951214949..66f00cc904d 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.99 2002/06/09 13:32:01 markus Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.100 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -136,7 +136,7 @@ load_identity(char *filename) } #define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" -#define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" +#define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" #define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" #define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c index 41899ff204b..0f69b9b044b 100644 --- a/usr.bin/ssh/ssh-keysign.c +++ b/usr.bin/ssh/ssh-keysign.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.3 2002/06/08 05:07:09 markus Exp $"); +RCSID("$OpenBSD: ssh-keysign.c,v 1.4 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/evp.h> @@ -53,7 +53,7 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, buffer_init(&b); buffer_append(&b, data, datalen); - + /* session id, currently limited to SHA1 (20 bytes) */ p = buffer_get_string(&b, &len); if (len != 20) @@ -98,9 +98,9 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, if (strlen(host) != len - 1) fail++; else if (p[len - 1] != '.') - fail++; + fail++; else if (strncasecmp(host, p, len - 1) != 0) - fail++; + fail++; xfree(p); /* local user */ @@ -143,14 +143,14 @@ main(int argc, char **argv) #ifdef DEBUG_SSH_KEYSIGN log_init("ssh-keysign", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0); -#endif +#endif if (key_fd[0] == -1 && key_fd[1] == -1) fatal("could not open any host key"); if ((pw = getpwuid(getuid())) == NULL) fatal("getpwuid failed"); - pw = pwcopy(pw); + pw = pwcopy(pw); SSLeay_add_all_algorithms(); @@ -178,7 +178,7 @@ main(int argc, char **argv) fatal("bad fd"); if ((host = get_local_name(fd)) == NULL) fatal("cannot get sockname for fd"); - + data = buffer_get_string(&b, &dlen); if (valid_request(pw, host, &key, data, dlen) < 0) fatal("not a valid request"); @@ -198,7 +198,7 @@ main(int argc, char **argv) if (key_sign(keys[i], &signature, &slen, data, dlen) != 0) fatal("key_sign failed"); - + /* send reply */ buffer_clear(&b); buffer_put_string(&b, signature, slen); diff --git a/usr.bin/ssh/ssh.1 b/usr.bin/ssh/ssh.1 index 0f68e7e696b..4bd0f074867 100644 --- a/usr.bin/ssh/ssh.1 +++ b/usr.bin/ssh/ssh.1 @@ -34,7 +34,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: ssh.1,v 1.156 2002/06/10 17:45:20 stevesk Exp $ +.\" $OpenBSD: ssh.1,v 1.157 2002/06/19 00:27:55 deraadt Exp $ .Dd September 25, 1999 .Dt SSH 1 .Os @@ -1377,7 +1377,7 @@ and .Cm HostbasedAuthentication . If the protocol version 1 .Cm RhostsRSAAuthentication -method is used, +method is used, .Nm must be setuid root, since the host key is readable only by root. For protocol version 2, diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 635fc81956b..52ccf8901cb 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.124 2002/06/11 04:14:26 markus Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.125 2002/06/19 00:27:55 deraadt Exp $"); #include <openssl/bn.h> @@ -763,7 +763,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, len = strlen(msg); snprintf(msg + len, sizeof(msg) - len, "\nMatching host key in %s:%d", - host_file, host_line); + host_file, host_line); } if (options.strict_host_key_checking == 1) { log(msg); diff --git a/usr.bin/ssh/sshconnect.h b/usr.bin/ssh/sshconnect.h index 48148833fd5..0be30fe695a 100644 --- a/usr.bin/ssh/sshconnect.h +++ b/usr.bin/ssh/sshconnect.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.h,v 1.16 2002/06/11 04:14:26 markus Exp $ */ +/* $OpenBSD: sshconnect.h,v 1.17 2002/06/19 00:27:55 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -28,9 +28,9 @@ typedef struct Sensitive Sensitive; struct Sensitive { - Key **keys; - int nkeys; - int external_keysign; + Key **keys; + int nkeys; + int external_keysign; }; int @@ -54,16 +54,16 @@ void ssh_put_password(char *); /* * Macros to raise/lower permissions. */ -#define PRIV_START do { \ - int save_errno = errno; \ - (void)seteuid(original_effective_uid); \ - errno = save_errno; \ +#define PRIV_START do { \ + int save_errno = errno; \ + (void)seteuid(original_effective_uid); \ + errno = save_errno; \ } while (0) -#define PRIV_END do { \ - int save_errno = errno; \ - (void)seteuid(original_real_uid); \ - errno = save_errno; \ +#define PRIV_END do { \ + int save_errno = errno; \ + (void)seteuid(original_real_uid); \ + errno = save_errno; \ } while (0) #endif diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 6e53a75bf65..c16a3184bcc 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.103 2002/05/31 10:30:33 markus Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.104 2002/06/19 00:27:55 deraadt Exp $"); #include "ssh.h" #include "ssh2.h" @@ -395,7 +395,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) if (key->type != pktype) { error("input_userauth_pk_ok: type mismatch " "for decoded key (received %d, expected %d)", - key->type, pktype); + key->type, pktype); break; } fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX); @@ -463,7 +463,7 @@ userauth_passwd(Authctxt *authctxt) packet_add_padding(64); packet_send(); - dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, + dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, &input_userauth_passwd_changereq); return 1; @@ -495,7 +495,7 @@ input_userauth_passwd_changereq(int type, uint32_t seqnr, void *ctxt) packet_put_cstring(authctxt->service); packet_put_cstring(authctxt->method->name); packet_put_char(1); /* additional info */ - snprintf(prompt, sizeof(prompt), + snprintf(prompt, sizeof(prompt), "Enter %.30s@%.128s's old password: ", authctxt->server_user, authctxt->host); password = read_passphrase(prompt, 0); @@ -504,7 +504,7 @@ input_userauth_passwd_changereq(int type, uint32_t seqnr, void *ctxt) xfree(password); password = NULL; while (password == NULL) { - snprintf(prompt, sizeof(prompt), + snprintf(prompt, sizeof(prompt), "Enter %.30s@%.128s's new password: ", authctxt->server_user, authctxt->host); password = read_passphrase(prompt, RP_ALLOW_EOF); @@ -512,7 +512,7 @@ input_userauth_passwd_changereq(int type, uint32_t seqnr, void *ctxt) /* bail out */ return; } - snprintf(prompt, sizeof(prompt), + snprintf(prompt, sizeof(prompt), "Retype %.30s@%.128s's new password: ", authctxt->server_user, authctxt->host); retype = read_passphrase(prompt, 0); @@ -530,8 +530,8 @@ input_userauth_passwd_changereq(int type, uint32_t seqnr, void *ctxt) xfree(password); packet_add_padding(64); packet_send(); - - dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, + + dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, &input_userauth_passwd_changereq); } diff --git a/usr.bin/ssh/ttymodes.c b/usr.bin/ssh/ttymodes.c index 8afdff1a456..5cc13dcd5e0 100644 --- a/usr.bin/ssh/ttymodes.c +++ b/usr.bin/ssh/ttymodes.c @@ -43,7 +43,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ttymodes.c,v 1.17 2002/03/19 10:49:35 markus Exp $"); +RCSID("$OpenBSD: ttymodes.c,v 1.18 2002/06/19 00:27:55 deraadt Exp $"); #include "packet.h" #include "log.h" @@ -307,7 +307,6 @@ end: else packet_put_raw(buffer_ptr(&buf), buffer_len(&buf)); buffer_free(&buf); - return; } /* @@ -457,5 +456,4 @@ set: /* Set the new modes for the terminal. */ if (tcsetattr(fd, TCSANOW, &tio) == -1) log("Setting tty modes failed: %.100s", strerror(errno)); - return; } diff --git a/usr.bin/ssh/xmalloc.h b/usr.bin/ssh/xmalloc.h index 338a2d22dfc..7ac4b13d64c 100644 --- a/usr.bin/ssh/xmalloc.h +++ b/usr.bin/ssh/xmalloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.h,v 1.8 2002/03/04 17:27:39 stevesk Exp $ */ +/* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -22,6 +22,6 @@ void *xmalloc(size_t); void *xrealloc(void *, size_t); void xfree(void *); -char *xstrdup(const char *); +char *xstrdup(const char *); #endif /* XMALLOC_H */ |