diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-20 18:26:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-20 18:26:56 +0000 |
commit | 5d380d567a8db513aa21a79693aced71edd0f16d (patch) | |
tree | efd2f32bb4a5d67e6817642767cf7c3f00995cfb | |
parent | 102462e1a1acc2c11353c6588869fbaddbb558f4 (diff) |
annoying spacing fixes getting in the way of real diffs
-rw-r--r-- | usr.bin/ssh/channels.c | 2 | ||||
-rw-r--r-- | usr.bin/ssh/monitor.c | 2 | ||||
-rw-r--r-- | usr.bin/ssh/session.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/session.h | 7 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 7 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-rsa.c | 1 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sshlogin.c | 2 |
9 files changed, 19 insertions, 14 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index c87695c7dd7..ad40eb76cbf 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -2843,7 +2843,7 @@ connect_local_xsocket(u_int dnr) memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; snprintf(addr.sun_path, sizeof addr.sun_path, _PATH_UNIX_X, dnr); - if (connect(sock, (struct sockaddr *) & addr, sizeof(addr)) == 0) + if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) return sock; close(sock); error("connect %.100s: %.100s", addr.sun_path, strerror(errno)); diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index a8dc77adfc5..56188c8070d 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -1020,7 +1020,7 @@ mm_record_login(Session *s, struct passwd *pw) fromlen = sizeof(from); if (packet_connection_is_on_socket()) { if (getpeername(packet_get_connection_in(), - (struct sockaddr *) & from, &fromlen) < 0) { + (struct sockaddr *)&from, &fromlen) < 0) { debug("getpeername: %.100s", strerror(errno)); cleanup_exit(255); } diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 3f81fe2fc61..78758205763 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -179,7 +179,7 @@ auth_input_request_forwarding(struct passwd * pw) sunaddr.sun_family = AF_UNIX; strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path)); - if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) + if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) packet_disconnect("bind: %.100s", strerror(errno)); /* Restore the privileged uid. */ @@ -626,7 +626,7 @@ do_login(Session *s, const char *command) fromlen = sizeof(from); if (packet_connection_is_on_socket()) { if (getpeername(packet_get_connection_in(), - (struct sockaddr *) & from, &fromlen) < 0) { + (struct sockaddr *)&from, &fromlen) < 0) { debug("getpeername: %.100s", strerror(errno)); cleanup_exit(255); } diff --git a/usr.bin/ssh/session.h b/usr.bin/ssh/session.h index a2598a99c2e..2b8175c419a 100644 --- a/usr.bin/ssh/session.h +++ b/usr.bin/ssh/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.25 2005/07/17 06:49:04 djm Exp $ */ +/* $OpenBSD: session.h,v 1.26 2006/03/20 18:26:55 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -34,11 +34,13 @@ struct Session { struct passwd *pw; Authctxt *authctxt; pid_t pid; + /* tty */ char *term; int ptyfd, ttyfd, ptymaster; u_int row, col, xpixel, ypixel; char tty[TTYSZ]; + /* X11 */ u_int display_number; char *display; @@ -47,6 +49,7 @@ struct Session { char *auth_proto; char *auth_data; int single_connection; + /* proto 2 */ int chanid; int *x11_chanids; @@ -55,7 +58,7 @@ struct Session { struct { char *name; char *val; - } *env; + } *env; }; void do_authenticated(Authctxt *); diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index f0c31fd1dfa..9e555a1c17c 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -879,7 +879,7 @@ after_select(fd_set *readset, fd_set *writeset) if (FD_ISSET(sockets[i].fd, readset)) { slen = sizeof(sunaddr); sock = accept(sockets[i].fd, - (struct sockaddr *) &sunaddr, &slen); + (struct sockaddr *)&sunaddr, &slen); if (sock < 0) { error("accept from AUTH_SOCKET: %s", strerror(errno)); @@ -1113,7 +1113,7 @@ main(int ac, char **av) memset(&sunaddr, 0, sizeof(sunaddr)); sunaddr.sun_family = AF_UNIX; strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path)); - if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) { + if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) { perror("bind"); *socket_name = '\0'; /* Don't unlink any existing file */ cleanup_exit(1); diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 79438fae81c..66e41b29b64 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -105,7 +105,7 @@ ask_filename(struct passwd *pw, const char *prompt) if (key_type_name == NULL) name = _PATH_SSH_CLIENT_ID_RSA; - else + else { switch (key_type_from_name(key_type_name)) { case KEY_RSA1: name = _PATH_SSH_CLIENT_IDENTITY; @@ -121,7 +121,7 @@ ask_filename(struct passwd *pw, const char *prompt) exit(1); break; } - + } snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name); fprintf(stderr, "%s (%s): ", prompt, identity_file); if (fgets(buf, sizeof(buf), stdin) == NULL) @@ -316,7 +316,7 @@ get_line(FILE *fp, char *line, size_t len) fprintf(stderr, "input line too long.\n"); exit(1); } - switch(c) { + switch (c) { case '\r': c = fgetc(fp); if (c != EOF && c != '\n' && ungetc(c, fp) == EOF) { @@ -1139,6 +1139,7 @@ main(int ac, char **av) break; case 'D': download = 1; + /*FALLTHROUGH*/ case 'U': reader_id = optarg; break; diff --git a/usr.bin/ssh/ssh-rsa.c b/usr.bin/ssh/ssh-rsa.c index 1520d7e1dd8..ce4195fead9 100644 --- a/usr.bin/ssh/ssh-rsa.c +++ b/usr.bin/ssh/ssh-rsa.c @@ -61,6 +61,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp, if (ok != 1) { int ecode = ERR_get_error(); + error("ssh_rsa_sign: RSA_sign failed: %s", ERR_error_string(ecode, NULL)); xfree(sig); diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index dfde62f85c8..0411cc3edc1 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1025,7 +1025,7 @@ ssh_control_listener(void) fatal("%s socket(): %s", __func__, strerror(errno)); old_umask = umask(0177); - if (bind(control_fd, (struct sockaddr*)&addr, addr.sun_len) == -1) { + if (bind(control_fd, (struct sockaddr *)&addr, addr.sun_len) == -1) { control_fd = -1; if (errno == EINVAL || errno == EADDRINUSE) fatal("ControlSocket %s already exists", @@ -1278,7 +1278,7 @@ control_client(const char *path) if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) fatal("%s socket(): %s", __func__, strerror(errno)); - if (connect(sock, (struct sockaddr*)&addr, addr.sun_len) == -1) { + if (connect(sock, (struct sockaddr *)&addr, addr.sun_len) == -1) { if (mux_command != SSHMUX_COMMAND_OPEN) { fatal("Control socket connect(%.100s): %s", path, strerror(errno)); diff --git a/usr.bin/ssh/sshlogin.c b/usr.bin/ssh/sshlogin.c index 7ad4c922256..a1470065b30 100644 --- a/usr.bin/ssh/sshlogin.c +++ b/usr.bin/ssh/sshlogin.c @@ -129,7 +129,7 @@ store_lastlog_message(const char *user, uid_t uid) */ void record_login(pid_t pid, const char *tty, const char *user, uid_t uid, - const char *host, struct sockaddr * addr, socklen_t addrlen) + const char *host, struct sockaddr *addr, socklen_t addrlen) { int fd; struct lastlog ll; |