SCCS-vsn: libexec/comsat/comsat.c 5.4
SCCS-vsn: libexec/rshd/rshd.c 5.3
SCCS-vsn: libexec/tftpd/tftpd.c 5.2
SCCS-vsn: usr.bin/login/login.c 5.5
SCCS-vsn: usr.bin/login/login.c.1 5.5
SCCS-vsn: sys/vax/uba/up.c 6.9
SCCS-vsn: usr.sbin/rwhod/rwhod.c 5.5
SCCS-vsn: old/init/init.c 5.5
SCCS-vsn: sbin/init/init.c 5.5
SCCS-vsn: libexec/rlogind/rlogind.c 5.6
SCCS-vsn: libexec/telnetd/telnetd.c 5.3
SCCS-vsn: usr.sbin/inetd/inetd.c 5.2
SCCS-vsn: usr.sbin/sendmail/src/err.c 5.3
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.5
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 5.7
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 5.4
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.8
SCCS-vsn: usr.sbin/lpr/lpd/printjob.c 5.2
SCCS-vsn: usr.sbin/lpr/lpd/lpd.c 5.2
19 files changed:
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)comsat.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)comsat.c 5.4 (Berkeley) %G%";
#endif not lint
#include <sys/types.h>
#endif not lint
#include <sys/types.h>
}
chdir("/usr/spool/mail");
if ((uf = open("/etc/utmp",0)) < 0) {
}
chdir("/usr/spool/mail");
if ((uf = open("/etc/utmp",0)) < 0) {
- openlog("comsat", 0, 0);
+ openlog("comsat", 0, LOG_DAEMON);
syslog(LOG_ERR, "/etc/utmp: %m");
(void) recv(0, msgbuf, sizeof (msgbuf) - 1, 0);
exit(1);
syslog(LOG_ERR, "/etc/utmp: %m");
(void) recv(0, msgbuf, sizeof (msgbuf) - 1, 0);
exit(1);
int on = 1, options = 0, fromlen;
struct sockaddr_in from;
int on = 1, options = 0, fromlen;
struct sockaddr_in from;
+ openlog("rlogind", LOG_PID | LOG_AUTH, LOG_AUTH);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
- openlog(argv[0], LOG_PID, 0);
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
doit(0, &from);
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
doit(0, &from);
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)rshd.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)rshd.c 5.3 (Berkeley) %G%";
int on = 1, fromlen;
struct sockaddr_in from;
int on = 1, fromlen;
struct sockaddr_in from;
+ openlog("rsh", LOG_PID | LOG_ODELAY, LOG_DAEMON);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
- openlog(argv[0], LOG_PID, 0);
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
linger.l_onoff = 1;
linger.l_linger = 60; /* XXX */
if (setsockopt(0, SOL_SOCKET, SO_LINGER, &linger, sizeof (linger)) < 0) {
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
linger.l_onoff = 1;
linger.l_linger = 60; /* XXX */
if (setsockopt(0, SOL_SOCKET, SO_LINGER, &linger, sizeof (linger)) < 0) {
- openlog(argv[0], LOG_PID, 0);
syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m");
}
doit(dup(0), &from);
syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m");
}
doit(dup(0), &from);
fromp->sin_port = ntohs((u_short)fromp->sin_port);
if (fromp->sin_family != AF_INET ||
fromp->sin_port >= IPPORT_RESERVED) {
fromp->sin_port = ntohs((u_short)fromp->sin_port);
if (fromp->sin_family != AF_INET ||
fromp->sin_port >= IPPORT_RESERVED) {
- openlog("rshd", LOG_PID, 0);
syslog(LOG_ERR, "malformed from address\n");
exit(1);
}
syslog(LOG_ERR, "malformed from address\n");
exit(1);
}
for (;;) {
char c;
if (read(f, &c, 1) != 1) {
for (;;) {
char c;
if (read(f, &c, 1) != 1) {
- openlog("rshd", LOG_PID, 0);
syslog(LOG_ERR, "read: %m");
shutdown(f, 1+1);
exit(1);
syslog(LOG_ERR, "read: %m");
shutdown(f, 1+1);
exit(1);
int lport = IPPORT_RESERVED - 1, retryshift;
s = rresvport(&lport);
if (s < 0) {
int lport = IPPORT_RESERVED - 1, retryshift;
s = rresvport(&lport);
if (s < 0) {
- openlog("rshd", LOG_PID, 0);
syslog(LOG_ERR, "can't get stderr port: %m");
exit(1);
}
if (port >= IPPORT_RESERVED) {
syslog(LOG_ERR, "can't get stderr port: %m");
exit(1);
}
if (port >= IPPORT_RESERVED) {
- openlog("rshd", LOG_PID, 0);
syslog(LOG_ERR, "2nd port not reserved\n");
exit(1);
}
fromp->sin_port = htons((u_short)port);
if (connect(s, fromp, sizeof (*fromp), 0) < 0) {
syslog(LOG_ERR, "2nd port not reserved\n");
exit(1);
}
fromp->sin_port = htons((u_short)port);
if (connect(s, fromp, sizeof (*fromp), 0) < 0) {
- openlog("rshd", LOG_PID, 0);
syslog(LOG_ERR, "connect: %m");
exit(1);
}
syslog(LOG_ERR, "connect: %m");
exit(1);
}
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)telnetd.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)telnetd.c 5.3 (Berkeley) %G%";
struct sockaddr_in from;
int on = 1, fromlen;
struct sockaddr_in from;
int on = 1, fromlen;
+ openlog("telnetd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
fromlen = sizeof (from);
if (getpeername(0, &from, &fromlen) < 0) {
fprintf(stderr, "%s: ", argv[0]);
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
_exit(1);
}
if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) {
- openlog(argv[0], LOG_PID, 0);
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
doit(0, &from);
syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
}
doit(0, &from);
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)tftpd.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)tftpd.c 5.2 (Berkeley) %G%";
register struct tftphdr *tp;
register int n;
register struct tftphdr *tp;
register int n;
+ openlog("tftpd", LOG_PID, LOG_DAEMON);
alarm(10);
fromlen = sizeof (from);
n = recvfrom(0, buf, sizeof (buf), 0,
alarm(10);
fromlen = sizeof (from);
n = recvfrom(0, buf, sizeof (buf), 0,
close(1);
peer = socket(AF_INET, SOCK_DGRAM, 0);
if (peer < 0) {
close(1);
peer = socket(AF_INET, SOCK_DGRAM, 0);
if (peer < 0) {
- openlog("tftpd", LOG_PID, 0);
syslog(LOG_ERR, "socket: %m");
exit(1);
}
if (bind(peer, (caddr_t)&sin, sizeof (sin)) < 0) {
syslog(LOG_ERR, "socket: %m");
exit(1);
}
if (bind(peer, (caddr_t)&sin, sizeof (sin)) < 0) {
- openlog("tftpd", LOG_PID, 0);
syslog(LOG_ERR, "bind: %m");
exit(1);
}
if (connect(peer, (caddr_t)&from, sizeof(from)) < 0) {
syslog(LOG_ERR, "bind: %m");
exit(1);
}
if (connect(peer, (caddr_t)&from, sizeof(from)) < 0) {
- openlog("tftpd", LOG_PID, 0);
syslog(LOG_ERR, "connect: %m");
exit(1);
}
syslog(LOG_ERR, "connect: %m");
exit(1);
}
-static char sccsid[] = "@(#)init.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)init.c 5.5 (Berkeley) %G%";
#endif not lint
#include <signal.h>
#endif not lint
#include <signal.h>
howto = RB_SINGLE;
}
#endif
howto = RB_SINGLE;
}
#endif
- openlog("init", LOG_CONS|LOG_ODELAY, 0);
+ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH);
sigvec(SIGTERM, &rvec, (struct sigvec *)0);
signal(SIGTSTP, idle);
signal(SIGSTOP, SIG_IGN);
sigvec(SIGTERM, &rvec, (struct sigvec *)0);
signal(SIGTSTP, idle);
signal(SIGSTOP, SIG_IGN);
-static char sccsid[] = "@(#)init.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)init.c 5.5 (Berkeley) %G%";
#endif not lint
#include <signal.h>
#endif not lint
#include <signal.h>
howto = RB_SINGLE;
}
#endif
howto = RB_SINGLE;
}
#endif
- openlog("init", LOG_CONS|LOG_ODELAY, 0);
+ openlog("init", LOG_CONS|LOG_ODELAY, LOG_AUTH);
sigvec(SIGTERM, &rvec, (struct sigvec *)0);
signal(SIGTSTP, idle);
signal(SIGSTOP, SIG_IGN);
sigvec(SIGTERM, &rvec, (struct sigvec *)0);
signal(SIGTSTP, idle);
signal(SIGSTOP, SIG_IGN);
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)up.c 6.8 (Berkeley) %G%
+ * @(#)up.c 6.9 (Berkeley) %G%
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)login.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c 5.5 (Berkeley) %G%";
- openlog("login", LOG_ODELAY, 0);
+ openlog("login", LOG_ODELAY, LOG_AUTH);
* see if root logins on this terminal are permitted.
*/
if (!invalid && pwd->pw_uid == 0 && !rootterm(tty)) {
* see if root logins on this terminal are permitted.
*/
if (!invalid && pwd->pw_uid == 0 && !rootterm(tty)) {
- syslog(LOG_SECURITY, "ROOT LOGIN REFUSED %s", tty);
+ syslog(LOG_CRIT, "ROOT LOGIN REFUSED %s", tty);
invalid = TRUE;
}
if (invalid) {
printf("Login incorrect\n");
if (++t >= 5) {
invalid = TRUE;
}
if (invalid) {
printf("Login incorrect\n");
if (++t >= 5) {
"REPEATED LOGIN FAILURES %s, %s",
tty, utmp.ut_name);
ioctl(0, TIOCHPCL, (struct sgttyb *) 0);
"REPEATED LOGIN FAILURES %s, %s",
tty, utmp.ut_name);
ioctl(0, TIOCHPCL, (struct sgttyb *) 0);
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
if (pwd->pw_uid == 0)
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
if (pwd->pw_uid == 0)
- syslog(LOG_SECURITY, "ROOT LOGIN %s", tty);
+ syslog(LOG_NOTICE, "ROOT LOGIN %s", tty);
if (!quietlog) {
struct stat st;
if (!quietlog) {
struct stat st;
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)login.c.1 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c.1 5.5 (Berkeley) %G%";
- openlog("login", LOG_ODELAY, 0);
+ openlog("login", LOG_ODELAY, LOG_AUTH);
* see if root logins on this terminal are permitted.
*/
if (!invalid && pwd->pw_uid == 0 && !rootterm(tty)) {
* see if root logins on this terminal are permitted.
*/
if (!invalid && pwd->pw_uid == 0 && !rootterm(tty)) {
- syslog(LOG_SECURITY, "ROOT LOGIN REFUSED %s", tty);
+ syslog(LOG_CRIT, "ROOT LOGIN REFUSED %s", tty);
invalid = TRUE;
}
if (invalid) {
printf("Login incorrect\n");
if (++t >= 5) {
invalid = TRUE;
}
if (invalid) {
printf("Login incorrect\n");
if (++t >= 5) {
"REPEATED LOGIN FAILURES %s, %s",
tty, utmp.ut_name);
ioctl(0, TIOCHPCL, (struct sgttyb *) 0);
"REPEATED LOGIN FAILURES %s, %s",
tty, utmp.ut_name);
ioctl(0, TIOCHPCL, (struct sgttyb *) 0);
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
if (pwd->pw_uid == 0)
if (tty[sizeof("tty")-1] == 'd')
syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
if (pwd->pw_uid == 0)
- syslog(LOG_SECURITY, "ROOT LOGIN %s", tty);
+ syslog(LOG_NOTICE, "ROOT LOGIN %s", tty);
if (!quietlog) {
struct stat st;
if (!quietlog) {
struct stat st;
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)inetd.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)inetd.c 5.2 (Berkeley) %G%";
- openlog("inetd", LOG_PID, 0);
+ openlog("inetd", LOG_PID, LOG_DAEMON);
config();
signal(SIGHUP, config);
signal(SIGCHLD, reapchild);
config();
signal(SIGHUP, config);
signal(SIGCHLD, reapchild);
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)lpd.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)lpd.c 5.2 (Berkeley) %G%";
- openlog("lpd", LOG_PID, 0);
+ openlog("lpd", LOG_PID, LOG_DAEMON);
(void) umask(0);
lfd = open(MASTERLOCK, O_WRONLY|O_CREAT, 0644);
if (lfd < 0) {
(void) umask(0);
lfd = open(MASTERLOCK, O_WRONLY|O_CREAT, 0644);
if (lfd < 0) {
-static char sccsid[] = "@(#)printjob.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)printjob.c 5.2 (Berkeley) %G%";
if (i == 0)
status("no space on remote; waiting for queue to drain");
if (i == 10)
if (i == 0)
status("no space on remote; waiting for queue to drain");
if (i == 10)
- syslog(LOG_SALERT, "%s: can't send to %s; queue full",
+ syslog(LOG_ALERT, "%s: can't send to %s; queue full",
printer, RM);
sleep(5 * 60);
}
printer, RM);
sleep(5 * 60);
}
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)rwhod.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)rwhod.c 5.5 (Berkeley) %G%";
#endif not lint
#include <sys/types.h>
#endif not lint
#include <sys/types.h>
#endif
(void) chdir("/dev");
(void) signal(SIGHUP, getkmem);
#endif
(void) chdir("/dev");
(void) signal(SIGHUP, getkmem);
- openlog("rwhod", LOG_PID, 0);
+ openlog("rwhod", LOG_PID, LOG_DAEMON);
/*
* Establish host name as returned by system.
*/
/*
* Establish host name as returned by system.
*/
# ifndef DAEMON
# ifndef lint
# ifndef DAEMON
# ifndef lint
-static char SccsId[] = "@(#)daemon.c 5.6 (Berkeley) %G% (w/o daemon mode)";
+static char SccsId[] = "@(#)daemon.c 5.7 (Berkeley) %G% (w/o daemon mode)";
# include <sys/resource.h>
# ifndef lint
# include <sys/resource.h>
# ifndef lint
-static char SccsId[] = "@(#)daemon.c 5.6 (Berkeley) %G% (with daemon mode)";
+static char SccsId[] = "@(#)daemon.c 5.7 (Berkeley) %G% (with daemon mode)";
severe:
# ifdef LOG
if (LogLevel > 0)
severe:
# ifdef LOG
if (LogLevel > 0)
- syslog(LOG_SALERT, "cannot get connection");
+ syslog(LOG_ALERT, "cannot get connection");
-static char SccsId[] = "@(#)err.c 5.2 (Berkeley) %G%";
+static char SccsId[] = "@(#)err.c 5.3 (Berkeley) %G%";
#endif not lint
# include "sendmail.h"
#endif not lint
# include "sendmail.h"
(void) queuename(CurEnv, '\0');
# ifdef LOG
if (LogLevel > 0)
(void) queuename(CurEnv, '\0');
# ifdef LOG
if (LogLevel > 0)
- syslog(LOG_MAIL, "%s: SYSERR: %s", CurEnv->e_id, &MsgBuf[4]);
+ syslog(LOG_CRIT, "%s: SYSERR: %s", CurEnv->e_id, &MsgBuf[4]);
# endif LOG
errno = 0;
if (QuickAbort)
# endif LOG
errno = 0;
if (QuickAbort)
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char SccsId[] = "@(#)main.c 5.4 (Berkeley) %G%";
+static char SccsId[] = "@(#)main.c 5.5 (Berkeley) %G%";
#endif not lint
# define _DEFINE
#endif not lint
# define _DEFINE
- openlog("sendmail", LOG_PID, 0);
+ openlog("sendmail", LOG_PID, LOG_MAIL);
# endif LOG
errno = 0;
from = NULL;
# endif LOG
errno = 0;
from = NULL;
# ifndef SMTP
# ifndef lint
# ifndef SMTP
# ifndef lint
-static char SccsId[] = "@(#)usersmtp.c 5.3 (Berkeley) %G% (no SMTP)";
+static char SccsId[] = "@(#)usersmtp.c 5.4 (Berkeley) %G% (no SMTP)";
# endif not lint
# else SMTP
# ifndef lint
# endif not lint
# else SMTP
# ifndef lint
-static char SccsId[] = "@(#)usersmtp.c 5.3 (Berkeley) %G%";
+static char SccsId[] = "@(#)usersmtp.c 5.4 (Berkeley) %G%";
pause();
# endif DEBUG
# ifdef LOG
pause();
# endif DEBUG
# ifdef LOG
- syslog(LOG_MAIL, "%s", &MsgBuf[4]);
+ syslog(LOG_ERR, "%s", &MsgBuf[4]);
# endif LOG
SmtpState = SMTP_CLOSED;
smtpquit(m);
# endif LOG
SmtpState = SMTP_CLOSED;
smtpquit(m);
-static char SccsId[] = "@(#)version.c 5.7 (Berkeley) %G%";
+static char SccsId[] = "@(#)version.c 5.8 (Berkeley) %G%";