diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-10 08:06:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-10 08:06:56 +0000 |
commit | de81fe773f9f41a5f3b47ce63ea5197aed965c43 (patch) | |
tree | 85a37e2b509eac6ea0a6bb3a1030b1444a3f9027 /libexec | |
parent | 1312340e81adc02ff3f652aacc20b2df4ceacf84 (diff) |
do not syslog() with "\n"; skipped smtpd/named/ipmon; 12 minutes of dabbling
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/comsat/comsat.c | 4 | ||||
-rw-r--r-- | libexec/getty/main.c | 4 | ||||
-rw-r--r-- | libexec/identd/parse.c | 2 | ||||
-rw-r--r-- | libexec/rexecd/rexecd.c | 4 | ||||
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 6 | ||||
-rw-r--r-- | libexec/rshd/rshd.c | 6 | ||||
-rw-r--r-- | libexec/smtpd/src/smtpd.c | 9 | ||||
-rw-r--r-- | libexec/talkd/process.c | 6 | ||||
-rw-r--r-- | libexec/talkd/table.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/state.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/sys_term.c | 10 | ||||
-rw-r--r-- | libexec/telnetd/utility.c | 8 | ||||
-rw-r--r-- | libexec/tftpd/tftpd.c | 40 |
13 files changed, 55 insertions, 56 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index d393632b4f7..50ed1a61456 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$Id: comsat.c,v 1.7 1997/11/20 23:31:50 deraadt Exp $"; +static char rcsid[] = "$Id: comsat.c,v 1.8 1998/07/10 08:06:02 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -215,7 +215,7 @@ notify(utp, offset) dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_name, tty); return; } - dsyslog(LOG_DEBUG, "notify %s on %s\n", utp->ut_name, tty); + dsyslog(LOG_DEBUG, "notify %s on %s", utp->ut_name, tty); if (fork()) return; (void)signal(SIGALRM, SIG_DFL); diff --git a/libexec/getty/main.c b/libexec/getty/main.c index f066a4718b4..c27e38c0d71 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/ -static char rcsid[] = "$Id: main.c,v 1.11 1997/11/20 07:39:27 deraadt Exp $"; +static char rcsid[] = "$Id: main.c,v 1.12 1998/07/10 08:06:04 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -154,7 +154,7 @@ timeoverrun(signo) int signo; { - syslog(LOG_ERR, "getty exiting due to excessive running time\n"); + syslog(LOG_ERR, "getty exiting due to excessive running time"); exit(1); } diff --git a/libexec/identd/parse.c b/libexec/identd/parse.c index 81e1a031dd0..f65905a3241 100644 --- a/libexec/identd/parse.c +++ b/libexec/identd/parse.c @@ -223,7 +223,7 @@ parse(fd, laddr, faddr) } if (syslog_flag) - syslog(LOG_DEBUG, "Successful lookup: %d , %d : %s\n", + syslog(LOG_DEBUG, "Successful lookup: %d , %d : %s", lport, fport, pw->pw_name); if (noident_flag && check_noident(pw->pw_dir)) { diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 45d61959144..6ffbafea41d 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rexecd.c 5.12 (Berkeley) 2/25/91";*/ -static char rcsid[] = "$Id: rexecd.c,v 1.10 1998/07/09 23:54:36 millert Exp $"; +static char rcsid[] = "$Id: rexecd.c,v 1.11 1998/07/10 08:06:08 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -178,7 +178,7 @@ doit(f, fromp) } if (port != 0) { if (port < IPPORT_RESERVED) { - syslog(LOG_ERR, "client stderr port in reserved range\n"); + syslog(LOG_ERR, "client stderr port in reserved range"); exit(1); } s = socket(AF_INET, SOCK_STREAM, 0); diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 5c9be8167fd..68e3decd6e6 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rstat_proc.c,v 1.9 1997/08/05 23:48:14 angelos Exp $ */ +/* $OpenBSD: rstat_proc.c,v 1.10 1998/07/10 08:06:10 deraadt Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -31,7 +31,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro";*/ /*static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";*/ -static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.9 1997/08/05 23:48:14 angelos Exp $"; +static char rcsid[] = "$OpenBSD: rstat_proc.c,v 1.10 1998/07/10 08:06:10 deraadt Exp $"; #endif /* @@ -269,7 +269,7 @@ updatestat() #ifdef DEBUG - syslog(LOG_DEBUG, "%d %d %d %d\n", stats_all.s1.cp_time[0], + syslog(LOG_DEBUG, "%d %d %d %d", stats_all.s1.cp_time[0], stats_all.s1.cp_time[1], stats_all.s1.cp_time[2], stats_all.s1.cp_time[3]); #endif diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 10be9a86d07..57c364ea8ca 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; */ -static char *rcsid = "$Id: rshd.c,v 1.25 1998/07/09 23:38:15 millert Exp $"; +static char *rcsid = "$Id: rshd.c,v 1.26 1998/07/10 08:06:12 deraadt Exp $"; #endif /* not lint */ /* @@ -248,7 +248,7 @@ doit(fromp) #endif fromp->sin_port = ntohs((u_short)fromp->sin_port); if (fromp->sin_family != AF_INET) { - syslog(LOG_ERR, "malformed \"from\" address (af %d)\n", + syslog(LOG_ERR, "malformed \"from\" address (af %d)", fromp->sin_family); exit(1); } @@ -317,7 +317,7 @@ doit(fromp) #endif if (port >= IPPORT_RESERVED || port < IPPORT_RESERVED/2) { - syslog(LOG_ERR, "2nd port not reserved\n"); + syslog(LOG_ERR, "2nd port not reserved"); exit(1); } fromp->sin_port = htons(port); diff --git a/libexec/smtpd/src/smtpd.c b/libexec/smtpd/src/smtpd.c index 6e9b68ddfb0..1a89e2a86d9 100644 --- a/libexec/smtpd/src/smtpd.c +++ b/libexec/smtpd/src/smtpd.c @@ -2,7 +2,7 @@ * smtpd, Obtuse SMTP daemon, storing agent. does simple collection of * mail messages, for later forwarding by smtpfwdd. * - * $Id: smtpd.c,v 1.6 1998/06/03 08:57:11 beck Exp $ + * $Id: smtpd.c,v 1.7 1998/07/10 08:06:15 deraadt Exp $ * * Copyright (c) 1996, 1997 Obtuse Systems Corporation. All rights * reserved. @@ -40,7 +40,7 @@ char *obtuse_copyright = "Copyright 1996 - Obtuse Systems Corporation - All rights reserved."; -char *obtuse_rcsid = "$Id: smtpd.c,v 1.6 1998/06/03 08:57:11 beck Exp $"; +char *obtuse_rcsid = "$Id: smtpd.c,v 1.7 1998/07/10 08:06:15 deraadt Exp $"; #include <stdarg.h> #include <stdlib.h> @@ -2669,14 +2669,13 @@ main(int argc, char **argv) * didn't get one from a getsockname. get our hostname and use * that. */ - char hname[66]; + char hname[MAXHOSTNAMELEN]; struct hostent *hp; - if (gethostname(hname, 65) != 0) { + if (gethostname(hname, sizeof hname) != 0) { syslog(LOG_ERR, "gethostname() call failed! (%m) Who am I?"); exit(EX_OSERR); } - hname[65] = '\0'; if ((hp = gethostbyname(hname)) != NULL) { peerinfo.my_clean_reverse_name = strdup(hp->h_name); } else { diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index e80e525bac5..136f2a2d797 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process.c,v 1.8 1996/07/19 03:09:41 millert Exp $ */ +/* $OpenBSD: process.c,v 1.9 1998/07/10 08:06:18 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)process.c 5.10 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: process.c,v 1.8 1996/07/19 03:09:41 millert Exp $"; +static char rcsid[] = "$Id: process.c,v 1.9 1998/07/10 08:06:18 deraadt Exp $"; #endif /* not lint */ /* @@ -103,7 +103,7 @@ process_request(mp, rp) char buf1[32], buf2[32]; strcpy(buf1, inet_ntoa(satosin(&rp->addr)->sin_addr)); strcpy(buf2, inet_ntoa(satosin(&mp->ctl_addr)->sin_addr)); - syslog(LOG_WARNING, "addresses are different, %s != %s\n", + syslog(LOG_WARNING, "addresses are different, %s != %s", buf1, buf2); } rp->addr.sa_family = 0; diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index f007a7c54c4..b528907f784 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.3 1996/07/15 05:10:11 mickey Exp $ */ +/* $OpenBSD: table.c,v 1.4 1998/07/10 08:06:19 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)table.c 5.7 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: table.c,v 1.3 1996/07/15 05:10:11 mickey Exp $"; +static char rcsid[] = "$Id: table.c,v 1.4 1998/07/10 08:06:19 deraadt Exp $"; #endif /* not lint */ /* @@ -115,7 +115,7 @@ find_match(request) return (&ptr->request); } if (debug) - syslog(LOG_DEBUG, "find_match: not found\n"); + syslog(LOG_DEBUG, "find_match: not found"); return ((CTL_MSG *)0); } diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c index 2ba68666121..5e8174cdb39 100644 --- a/libexec/telnetd/state.c +++ b/libexec/telnetd/state.c @@ -1,4 +1,4 @@ -/* $OpenBSD: state.c,v 1.7 1998/03/25 18:43:46 art Exp $ */ +/* $OpenBSD: state.c,v 1.8 1998/07/10 08:06:21 deraadt Exp $ */ /* $NetBSD: state.c,v 1.9 1996/02/28 20:38:19 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: state.c,v 1.9 1996/02/28 20:38:19 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: state.c,v 1.7 1998/03/25 18:43:46 art Exp $"; +static char rcsid[] = "$OpenBSD: state.c,v 1.8 1998/07/10 08:06:21 deraadt Exp $"; #endif #endif /* not lint */ @@ -363,7 +363,7 @@ gotiac: switch (c) { continue; default: - syslog(LOG_ERR, "telnetd: panic state=%d\n", state); + syslog(LOG_ERR, "telnetd: panic state=%d", state); printf("telnetd: panic state=%d\n", state); exit(1); } diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index cf3878f2f9a..fb10b3e97fe 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_term.c,v 1.13 1998/05/08 19:32:33 deraadt Exp $ */ +/* $OpenBSD: sys_term.c,v 1.14 1998/07/10 08:06:23 deraadt Exp $ */ /* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: sys_term.c,v 1.13 1998/05/08 19:32:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sys_term.c,v 1.14 1998/07/10 08:06:23 deraadt Exp $"; #endif #endif /* not lint */ @@ -1805,7 +1805,7 @@ start_login(host, autologin, name) sleep(1); execv(loginprog, argv); - syslog(LOG_ERR, "%s: %m\n", loginprog); + syslog(LOG_ERR, "%s: %m", loginprog); fatalperror(net, loginprog); /*NOTREACHED*/ } @@ -2188,12 +2188,12 @@ cleantmpdir(jid, tpath, user) { switch(fork()) { case -1: - syslog(LOG_ERR, "TMPDIR cleanup(%s): fork() failed: %m\n", + syslog(LOG_ERR, "TMPDIR cleanup(%s): fork() failed: %m", tpath); break; case 0: execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, 0); - syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m\n", + syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m", tpath, CLEANTMPCMD); exit(1); default: diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index d25dbcec390..69e16fb4ac9 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utility.c,v 1.14 1998/05/08 19:43:44 deraadt Exp $ */ +/* $OpenBSD: utility.c,v 1.15 1998/07/10 08:06:24 deraadt Exp $ */ /* $NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: utility.c,v 1.9 1996/02/28 20:38:29 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: utility.c,v 1.14 1998/05/08 19:43:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: utility.c,v 1.15 1998/07/10 08:06:24 deraadt Exp $"; #endif #endif /* not lint */ @@ -78,10 +78,10 @@ ttloop() } ncc = read(net, netibuf, sizeof netibuf); if (ncc < 0) { - syslog(LOG_INFO, "ttloop: read: %m\n"); + syslog(LOG_INFO, "ttloop: read: %m"); exit(1); } else if (ncc == 0) { - syslog(LOG_INFO, "ttloop: peer died: %m\n"); + syslog(LOG_INFO, "ttloop: peer died: %m"); exit(1); } DIAG(TD_REPORT, {sprintf(nfrontp, "td: ttloop read %d chars\r\n", ncc); diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index b588ef04d2b..f41dff67440 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.11 1997/11/04 08:45:56 deraadt Exp $ */ +/* $OpenBSD: tftpd.c,v 1.12 1998/07/10 08:06:26 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: tftpd.c,v 1.11 1997/11/04 08:45:56 deraadt Exp $: tftpd.c,v 1.6 1997/02/16 23:49:21 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tftpd.c,v 1.12 1998/07/10 08:06:26 deraadt Exp $: tftpd.c,v 1.6 1997/02/16 23:49:21 deraadt Exp $"; #endif /* not lint */ /* @@ -94,7 +94,7 @@ int cancreate = 0; static void usage() { - syslog(LOG_ERR, "Usage: %s [-cs] [directory ...]\n", __progname); + syslog(LOG_ERR, "Usage: %s [-cs] [directory ...]", __progname); exit(1); } @@ -134,7 +134,7 @@ main(argc, argv) else dirs = calloc(ndirs+2, sizeof(char *)); if (dirs == NULL) { - syslog(LOG_ERR, "malloc: %m\n"); + syslog(LOG_ERR, "malloc: %m"); exit(1); } dirs[n++] = argv[optind]; @@ -144,27 +144,27 @@ main(argc, argv) if (secure) { if (ndirs == 0) { - syslog(LOG_ERR, "no -s directory\n"); + syslog(LOG_ERR, "no -s directory"); exit(1); } if (ndirs > 1) { - syslog(LOG_ERR, "too many -s directories\n"); + syslog(LOG_ERR, "too many -s directories"); exit(1); } if (chdir(dirs[0])) { - syslog(LOG_ERR, "%s: %m\n", dirs[0]); + syslog(LOG_ERR, "%s: %m", dirs[0]); exit(1); } } pw = getpwnam("nobody"); if (!pw) { - syslog(LOG_ERR, "no nobody: %m\n"); + syslog(LOG_ERR, "no nobody: %m"); exit(1); } if (secure && chroot(".")) { - syslog(LOG_ERR, "chroot: %m\n"); + syslog(LOG_ERR, "chroot: %m"); exit(1); } @@ -174,14 +174,14 @@ main(argc, argv) (void) setuid(pw->pw_uid); if (ioctl(fd, FIONBIO, &on) < 0) { - syslog(LOG_ERR, "ioctl(FIONBIO): %m\n"); + syslog(LOG_ERR, "ioctl(FIONBIO): %m"); exit(1); } fromlen = sizeof (from); n = recvfrom(fd, buf, sizeof (buf), 0, (struct sockaddr *)&from, &fromlen); if (n < 0) { - syslog(LOG_ERR, "recvfrom: %m\n"); + syslog(LOG_ERR, "recvfrom: %m"); exit(1); } /* @@ -223,7 +223,7 @@ main(argc, argv) break; } if (pid < 0) { - syslog(LOG_ERR, "fork: %m\n"); + syslog(LOG_ERR, "fork: %m"); exit(1); } else if (pid != 0) exit(0); @@ -235,15 +235,15 @@ main(argc, argv) close(1); peer = socket(AF_INET, SOCK_DGRAM, 0); if (peer < 0) { - syslog(LOG_ERR, "socket: %m\n"); + syslog(LOG_ERR, "socket: %m"); exit(1); } if (bind(peer, (struct sockaddr *)&s_in, sizeof (s_in)) < 0) { - syslog(LOG_ERR, "bind: %m\n"); + syslog(LOG_ERR, "bind: %m"); exit(1); } if (connect(peer, (struct sockaddr *)&from, sizeof(from)) < 0) { - syslog(LOG_ERR, "connect: %m\n"); + syslog(LOG_ERR, "connect: %m"); exit(1); } tp = (struct tftphdr *)buf; @@ -439,7 +439,7 @@ sendfile(pf) send_data: if (send(peer, dp, size + 4, 0) != size + 4) { - syslog(LOG_ERR, "tftpd: write: %m\n"); + syslog(LOG_ERR, "tftpd: write: %m"); goto abort; } read_ahead(file, pf->f_convert); @@ -448,7 +448,7 @@ send_data: n = recv(peer, ackbuf, sizeof (ackbuf), 0); alarm(0); if (n < 0) { - syslog(LOG_ERR, "tftpd: read: %m\n"); + syslog(LOG_ERR, "tftpd: read: %m"); goto abort; } ap->th_opcode = ntohs((u_short)ap->th_opcode); @@ -503,7 +503,7 @@ recvfile(pf) (void) setjmp(timeoutbuf); send_ack: if (send(peer, ackbuf, 4, 0) != 4) { - syslog(LOG_ERR, "tftpd: write: %m\n"); + syslog(LOG_ERR, "tftpd: write: %m"); goto abort; } write_behind(file, pf->f_convert); @@ -512,7 +512,7 @@ send_ack: n = recv(peer, dp, PKTSIZE, 0); alarm(0); if (n < 0) { /* really? */ - syslog(LOG_ERR, "tftpd: read: %m\n"); + syslog(LOG_ERR, "tftpd: read: %m"); goto abort; } dp->th_opcode = ntohs((u_short)dp->th_opcode); @@ -600,5 +600,5 @@ nak(error) tp->th_msg[length] = '\0'; length += 5; if (send(peer, buf, length, 0) != length) - syslog(LOG_ERR, "nak: %m\n"); + syslog(LOG_ERR, "nak: %m"); } |