From ccc0f03f6bd88b33a054acf0d5b64839fd809f2f Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 28 Oct 1996 08:25:13 +0000 Subject: [PATCH] Back out the entire change from rev 1.11 of syslogd.c. It was bogus. Correct the man page to reflect the new reality. --- usr.sbin/syslogd/syslogd.8 | 16 ++++++-------- usr.sbin/syslogd/syslogd.c | 45 +------------------------------------- 2 files changed, 8 insertions(+), 53 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.8 b/usr.sbin/syslogd/syslogd.8 index c2ea27826487..31b6dedf6636 100644 --- a/usr.sbin/syslogd/syslogd.8 +++ b/usr.sbin/syslogd/syslogd.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)syslogd.8 8.1 (Berkeley) 6/6/93 -.\" $Id: syslogd.8,v 1.4 1996/07/22 16:35:48 pst Exp $ +.\" $Id: syslogd.8,v 1.5 1996/10/23 20:17:55 julian Exp $ .\" .Dd October 12, 1995 .Dt SYSLOGD 8 @@ -117,9 +117,6 @@ The process id of current Name of the .Tn UNIX domain datagram log socket. -.Nm syslogd -might also create a symlink from the location of the old default -socket, (/dev/log) so as to assist backwards compatibility. .It Pa /dev/klog The kernel log device. .El @@ -139,8 +136,9 @@ an unauthenticated remote disk-filling service, and should probably be disabled by default. Some sort of .No inter- Ns Nm syslogd authentication mechanism ought to be worked out. -The log socket was moved from /dev to ease the use -of a read-only root filesystem. This may confuse some old binaries -and if possible, syslogd will create a symlink to help these programs, -however if the root filesystem is already read only, and the link is not -pre-existing, these binaries will not be able to log messages. +.Pp +The log socket was moved from +.Pa /dev +to ease the use of a read-only root filesystem. This may confuse +some old binaries so that a symbolic link might be used for a +transitional period. diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5dbfa060447c..13b30e050b22 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -104,14 +104,11 @@ static const char rcsid[] = #define SYSLOG_NAMES #include + const char *LogName = _PATH_LOG; const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; -#if defined _OLD_PATH_LOG -int alt_fifo; -const char *OldLogName = _OLD_PATH_LOG; -#endif #define FDMASK(fd) (1 << (fd)) @@ -243,9 +240,6 @@ main(argc, argv) break; case 'p': /* path */ LogName = optarg; -#if defined _OLD_PATH_LOG - alt_fifo = 1; -#endif break; case 'I': /* backwards compatible w/FreeBSD */ case 's': /* no network mode */ @@ -298,43 +292,6 @@ main(argc, argv) } else created_lsock = 1; -#if defined(_OLD_PATH_LOG) -#define LNKSZ 128 - /* - * don't make a link for the old fifo name if we are just testing - * (presumably the real syslogd might be using it) - */ - if (! alt_fifo ) { - struct stat statb; - char linkbuf[LNKSZ+1]; - - linkbuf[LNKSZ + 1] = '\0'; - if(stat(OldLogName,&statb) == 0) { - switch(statb.st_mode & S_IFMT) { - case S_IFLNK: - /* - * if it's already corrct leave it - * (great for ro filesystems) - */ - if((readlink(OldLogName, linkbuf, LNKSZ) > 0) - && (! strcmp(OldLogName,linkbuf))) - goto linkok; - case S_IFIFO: - /* if the unlink fails the symlink will too */ - unlink(OldLogName); - } - } - if(symlink(LogName,OldLogName)) { - (void) sprintf(line, - "cannot create symlink %s, continuing.", - OldLogName); - logerror(line); - dprintf("warning: cannot create symlink %s (%d)\n", - OldLogName, errno); - } - } -linkok: -#endif if (!SecureMode) finet = socket(AF_INET, SOCK_DGRAM, 0); else