- stevesk@cvs.openbsd.org 2001/03/04 12:54:04
[sshd.8]
spelling
+ - millert@cvs.openbsd.org 2001/03/04 17:42:28
+ [authfd.c channels.c dh.c log.c readconf.c servconf.c sftp-int.c
+ ssh.c sshconnect.c sshd.c]
+ log functions should not be passed strings that end in newline as they
+ get passed on to syslog() and when logging to stderr, do_log() appends
+ its own newline.
20010304
- (bal) Remove make-ssh-known-hosts.1 since it's no longer valid.
*/
#include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.36 2001/03/01 02:11:25 deraadt Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.37 2001/03/04 17:42:27 millert Exp $");
#include <openssl/evp.h>
/* Get the number of entries in the response and check it for sanity. */
auth->howmany = buffer_get_int(&auth->identities);
if (auth->howmany > 1024)
- fatal("Too many identities in authentication reply: %d\n",
+ fatal("Too many identities in authentication reply: %d",
auth->howmany);
return auth->howmany;
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.97 2001/03/04 00:03:59 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.98 2001/03/04 17:42:28 millert Exp $");
#include <openssl/rsa.h>
#include <openssl/dsa.h>
* We have received an X11 connection that has bad
* authentication information.
*/
- log("X11 connection rejected because of wrong authentication.\r\n");
+ log("X11 connection rejected because of wrong authentication.");
buffer_clear(&c->input);
buffer_clear(&c->output);
close(c->sock);
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.6 2001/01/21 19:05:49 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.7 2001/03/04 17:42:28 millert Exp $");
#include "xmalloc.h"
return (1);
fail:
- error("Bad prime description in line %d\n", linenum);
+ error("Bad prime description in line %d", linenum);
return (0);
}
*/
#include "includes.h"
-RCSID("$OpenBSD: log.c,v 1.17 2001/03/04 17:42:28 millert Exp $");
+RCSID("$OpenBSD: log.c,v 1.16 2001/03/03 23:59:34 markus Exp $");
#include "log.h"
#include "xmalloc.h"
log_level = level;
break;
default:
- fprintf(stderr, "Unrecognized internal syslog level code %d\n",
+ fprintf(stderr, "Unrecognized internal syslog level code %d",
(int) level);
exit(1);
}
break;
default:
fprintf(stderr,
- "Unrecognized internal syslog facility code %d\n",
+ "Unrecognized internal syslog facility code %d",
(int) facility);
exit(1);
}
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.63 2001/02/24 10:37:55 deraadt Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.64 2001/03/04 17:42:28 millert Exp $");
#include "ssh.h"
#include "xmalloc.h"
#ifndef HAVE_CYGWIN
extern uid_t original_real_uid;
if (port < IPPORT_RESERVED && original_real_uid != 0)
- fatal("Privileged ports can only be forwarded by root.\n");
+ fatal("Privileged ports can only be forwarded by root.");
#endif
if (options->num_local_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION)
fatal("Too many local forwards (max %d).", SSH_MAX_FORWARDS_PER_DIRECTION);
arg = strdelim(&s);
value = log_level_number(arg);
if (value == (LogLevel) - 1)
- fatal("%.200s line %d: unsupported log level '%s'\n",
+ fatal("%.200s line %d: unsupported log level '%s'",
filename, linenum, arg ? arg : "<NONE>");
if (*activep && (LogLevel) * intptr == -1)
*intptr = (LogLevel) value;
}
fclose(f);
if (bad_options > 0)
- fatal("%s: terminating, %d bad configuration options\n",
+ fatal("%s: terminating, %d bad configuration options",
filename, bad_options);
}
*/
#include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.69 2001/03/04 11:16:06 stevesk Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.70 2001/03/04 17:42:28 millert Exp $");
#ifdef KRB4
#include <krb.h>
hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
snprintf(strport, sizeof strport, "%d", options->ports[i]);
if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0)
- fatal("bad addr or host: %s (%s)\n",
+ fatal("bad addr or host: %s (%s)",
addr ? addr : "<NULL>",
gai_strerror(gaierr));
for (ai = aitop; ai->ai_next; ai = ai->ai_next)
fatal("%s line %d: ports must be specified before "
"ListenAdress.\n", filename, linenum);
if (options->num_ports >= MAX_PORTS)
- fatal("%s line %d: too many ports.\n",
+ fatal("%s line %d: too many ports.",
filename, linenum);
arg = strdelim(&cp);
if (!arg || *arg == '\0')
- fatal("%s line %d: missing port number.\n",
+ fatal("%s line %d: missing port number.",
filename, linenum);
options->ports[options->num_ports++] = atoi(arg);
break;
case sListenAddress:
arg = strdelim(&cp);
if (!arg || *arg == '\0')
- fatal("%s line %d: missing inet addr.\n",
+ fatal("%s line %d: missing inet addr.",
filename, linenum);
add_listen_addr(options, arg);
break;
arg = strdelim(&cp);
value = log_facility_number(arg);
if (value == (SyslogFacility) - 1)
- fatal("%.200s line %d: unsupported log facility '%s'\n",
+ fatal("%.200s line %d: unsupported log facility '%s'",
filename, linenum, arg ? arg : "<NONE>");
if (*intptr == -1)
*intptr = (SyslogFacility) value;
arg = strdelim(&cp);
value = log_level_number(arg);
if (value == (LogLevel) - 1)
- fatal("%.200s line %d: unsupported log level '%s'\n",
+ fatal("%.200s line %d: unsupported log level '%s'",
filename, linenum, arg ? arg : "<NONE>");
if (*intptr == -1)
*intptr = (LogLevel) value;
case sAllowUsers:
while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_allow_users >= MAX_ALLOW_USERS)
- fatal("%s line %d: too many allow users.\n",
+ fatal("%s line %d: too many allow users.",
filename, linenum);
options->allow_users[options->num_allow_users++] = xstrdup(arg);
}
case sDenyUsers:
while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_deny_users >= MAX_DENY_USERS)
- fatal( "%s line %d: too many deny users.\n",
+ fatal( "%s line %d: too many deny users.",
filename, linenum);
options->deny_users[options->num_deny_users++] = xstrdup(arg);
}
case sAllowGroups:
while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_allow_groups >= MAX_ALLOW_GROUPS)
- fatal("%s line %d: too many allow groups.\n",
+ fatal("%s line %d: too many allow groups.",
filename, linenum);
options->allow_groups[options->num_allow_groups++] = xstrdup(arg);
}
case sDenyGroups:
while ((arg = strdelim(&cp)) && *arg != '\0') {
if (options->num_deny_groups >= MAX_DENY_GROUPS)
- fatal("%s line %d: too many deny groups.\n",
+ fatal("%s line %d: too many deny groups.",
filename, linenum);
options->deny_groups[options->num_deny_groups++] = xstrdup(arg);
}
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.23 2001/03/01 02:18:04 deraadt Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.24 2001/03/04 17:42:28 millert Exp $");
#include "buffer.h"
#include "xmalloc.h"
break;
case I_LPWD:
if (!getcwd(path_buf, sizeof(path_buf)))
- error("Couldn't get local cwd: %s\n",
+ error("Couldn't get local cwd: %s",
strerror(errno));
else
printf("Local working directory: %s\n",
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.102 2001/03/04 10:57:53 stevesk Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.103 2001/03/04 17:42:28 millert Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
options.log_level++;
break;
} else {
- fatal("Too high debugging level.\n");
+ fatal("Too high debugging level.");
}
/* fallthrough */
case 'V':
/* Do not allocate a tty if stdin is not a tty. */
if (!isatty(fileno(stdin)) && !force_tty_flag) {
if (tty_flag)
- log("Pseudo-terminal will not be allocated because stdin is not a terminal.\n");
+ log("Pseudo-terminal will not be allocated because stdin is not a terminal.");
tty_flag = 0;
}
/* Get user data. */
pw = getpwuid(original_real_uid);
if (!pw) {
- log("You don't exist, go away!\n");
+ log("You don't exist, go away!");
exit(1);
}
/* Take a copy of the returned structure. */
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.97 2001/02/15 23:19:59 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.98 2001/03/04 17:42:28 millert Exp $");
#include <openssl/bn.h>
"Are you sure you want to continue connecting (yes/no)? ",
host, ip, type, key_fingerprint(host_key));
if (!read_yes_or_no(prompt, -1))
- fatal("Aborted by user!\n");
+ fatal("Aborted by user!");
}
if (options.check_host_ip && ip_status == HOST_NEW) {
snprintf(hostline, sizeof(hostline), "%s,%s", host, ip);
} else if (options.strict_host_key_checking == 2) {
if (!read_yes_or_no("Are you sure you want " \
"to continue connecting (yes/no)? ", -1))
- fatal("Aborted by user!\n");
+ fatal("Aborted by user!");
}
}
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.171 2001/03/04 01:46:30 djm Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.172 2001/03/04 17:42:28 millert Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
options.protocol &= ~SSH_PROTO_2;
}
if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
- log("sshd: no hostkeys available -- exiting.\n");
+ log("sshd: no hostkeys available -- exiting.");
exit(1);
}