Skip to content

Commit

Permalink
Fix debug call in error path of authorized_keys processing and fix re…
Browse files Browse the repository at this point in the history
…lated

warnings; ok djm@
  • Loading branch information
daztucker committed Dec 11, 2004
1 parent 3c36349 commit dc288dc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion ssh/auth-rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion ssh/auth2-pubkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions ssh/authfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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[] =
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions ssh/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions ssh/misc.h
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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 *);

0 comments on commit dc288dc

Please sign in to comment.