summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authordtucker <dtucker@openbsd.org>2004-12-11 01:48:56 +0000
committerdtucker <dtucker@openbsd.org>2004-12-11 01:48:56 +0000
commit0b67a9db2d62fc9214f33b54b6a8d58010b4133b (patch)
treeb5282363e51641bf1d451150bff64ab343e480cf /usr.bin/ssh
parentInvert the polarity of two tests in the recovery code that could cause (diff)
downloadwireguard-openbsd-0b67a9db2d62fc9214f33b54b6a8d58010b4133b.tar.xz
wireguard-openbsd-0b67a9db2d62fc9214f33b54b6a8d58010b4133b.zip
Fix debug call in error path of authorized_keys processing and fix related
warnings; ok djm@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/auth-rsa.c3
-rw-r--r--usr.bin/ssh/auth2-pubkey.c3
-rw-r--r--usr.bin/ssh/authfile.c5
-rw-r--r--usr.bin/ssh/misc.c8
-rw-r--r--usr.bin/ssh/misc.h4
5 files changed, 13 insertions, 10 deletions
diff --git a/usr.bin/ssh/auth-rsa.c b/usr.bin/ssh/auth-rsa.c
index 2060f839458..4378008d361 100644
--- a/usr.bin/ssh/auth-rsa.c
+++ b/usr.bin/ssh/auth-rsa.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.61 2004/12/06 11:41:03 dtucker Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.62 2004/12/11 01:48:56 dtucker Exp $");
#include <openssl/rsa.h>
#include <openssl/md5.h>
@@ -33,6 +33,7 @@ RCSID("$OpenBSD: auth-rsa.c,v 1.61 2004/12/06 11:41:03 dtucker Exp $");
#include "hostfile.h"
#include "monitor_wrap.h"
#include "ssh.h"
+#include "misc.h"
/* import */
extern ServerOptions options;
diff --git a/usr.bin/ssh/auth2-pubkey.c b/usr.bin/ssh/auth2-pubkey.c
index a94418cc6c0..962ce7c5a90 100644
--- a/usr.bin/ssh/auth2-pubkey.c
+++ b/usr.bin/ssh/auth2-pubkey.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2-pubkey.c,v 1.8 2004/12/06 11:41:03 dtucker Exp $");
+RCSID("$OpenBSD: auth2-pubkey.c,v 1.9 2004/12/11 01:48:56 dtucker Exp $");
#include "ssh.h"
#include "ssh2.h"
@@ -41,6 +41,7 @@ RCSID("$OpenBSD: auth2-pubkey.c,v 1.8 2004/12/06 11:41:03 dtucker Exp $");
#include "auth-options.h"
#include "canohost.h"
#include "monitor_wrap.h"
+#include "misc.h"
/* import */
extern ServerOptions options;
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index 7b9d7ca8c2b..fb0fb0dc8fa 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.59 2004/12/06 11:41:03 dtucker Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.60 2004/12/11 01:48:56 dtucker Exp $");
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -51,6 +51,7 @@ RCSID("$OpenBSD: authfile.c,v 1.59 2004/12/06 11:41:03 dtucker Exp $");
#include "log.h"
#include "authfile.h"
#include "rsa.h"
+#include "misc.h"
/* Version identification string for SSH v1 identity files. */
static const char authfile_id_string[] =
@@ -600,7 +601,7 @@ key_try_load_public(Key *k, const char *filename, char **commentp)
FILE *f;
char line[SSH_MAX_PUBKEY_BYTES];
char *cp;
- int linenum = 0;
+ u_long linenum = 0;
f = fopen(filename, "r");
if (f != NULL) {
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index d659eaa9b40..98c62348b9f 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: misc.c,v 1.26 2004/12/06 11:41:03 dtucker Exp $");
+RCSID("$OpenBSD: misc.c,v 1.27 2004/12/11 01:48:56 dtucker Exp $");
#include "misc.h"
#include "log.h"
@@ -333,15 +333,15 @@ addargs(arglist *args, char *fmt, ...)
*/
int
read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz,
- int *lineno)
+ u_long *lineno)
{
while (fgets(buf, bufsz, f) != NULL) {
(*lineno)++;
if (buf[strlen(buf) - 1] == '\n' || feof(f)) {
return 0;
} else {
- debug("%s: %s line %d exceeds size limit", __func__,
- filename, lineno);
+ debug("%s: %s line %lu exceeds size limit", __func__,
+ filename, *lineno);
/* discard remainder of line */
while(fgetc(f) != '\n' && !feof(f))
; /* nothing */
diff --git a/usr.bin/ssh/misc.h b/usr.bin/ssh/misc.h
index 4aab2ca0135..193216fa942 100644
--- a/usr.bin/ssh/misc.h
+++ b/usr.bin/ssh/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.19 2004/12/06 11:41:03 dtucker Exp $ */
+/* $OpenBSD: misc.h,v 1.20 2004/12/11 01:48:56 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -47,4 +47,4 @@ char *tilde_expand_filename(const char *, uid_t);
char *read_passphrase(const char *, int);
int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
-int read_keyfile_line(FILE *, const char *, char *, size_t, int *);
+int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);