]> andersk Git - openssh.git/commitdiff
- millert@cvs.openbsd.org 2001/03/04 17:42:28
authormouring <mouring>
Mon, 5 Mar 2001 07:47:23 +0000 (07:47 +0000)
committermouring <mouring>
Mon, 5 Mar 2001 07:47:23 +0000 (07:47 +0000)
     [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.

ChangeLog
authfd.c
channels.c
dh.c
log.c
readconf.c
servconf.c
sftp-int.c
ssh.c
sshconnect.c
sshd.c

index 08183e1b22828c18aafbf778c7b032b7028f742f..c044b9ec6eecd4ce378e94b91cfc97bdc155f88f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - 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.
index 74518e3fbadde9507d25a22e67884b5a05d7284b..76e917755eb6cfc56bd0a1f0de4de27642c5f9ae 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
  */
 
 #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>
 
@@ -254,7 +254,7 @@ ssh_get_num_identities(AuthenticationConnection *auth, int version)
        /* 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;
index 1d74efe0c63dbb0ea9cd08e70238b82739b5ddab..bb872dc94723ee48b23b3b27203693cf10d3a0b4 100644 (file)
@@ -40,7 +40,7 @@
  */
 
 #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>
@@ -521,7 +521,7 @@ channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset)
                 * 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);
diff --git a/dh.c b/dh.c
index f1f7e5d43fa789e7842492aa819a9945b812a296..c88a014a5c3b727c7bb1ec764d8f18dd6ca80b6a 100644 (file)
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
  */
 
 #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"
 
@@ -90,7 +90,7 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
 
        return (1);
  fail:
-       error("Bad prime description in line %d\n", linenum);
+       error("Bad prime description in line %d", linenum);
        return (0);
 }
 
diff --git a/log.c b/log.c
index c9c1631c93ed4a8480e0e245362546b597287e39..ad93f515f8e721d0fded49e1c34e278dd89ce1e1 100644 (file)
--- a/log.c
+++ b/log.c
@@ -34,7 +34,7 @@
  */
 
 #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"
@@ -265,7 +265,7 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
                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);
        }
@@ -315,7 +315,7 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
                break;
        default:
                fprintf(stderr,
-                   "Unrecognized internal syslog facility code %d\n",
+                   "Unrecognized internal syslog facility code %d",
                    (int) facility);
                exit(1);
        }
index 7cce92310f3b99a1334ae087fef7bf5a8f70c8f6..33649a8d54f39b2a4a1c7ecd8cc07a1fc42d1276 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #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"
@@ -187,7 +187,7 @@ add_local_forward(Options *options, u_short port, const char *host,
 #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);
@@ -534,7 +534,7 @@ parse_int:
                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;
@@ -659,7 +659,7 @@ read_config_file(const char *filename, const char *host, Options *options)
        }
        fclose(f);
        if (bad_options > 0)
-               fatal("%s: terminating, %d bad configuration options\n",
+               fatal("%s: terminating, %d bad configuration options",
                      filename, bad_options);
 }
 
index 1e77d32f7ecbddb66e61f005e351e87581fe41e0..1e38f3b60f5c295cd20908555cdf8508bfdf566c 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #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>
@@ -318,7 +318,7 @@ add_listen_addr(ServerOptions *options, char *addr)
                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)
@@ -371,11 +371,11 @@ read_server_config(ServerOptions *options, const char *filename)
                                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;
@@ -405,7 +405,7 @@ parse_int:
                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;
@@ -591,7 +591,7 @@ parse_flag:
                        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;
@@ -602,7 +602,7 @@ parse_flag:
                        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;
@@ -615,7 +615,7 @@ parse_flag:
                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);
                        }
@@ -624,7 +624,7 @@ parse_flag:
                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);
                        }
@@ -633,7 +633,7 @@ parse_flag:
                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);
                        }
@@ -642,7 +642,7 @@ parse_flag:
                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);
                        }
index 95e54a65f68fce66613e9e031c0f3333beca9ece..53136be07546066eb820429570be5b15e4a268d3 100644 (file)
@@ -28,7 +28,7 @@
 /* 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"
@@ -579,7 +579,7 @@ parse_dispatch_command(int in, int out, const char *cmd, char **pwd)
                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",
diff --git a/ssh.c b/ssh.c
index c22002bd4ec498b874df6db0d2b52d4d3d543607..631900f1553a52c62f119d79928a021299ec7a25 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
  */
 
 #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>
@@ -388,7 +388,7 @@ main(int ac, char **av)
                                options.log_level++;
                                break;
                        } else {
-                               fatal("Too high debugging level.\n");
+                               fatal("Too high debugging level.");
                        }
                        /* fallthrough */
                case 'V':
@@ -544,14 +544,14 @@ main(int ac, char **av)
        /* 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. */
index 623caed73c7b8d4c6f62331e350866ff864b3135..9962d49bdee346276de1648a54d995892f9d165d 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #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>
 
@@ -618,7 +618,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
                            "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);
@@ -719,7 +719,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
                } 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!");
                }
        }
 
diff --git a/sshd.c b/sshd.c
index 7b9b1420b5b501ea80fa64c2648374fabb94b6ab..838ac0d735a2b26bd581800a6dddf8eecb66d189 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
  */
 
 #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>
@@ -738,7 +738,7 @@ main(int ac, char **av)
                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);
        }
 
This page took 0.083431 seconds and 5 git commands to generate.