diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-09 01:25:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-09 01:25:02 +0000 |
commit | 412ad4b40f71e05ef0b0dff513d1cbf6d6855bc9 (patch) | |
tree | 6a5ce4b38d77b94490d61cc1ce0efd138b1be48a /libexec/smtpd | |
parent | 73c62cfe0023d3d41863fa8f0569702ec8d3ed3e (diff) |
no \n in syslog() calls
Diffstat (limited to 'libexec/smtpd')
-rw-r--r-- | libexec/smtpd/src/contrib/smtpfilter.c | 6 | ||||
-rw-r--r-- | libexec/smtpd/src/smtpd.c | 64 | ||||
-rw-r--r-- | libexec/smtpd/src/smtpfwdd.c | 8 |
3 files changed, 39 insertions, 39 deletions
diff --git a/libexec/smtpd/src/contrib/smtpfilter.c b/libexec/smtpd/src/contrib/smtpfilter.c index c6d277451cb..6a6cac32e92 100644 --- a/libexec/smtpd/src/contrib/smtpfilter.c +++ b/libexec/smtpd/src/contrib/smtpfilter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpfilter.c,v 1.3 2001/12/07 18:45:33 mpech Exp $*/ +/* $OpenBSD: smtpfilter.c,v 1.4 2002/06/09 01:25:01 deraadt Exp $*/ /* * smtpfilter, Filter for filtering headers during forwarding them between @@ -147,7 +147,7 @@ int main( int argc, const char* const argv[] ) } else - syslog( LOG_ERR, "unknown line containing %s: %s\n", MY_INSIDE_DOMAIN, line ); + syslog( LOG_ERR, "unknown line containing %s: %s", MY_INSIDE_DOMAIN, line ); } if( fputs( line, fp ) == EOF ) { @@ -165,7 +165,7 @@ int main( int argc, const char* const argv[] ) state = WEXITSTATUS( state ); if( state != 0 && state != EX_NOUSER ) - syslog( LOG_ERR, "sendmail exited with status %d\n", state ); + syslog( LOG_ERR, "sendmail exited with status %d", state ); return( state ); } diff --git a/libexec/smtpd/src/smtpd.c b/libexec/smtpd/src/smtpd.c index aaa876a29db..eeaf68c1214 100644 --- a/libexec/smtpd/src/smtpd.c +++ b/libexec/smtpd/src/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.12 2002/05/13 07:44:48 mpech Exp $*/ +/* $OpenBSD: smtpd.c,v 1.13 2002/06/09 01:24:59 deraadt Exp $*/ /* * smtpd, Obtuse SMTP daemon, storing agent. does simple collection of @@ -41,7 +41,7 @@ char *obtuse_copyright = "Copyright 1996 - Obtuse Systems Corporation - All rights reserved."; -char *obtuse_rcsid = "$OpenBSD: smtpd.c,v 1.12 2002/05/13 07:44:48 mpech Exp $"; +char *obtuse_rcsid = "$OpenBSD: smtpd.c,v 1.13 2002/06/09 01:24:59 deraadt Exp $"; #include <stdarg.h> #include <stdlib.h> @@ -1157,7 +1157,7 @@ state_change(smtp_state state, int cmd, int status) return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad HELO status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad HELO status in change_state)!"); abort(); } #if EHLO_KLUDGE @@ -1176,7 +1176,7 @@ state_change(smtp_state state, int cmd, int status) return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad EHLO status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad EHLO status in change_state)!"); abort(); } #endif @@ -1194,7 +1194,7 @@ state_change(smtp_state state, int cmd, int status) reset_state(state); return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad MAIL status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad MAIL status in change_state)!"); abort(); } case RCPT: @@ -1211,7 +1211,7 @@ state_change(smtp_state state, int cmd, int status) reset_state(state); return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad RCPT status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad RCPT status in change_state)!"); abort(); } case NOOP: @@ -1219,7 +1219,7 @@ state_change(smtp_state state, int cmd, int status) case SUCCESS: return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad NOOP status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad NOOP status in change_state)!"); abort(); } case DATA: @@ -1236,7 +1236,7 @@ state_change(smtp_state state, int cmd, int status) reset_state(state); return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad DATA status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad DATA status in change_state)!"); abort(); } case UNKNOWN: @@ -1249,7 +1249,7 @@ state_change(smtp_state state, int cmd, int status) reset_state(state); return; default: - syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad UNKNOWN status in change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (Bad UNKNOWN status in change_state)!"); abort(); } case QUIT: @@ -1268,7 +1268,7 @@ state_change(smtp_state state, int cmd, int status) /* * shouldn't get here on valid input. */ - syslog(LOG_CRIT, "Hey, I shouldn't be here (end of change_state)!\n"); + syslog(LOG_CRIT, "Hey, I shouldn't be here (end of change_state)!"); abort(); } } @@ -2091,7 +2091,7 @@ main(int argc, char **argv) break; case 'i': if (optarg[0] != '/') { - syslog(LOG_ERR, "The \"-i\" option requires an absolute pathname argument\n"); + syslog(LOG_ERR, "The \"-i\" option requires an absolute pathname argument"); show_usage(); exit(EX_USAGE); } @@ -2102,7 +2102,7 @@ main(int argc, char **argv) break; case 'c': if (optarg[0] != '/') { - syslog(LOG_ERR, "The \"-c\" option requires an absolute pathname argument\n"); + syslog(LOG_ERR, "The \"-c\" option requires an absolute pathname argument"); show_usage(); exit(EX_USAGE); } @@ -2128,7 +2128,7 @@ main(int argc, char **argv) break; case 'd': if (optarg[0] != '/') { - syslog(LOG_ERR, "%s, The \"-d\" option requires an absolute pathname argument\n", optarg); + syslog(LOG_ERR, "%s, The \"-d\" option requires an absolute pathname argument", optarg); show_usage(); exit(EX_USAGE); } @@ -2147,7 +2147,7 @@ main(int argc, char **argv) */ user = getpwuid((uid_t) userid); if (user == NULL) { - syslog(LOG_ERR, "Invalid uid argument for the \"-u\" option, no user found for uid %s\n", optarg); + syslog(LOG_ERR, "Invalid uid argument for the \"-u\" option, no user found for uid %s", optarg); show_usage(); exit(EX_USAGE); } @@ -2159,7 +2159,7 @@ main(int argc, char **argv) */ user = getpwnam(optarg); if (user == NULL) { - syslog(LOG_ERR, "Invalid username argument for the \"-u\" option, no user found for name %s\n", optarg); + syslog(LOG_ERR, "Invalid username argument for the \"-u\" option, no user found for name %s", optarg); show_usage(); exit(EX_USAGE); } @@ -2180,7 +2180,7 @@ main(int argc, char **argv) */ group = getgrgid((gid_t) grpid); if (group == NULL) { - syslog(LOG_ERR, "Invalid gid argument for the \"-g\" option, no group found for gid %s\n", optarg); + syslog(LOG_ERR, "Invalid gid argument for the \"-g\" option, no group found for gid %s", optarg); show_usage(); exit(EX_USAGE); } @@ -2192,7 +2192,7 @@ main(int argc, char **argv) */ group = getgrnam(optarg); if (group == NULL) { - syslog(LOG_ERR, "Invalid groupname argument for the \"-g\" option, no group found for name %s\n", optarg); + syslog(LOG_ERR, "Invalid groupname argument for the \"-g\" option, no group found for name %s", optarg); show_usage(); exit(EX_USAGE); } @@ -2206,19 +2206,19 @@ main(int argc, char **argv) maxsize = strtol(optarg, &foo, 10); if (*foo != '\0') { - syslog(LOG_ERR, "The \"-s\" option requires a size argument\n"); + syslog(LOG_ERR, "The \"-s\" option requires a size argument"); show_usage(); exit(EX_USAGE); } if (maxsize <= 0) { - syslog(LOG_ERR, "\"-s\" argument must be positive!\n"); + syslog(LOG_ERR, "\"-s\" argument must be positive!"); show_usage(); exit(EX_USAGE); } } break; default: - syslog(LOG_ERR, "Unknown option \"-%c\"\n", opt); + syslog(LOG_ERR, "Unknown option \"-%c\"", opt); show_usage(); exit(EX_USAGE); break; @@ -2244,8 +2244,8 @@ main(int argc, char **argv) */ user = getpwuid((uid_t) userid); if (user == NULL) { - syslog(LOG_ERR, "Eeek! I was compiled to run as uid %s, but no user found for uid %s\n", username, username); - syslog(LOG_ERR, "Please recompile me to use a valid user, or specify one with the \"-u\" option.\n"); + syslog(LOG_ERR, "Eeek! I was compiled to run as uid %s, but no user found for uid %s", username, username); + syslog(LOG_ERR, "Please recompile me to use a valid user, or specify one with the \"-u\" option."); exit(EX_CONFIG); } username = user->pw_name; @@ -2256,8 +2256,8 @@ main(int argc, char **argv) */ user = getpwnam(username); if (user == NULL) { - syslog(LOG_ERR, "Eeek! I was compiled to run as user \"%s\", but no user found for username \"%s\"\n", username, username); - syslog(LOG_ERR, "Please recompile me to use a valid user, or specify one with the \"-u\" option.\n"); + syslog(LOG_ERR, "Eeek! I was compiled to run as user \"%s\", but no user found for username \"%s\"", username, username); + syslog(LOG_ERR, "Please recompile me to use a valid user, or specify one with the \"-u\" option."); exit(EX_CONFIG); } username = user->pw_name; @@ -2278,8 +2278,8 @@ main(int argc, char **argv) */ group = getgrgid((gid_t) grpid); if (group == NULL) { - syslog(LOG_ERR, "Eeek! I was compiled to run as gid %s, but no group found for gid %s\n", groupname, groupname); - syslog(LOG_ERR, "Please recompile me to use a valid group, or specify one with the \"-g\" option.\n"); + syslog(LOG_ERR, "Eeek! I was compiled to run as gid %s, but no group found for gid %s", groupname, groupname); + syslog(LOG_ERR, "Please recompile me to use a valid group, or specify one with the \"-g\" option."); exit(EX_CONFIG); } groupname = group->gr_name; @@ -2290,8 +2290,8 @@ main(int argc, char **argv) */ group = getgrnam(groupname); if (group == NULL) { - syslog(LOG_ERR, "Eeek! I was compiled to run as group \"%s\", but no group found for groupname \"%s\"\n", groupname, groupname); - syslog(LOG_ERR, "Please recompile me to use a valid group, or specify one with the \"-g\" option.\n"); + syslog(LOG_ERR, "Eeek! I was compiled to run as group \"%s\", but no group found for groupname \"%s\"", groupname, groupname); + syslog(LOG_ERR, "Please recompile me to use a valid group, or specify one with the \"-g\" option."); exit(EX_CONFIG); } groupname = group->gr_name; @@ -2301,17 +2301,17 @@ main(int argc, char **argv) * If we're here, we have a valid user and group to run as */ if (group == NULL || user == NULL) { - syslog(LOG_CRIT, "Didn't find a user or group, (Shouldn't happen)\n"); + syslog(LOG_CRIT, "Didn't find a user or group, (Shouldn't happen)"); abort(); } if (user->pw_uid == 0) { syslog(LOG_CRIT, "Sorry, I don't want to run as root! It's a bad idea!"); - syslog(LOG_CRIT, "Please recompile me to use a valid user, or specify one with the \"-u\" option.\n"); + syslog(LOG_CRIT, "Please recompile me to use a valid user, or specify one with the \"-u\" option."); exit(EX_CONFIG); } if (group->gr_gid == 0) { syslog(LOG_CRIT, "Sorry, I don't want to run as group 0. It's a bad idea!"); - syslog(LOG_CRIT, "Please recompile me to use a valid group, or specify one with the \"-g\" option.\n"); + syslog(LOG_CRIT, "Please recompile me to use a valid group, or specify one with the \"-g\" option."); exit(EX_CONFIG); } if ( daemon_mode ) { @@ -2555,7 +2555,7 @@ main(int argc, char **argv) exit(EX_CONFIG); } if (strcmp(tmp_he->h_name, peerinfo.my_clean_reverse_name) != 0) { - syslog(LOG_CRIT, "CRITICAL - Suspicious characters in MY hostname! (for ip=%s) cleaned to %s.\n", peerinfo.peer_ok_addr, peerinfo.my_clean_reverse_name); + syslog(LOG_CRIT, "CRITICAL - Suspicious characters in MY hostname! (for ip=%s) cleaned to %s.", peerinfo.peer_ok_addr, peerinfo.my_clean_reverse_name); syslog(LOG_CRIT, "CRITICAL - YOUR DNS IS EITHER COMPROMISED OR MISCONFIGURED! INVESTIGATE!"); smtp_exit(EX_CONFIG); } diff --git a/libexec/smtpd/src/smtpfwdd.c b/libexec/smtpd/src/smtpfwdd.c index 9b08f77e52d..e038667fff3 100644 --- a/libexec/smtpd/src/smtpfwdd.c +++ b/libexec/smtpd/src/smtpfwdd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpfwdd.c,v 1.8 2001/12/30 00:27:14 deraadt Exp $*/ +/* $OpenBSD: smtpfwdd.c,v 1.9 2002/06/09 01:24:59 deraadt Exp $*/ /* * smtpfwdd, Obtuse SMTP forward daemon, master process watches spool @@ -42,7 +42,7 @@ */ char *obtuse_copyright = "Copyright 1996 - Obtuse Systems Corporation - All rights reserved."; -char *obtuse_rcsid = "$OpenBSD: smtpfwdd.c,v 1.8 2001/12/30 00:27:14 deraadt Exp $"; +char *obtuse_rcsid = "$OpenBSD: smtpfwdd.c,v 1.9 2002/06/09 01:24:59 deraadt Exp $"; #include <stdio.h> #include <signal.h> @@ -731,7 +731,7 @@ forward(char *fname) for (i = rstart; i < (MAXARGS - 2); i++) { if (fseek(f, sv->location, SEEK_SET) != 0) { - syslog(LOG_ERR, "Couldn't fseek %s (%m)\n - message abandoned after delivery to first %d recipients", fname, sentout); + syslog(LOG_ERR, "Couldn't fseek %s (%m) - message abandoned after delivery to first %d recipients", fname, sentout); fail_abort(f, fname); } fprintf(f, "SENT"); @@ -744,7 +744,7 @@ forward(char *fname) if (fseek(f, body, SEEK_SET) != 0) { - syslog(LOG_ERR, "Couldn't fseek %s (%m)\n - message abandoned after delivery to first %d recipients", fname, sentout); + syslog(LOG_ERR, "Couldn't fseek %s (%m) - message abandoned after delivery to first %d recipients", fname, sentout); fail_abort(f, fname); } } |