From 9eab9564d5185b52f33f4a265914d32a3147338e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 22 Feb 2009 08:47:02 +1100 Subject: - (djm) OpenBSD CVS Sync - tobias@cvs.openbsd.org 2009/02/21 19:32:04 [misc.c sftp-server-main.c ssh-keygen.c] Added missing newlines in error messages. ok dtucker --- ChangeLog | 9 ++++++++- misc.c | 7 ++++--- sftp-server-main.c | 5 +++-- ssh-keygen.c | 16 ++++++++-------- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1de4ed4a..c50e1e5f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20090222 + - (djm) OpenBSD CVS Sync + - tobias@cvs.openbsd.org 2009/02/21 19:32:04 + [misc.c sftp-server-main.c ssh-keygen.c] + Added missing newlines in error messages. + ok dtucker + 20090221 - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2009/02/17 01:28:32 @@ -5183,5 +5190,5 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.5200 2009/02/21 07:03:04 djm Exp $ +$Id: ChangeLog,v 1.5201 2009/02/21 21:47:02 djm Exp $ diff --git a/misc.c b/misc.c index 755eda105..143dbf0e2 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.70 2009/01/22 10:02:34 djm Exp $ */ +/* $OpenBSD: misc.c,v 1.71 2009/02/21 19:32:04 tobias Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -714,7 +714,8 @@ sanitise_stdfd(void) int nullfd, dupfd; if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { - fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); + fprintf(stderr, "Couldn't open /dev/null: %s\n", + strerror(errno)); exit(1); } while (++dupfd <= 2) { @@ -722,7 +723,7 @@ sanitise_stdfd(void) if (fcntl(dupfd, F_GETFL, 0) >= 0) continue; if (dup2(nullfd, dupfd) == -1) { - fprintf(stderr, "dup2: %s", strerror(errno)); + fprintf(stderr, "dup2: %s\n", strerror(errno)); exit(1); } } diff --git a/sftp-server-main.c b/sftp-server-main.c index 2b14569e4..7e644ab89 100644 --- a/sftp-server-main.c +++ b/sftp-server-main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server-main.c,v 1.3 2008/03/26 23:44:41 djm Exp $ */ +/* $OpenBSD: sftp-server-main.c,v 1.4 2009/02/21 19:32:04 tobias Exp $ */ /* * Copyright (c) 2008 Markus Friedl. All rights reserved. * @@ -42,7 +42,8 @@ main(int argc, char **argv) sanitise_stdfd(); if ((user_pw = getpwuid(getuid())) == NULL) { - fprintf(stderr, "No user found for uid %lu", (u_long)getuid()); + fprintf(stderr, "No user found for uid %lu\n", + (u_long)getuid()); return 1; } diff --git a/ssh-keygen.c b/ssh-keygen.c index a45499177..5765cff08 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.172 2008/11/07 00:42:12 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.173 2009/02/21 19:32:04 tobias Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -135,7 +135,7 @@ ask_filename(struct passwd *pw, const char *prompt) name = _PATH_SSH_CLIENT_ID_RSA; break; default: - fprintf(stderr, "bad key type"); + fprintf(stderr, "bad key type\n"); exit(1); break; } @@ -421,7 +421,7 @@ do_convert_from_ssh2(struct passwd *pw) PEM_write_RSAPrivateKey(stdout, k->rsa, NULL, NULL, 0, NULL, NULL)) : key_write(k, stdout); if (!ok) { - fprintf(stderr, "key write failed"); + fprintf(stderr, "key write failed\n"); exit(1); } key_free(k); @@ -1015,11 +1015,11 @@ do_change_comment(struct passwd *pw) } f = fdopen(fd, "w"); if (f == NULL) { - printf("fdopen %s failed", identity_file); + printf("fdopen %s failed\n", identity_file); exit(1); } if (!key_write(public, f)) - fprintf(stderr, "write key failed"); + fprintf(stderr, "write key failed\n"); key_free(public); fprintf(f, " %s\n", new_comment); fclose(f); @@ -1366,7 +1366,7 @@ main(int argc, char **argv) printf("Generating public/private %s key pair.\n", key_type_name); private = key_generate(type, bits); if (private == NULL) { - fprintf(stderr, "key_generate failed"); + fprintf(stderr, "key_generate failed\n"); exit(1); } public = key_from_private(private); @@ -1456,11 +1456,11 @@ passphrase_again: } f = fdopen(fd, "w"); if (f == NULL) { - printf("fdopen %s failed", identity_file); + printf("fdopen %s failed\n", identity_file); exit(1); } if (!key_write(public, f)) - fprintf(stderr, "write key failed"); + fprintf(stderr, "write key failed\n"); fprintf(f, " %s\n", comment); fclose(f); -- cgit v1.2.3