summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--auth-krb5.c4
-rw-r--r--auth-rh-rsa.c4
-rw-r--r--auth.c10
-rw-r--r--cipher.c12
-rw-r--r--key.c4
-rw-r--r--misc.h8
-rw-r--r--packet.c8
-rw-r--r--session.c4
-rw-r--r--sftp-client.c32
-rw-r--r--sftp-glob.h4
-rw-r--r--sftp.c12
-rw-r--r--ssh-add.c6
-rw-r--r--ssh.c4
-rw-r--r--sshconnect2.c4
-rw-r--r--sshd.c10
-rw-r--r--ttymodes.c18
17 files changed, 78 insertions, 73 deletions
diff --git a/ChangeLog b/ChangeLog
index c02042dc..bbc811fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -89,6 +89,11 @@
- markus@cvs.openbsd.org 2002/03/19 10:35:39
[auth-options.c auth.h session.c session.h sshd.c]
clean up prototypes
+ - markus@cvs.openbsd.org 2002/03/19 10:49:35
+ [auth-krb5.c auth-rh-rsa.c auth.c cipher.c key.c misc.h packet.c session.c
+ sftp-client.c sftp-glob.h sftp.c ssh-add.c ssh.c sshconnect2.c sshd.c
+ ttymodes.c]
+ KNF whitespace
20020317
- (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted,
@@ -7935,4 +7940,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1950 2002/03/22 02:50:06 mouring Exp $
+$Id: ChangeLog,v 1.1951 2002/03/22 02:54:23 mouring Exp $
diff --git a/auth-krb5.c b/auth-krb5.c
index 0a2fd4ba..f878b511 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -1,6 +1,6 @@
/*
* Kerberos v5 authentication and ticket-passing routines.
- *
+ *
* $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $
*/
/*
@@ -28,7 +28,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-krb5.c,v 1.7 2002/03/16 17:41:25 stevesk Exp $");
+RCSID("$OpenBSD: auth-krb5.c,v 1.8 2002/03/19 10:49:35 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index c940ec58..75fd0b25 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rh-rsa.c,v 1.32 2002/03/18 17:50:31 provos Exp $");
+RCSID("$OpenBSD: auth-rh-rsa.c,v 1.33 2002/03/19 10:49:35 markus Exp $");
#include "packet.h"
#include "uidswap.h"
@@ -49,7 +49,7 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
chost, _PATH_SSH_SYSTEM_HOSTFILE,
options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
- return (host_status == HOST_OK);
+ return (host_status == HOST_OK);
}
/*
diff --git a/auth.c b/auth.c
index 62c184dd..d521eae2 100644
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.38 2002/03/18 03:41:08 provos Exp $");
+RCSID("$OpenBSD: auth.c,v 1.39 2002/03/19 10:49:35 markus Exp $");
#ifdef HAVE_LOGIN_H
#include <login.h>
@@ -125,17 +125,17 @@ allowed_user(struct passwd * pw)
/* Return false if user is listed in DenyUsers */
if (options.num_deny_users > 0) {
for (i = 0; i < options.num_deny_users; i++)
- if (match_user(pw->pw_name, hostname, ipaddr,
+ if (match_user(pw->pw_name, hostname, ipaddr,
options.deny_users[i])) {
- log("User %.100s not allowed because listed in DenyUsers",
- pw->pw_name);
+ log("User %.100s not allowed because listed in DenyUsers",
+ pw->pw_name);
return 0;
}
}
/* Return false if AllowUsers isn't empty and user isn't listed there */
if (options.num_allow_users > 0) {
for (i = 0; i < options.num_allow_users; i++)
- if (match_user(pw->pw_name, hostname, ipaddr,
+ if (match_user(pw->pw_name, hostname, ipaddr,
options.allow_users[i]))
break;
/* i < options.num_allow_users iff we break for loop */
diff --git a/cipher.c b/cipher.c
index 7a9c9c49..b899fcd2 100644
--- a/cipher.c
+++ b/cipher.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.53 2002/03/18 17:13:15 markus Exp $");
+RCSID("$OpenBSD: cipher.c,v 1.54 2002/03/19 10:49:35 markus Exp $");
#include "xmalloc.h"
#include "log.h"
@@ -78,17 +78,17 @@ struct Cipher {
/*--*/
-u_int
+u_int
cipher_blocksize(Cipher *c)
{
return (c->block_size);
}
-u_int
+u_int
cipher_keylen(Cipher *c)
{
return (c->key_len);
}
-u_int
+u_int
cipher_get_number(Cipher *c)
{
return (c->number);
@@ -509,7 +509,7 @@ ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
rijndael_decrypt(&c->r_ctx, cnow, plain);
}
-/*
+/*
* Exports an IV from the CipherContext required to export the key
* state back from the unprivileged child to the privileged parent
* process.
@@ -612,7 +612,7 @@ cipher_set_keyiv(CipherContext *cc, u_char *iv)
memcpy(desc->k2.iv, iv + 8, 8);
memcpy(desc->k3.iv, iv + 16, 8);
return;
- }
+ }
default:
fatal("%s: bad cipher %d", __FUNCTION__, c->number);
}
diff --git a/key.c b/key.c
index 51902ea2..1ce0a87a 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: key.c,v 1.42 2002/03/18 17:23:31 markus Exp $");
+RCSID("$OpenBSD: key.c,v 1.43 2002/03/19 10:49:35 markus Exp $");
#include <openssl/evp.h>
@@ -808,7 +808,7 @@ Key *
key_demote(Key *k)
{
Key *pk;
-
+
pk = xmalloc(sizeof(*pk));
pk->type = k->type;
pk->flags = k->flags;
diff --git a/misc.h b/misc.h
index 668fd60d..3b4b8796 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.11 2002/01/24 21:09:25 stevesk Exp $ */
+/* $OpenBSD: misc.h,v 1.12 2002/03/19 10:49:35 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -26,9 +26,9 @@ struct passwd *pwcopy(struct passwd *);
typedef struct arglist arglist;
struct arglist {
- char **list;
- int num;
- int nalloc;
+ char **list;
+ int num;
+ int nalloc;
};
void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
diff --git a/packet.c b/packet.c
index 25de3495..f5144d10 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.91 2002/03/18 17:16:38 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.92 2002/03/19 10:49:35 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -173,7 +173,7 @@ packet_connection_is_on_socket(void)
return 1;
}
-/*
+/*
* Exports an IV from the CipherContext required to export the key
* state back from the unprivileged child to the privileged parent
* process.
@@ -196,7 +196,7 @@ int
packet_get_keycontext(int mode, u_char *dat)
{
CipherContext *cc;
-
+
if (mode == MODE_OUT)
cc = &send_context;
else
@@ -209,7 +209,7 @@ void
packet_set_keycontext(int mode, u_char *dat)
{
CipherContext *cc;
-
+
if (mode == MODE_OUT)
cc = &send_context;
else
diff --git a/session.c b/session.c
index 1b0d652e..bd80723b 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.131 2002/03/19 10:35:39 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.132 2002/03/19 10:49:35 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1431,7 +1431,7 @@ session_pty_req(Session *s)
{
u_int len;
int n_bytes;
-
+
if (no_pty_flag) {
debug("Allocating a pty not permitted for this authentication.");
return 0;
diff --git a/sftp-client.c b/sftp-client.c
index fd252671..ce82b6af 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -28,7 +28,7 @@
/* XXX: copy between two remote sites */
#include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.27 2002/03/11 03:19:53 itojun Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.28 2002/03/19 10:49:35 markus Exp $");
#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
#include <sys/queue.h>
@@ -449,7 +449,7 @@ do_rm(struct sftp_conn *conn, char *path)
debug2("Sending SSH2_FXP_REMOVE \"%s\"", path);
id = conn->msg_id++;
- send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path,
+ send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path,
strlen(path));
status = get_status(conn->fd_in, id);
if (status != SSH2_FX_OK)
@@ -496,8 +496,8 @@ do_stat(struct sftp_conn *conn, char *path, int quiet)
id = conn->msg_id++;
- send_string_request(conn->fd_out, id,
- conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT,
+ send_string_request(conn->fd_out, id,
+ conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT,
path, strlen(path));
return(get_decode_stat(conn->fd_in, id, quiet));
@@ -727,7 +727,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len,
char *handle, u_int handle_len)
{
Buffer msg;
-
+
buffer_init(&msg);
buffer_clear(&msg);
buffer_put_char(&msg, SSH2_FXP_READ);
@@ -737,7 +737,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len,
buffer_put_int(&msg, len);
send_msg(fd_out, &msg);
buffer_free(&msg);
-}
+}
int
do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
@@ -754,7 +754,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
u_int id;
u_int len;
u_int64_t offset;
- TAILQ_ENTRY(request) tq;
+ TAILQ_ENTRY(request) tq;
};
TAILQ_HEAD(reqhead, request) requests;
struct request *req;
@@ -820,7 +820,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
/* Send some more requests */
while (num_req < max_req) {
- debug3("Request range %llu -> %llu (%d/%d)",
+ debug3("Request range %llu -> %llu (%d/%d)",
(unsigned long long)offset,
(unsigned long long)offset + buflen - 1,
num_req, max_req);
@@ -831,7 +831,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
offset += buflen;
num_req++;
TAILQ_INSERT_TAIL(&requests, req, tq);
- send_read_request(conn->fd_out, req->id, req->offset,
+ send_read_request(conn->fd_out, req->id, req->offset,
req->len, handle, handle_len);
}
@@ -862,7 +862,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
case SSH2_FXP_DATA:
data = buffer_get_string(&msg, &len);
debug3("Received data %llu -> %llu",
- (unsigned long long)req->offset,
+ (unsigned long long)req->offset,
(unsigned long long)req->offset + len - 1);
if (len > req->len)
fatal("Received more data than asked for "
@@ -884,13 +884,13 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
/* Resend the request for the missing data */
debug3("Short data block, re-requesting "
"%llu -> %llu (%2d)",
- (unsigned long long)req->offset + len,
+ (unsigned long long)req->offset + len,
(unsigned long long)req->offset +
req->len - 1, num_req);
req->id = conn->msg_id++;
req->len -= len;
req->offset += len;
- send_read_request(conn->fd_out, req->id,
+ send_read_request(conn->fd_out, req->id,
req->offset, req->len, handle, handle_len);
/* Reduce the request size */
if (len < buflen)
@@ -921,7 +921,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
fatal("Transfer complete, but requests still in queue");
if (read_error) {
- error("Couldn't read from remote file \"%s\" : %s",
+ error("Couldn't read from remote file \"%s\" : %s",
remote_path, fx2txt(status));
do_close(conn, handle, handle_len);
} else if (write_error) {
@@ -974,7 +974,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
u_int id;
u_int len;
u_int64_t offset;
- TAILQ_ENTRY(outstanding_ack) tq;
+ TAILQ_ENTRY(outstanding_ack) tq;
};
TAILQ_HEAD(ackhead, outstanding_ack) acks;
struct outstanding_ack *ack;
@@ -1063,7 +1063,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
if (ack == NULL)
fatal("Unexpected ACK %u", id);
- if (id == startid || len == 0 ||
+ if (id == startid || len == 0 ||
id - ackid >= conn->num_requests) {
buffer_clear(&msg);
get_msg(conn->fd_in, &msg);
@@ -1093,7 +1093,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
close(local_fd);
goto done;
}
- debug3("In write loop, ack for %u %d bytes at %llu",
+ debug3("In write loop, ack for %u %d bytes at %llu",
ack->id, ack->len, (unsigned long long)ack->offset);
++ackid;
free(ack);
diff --git a/sftp-glob.h b/sftp-glob.h
index 488b0a80..9c754912 100644
--- a/sftp-glob.h
+++ b/sftp-glob.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.h,v 1.6 2002/02/13 00:59:23 djm Exp $ */
+/* $OpenBSD: sftp-glob.h,v 1.7 2002/03/19 10:49:35 markus Exp $ */
/*
* Copyright (c) 2001,2002 Damien Miller. All rights reserved.
@@ -32,7 +32,7 @@
#include "sftp-client.h"
int
-remote_glob(struct sftp_conn *, const char *, int,
+remote_glob(struct sftp_conn *, const char *, int,
int (*)(const char *, int), glob_t *);
#endif
diff --git a/sftp.c b/sftp.c
index 045e0766..f576ed3d 100644
--- a/sftp.c
+++ b/sftp.c
@@ -24,7 +24,7 @@
#include "includes.h"
-RCSID("$OpenBSD: sftp.c,v 1.26 2002/02/12 12:32:27 djm Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.27 2002/03/19 10:49:35 markus Exp $");
/* XXX: short-form remote directory listings (like 'ls -C') */
@@ -94,7 +94,7 @@ static void
usage(void)
{
extern char *__progname;
-
+
fprintf(stderr,
"usage: %s [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]\n"
" [-F config] [-P direct server path] [-S program]\n"
@@ -172,7 +172,7 @@ main(int argc, char **argv)
case 'R':
num_requests = strtol(optarg, &cp, 10);
if (num_requests == 0 || *cp != '\0')
- fatal("Invalid number of requests \"%s\"",
+ fatal("Invalid number of requests \"%s\"",
optarg);
break;
case 'h':
@@ -218,19 +218,19 @@ main(int argc, char **argv)
addargs(&args, "-s");
addargs(&args, "%s", host);
- addargs(&args, "%s", (sftp_server != NULL ?
+ addargs(&args, "%s", (sftp_server != NULL ?
sftp_server : "sftp"));
args.list[0] = ssh_program;
fprintf(stderr, "Connecting to %s...\n", host);
- connect_to_server(ssh_program, args.list, &in, &out,
+ connect_to_server(ssh_program, args.list, &in, &out,
&sshpid);
} else {
args.list = NULL;
addargs(&args, "sftp-server");
fprintf(stderr, "Attaching to %s...\n", sftp_direct);
- connect_to_server(sftp_direct, args.list, &in, &out,
+ connect_to_server(sftp_direct, args.list, &in, &out,
&sshpid);
}
diff --git a/ssh-add.c b/ssh-add.c
index b057a089..8ef9702f 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-add.c,v 1.50 2002/01/29 14:27:57 markus Exp $");
+RCSID("$OpenBSD: ssh-add.c,v 1.51 2002/03/19 10:49:35 markus Exp $");
#include <openssl/evp.h>
@@ -62,7 +62,7 @@ extern char *__progname;
static char *default_files[] = {
_PATH_SSH_CLIENT_ID_RSA,
_PATH_SSH_CLIENT_ID_DSA,
- _PATH_SSH_CLIENT_IDENTITY,
+ _PATH_SSH_CLIENT_IDENTITY,
NULL
};
@@ -319,7 +319,7 @@ main(int argc, char **argv)
}
for(i = 0; default_files[i]; i++) {
- snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
+ snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
default_files[i]);
if (do_file(ac, deleting, buf) == -1)
ret = 1;
diff --git a/ssh.c b/ssh.c
index 117a0930..7c57ca79 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.164 2002/02/14 23:28:00 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.165 2002/03/19 10:49:35 markus Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -475,7 +475,7 @@ again:
/* NOTREACHED */
}
if ((fwd_port = a2port(sfwd_port)) == 0 ||
- (fwd_host_port = a2port(sfwd_host_port)) == 0) {
+ (fwd_host_port = a2port(sfwd_host_port)) == 0) {
fprintf(stderr,
"Bad forwarding port(s) '%s'\n", optarg);
exit(1);
diff --git a/sshconnect2.c b/sshconnect2.c
index c5b5ee51..fbd18aaa 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.97 2002/02/25 16:33:27 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.98 2002/03/19 10:49:35 markus Exp $");
#include "ssh.h"
#include "ssh2.h"
@@ -391,7 +391,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
debug("no key from blob. pkalg %s", pkalg);
break;
}
- if (key->type != pktype) {
+ if (key->type != pktype) {
error("input_userauth_pk_ok: type mismatch "
"for decoded key (received %d, expected %d)",
key->type, pktype);
diff --git a/sshd.c b/sshd.c
index d34b1a79..b6e71d84 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.233 2002/03/19 10:35:39 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.234 2002/03/19 10:49:35 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -538,7 +538,7 @@ privsep_preauth_child(void)
strerror(errno));
if (chdir("/") == -1)
fatal("chdir(/)");
-
+
/* Drop our privileges */
setegid(options.unprivileged_group);
setgid(options.unprivileged_group);
@@ -564,7 +564,7 @@ privsep_postauth(Authctxt *authctxt, pid_t pid)
use_privsep = 0;
return;
}
-
+
/* Authentication complete */
alarm(0);
if (startup_pipe != -1) {
@@ -1376,7 +1376,7 @@ main(int ac, char **av)
if (!use_privsep)
goto skip_privilegeseparation;
-
+
/* Set up unprivileged child process to deal with network data */
monitor = monitor_init();
/* Store a pointer to the kex for later rekeying */
@@ -1422,7 +1422,7 @@ main(int ac, char **av)
exit(0);
authenticated:
- /*
+ /*
* In privilege separation, we fork another child and prepare
* file descriptor passing.
*/
diff --git a/ttymodes.c b/ttymodes.c
index ccc001f2..8afdff1a 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -43,7 +43,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ttymodes.c,v 1.16 2001/12/27 20:39:58 markus Exp $");
+RCSID("$OpenBSD: ttymodes.c,v 1.17 2002/03/19 10:49:35 markus Exp $");
#include "packet.h"
#include "log.h"
@@ -402,17 +402,17 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
* SSH1:
* Opcodes 1 to 127 are defined to have
* a one-byte argument.
- * Opcodes 128 to 159 are defined to have
- * an integer argument.
- */
+ * Opcodes 128 to 159 are defined to have
+ * an integer argument.
+ */
if (opcode > 0 && opcode < 128) {
n_bytes += 1;
(void) packet_get_char();
break;
} else if (opcode >= 128 && opcode < 160) {
- n_bytes += 4;
- (void) packet_get_int();
- break;
+ n_bytes += 4;
+ (void) packet_get_int();
+ break;
} else {
/*
* It is a truly undefined opcode (160 to 255).
@@ -423,7 +423,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
*/
log("parse_tty_modes: unknown opcode %d", opcode);
goto set;
- }
+ }
} else {
/*
* SSH2:
@@ -440,7 +440,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
log("parse_tty_modes: unknown opcode %d", opcode);
goto set;
}
- }
+ }
}
}