Back out the entire change from rev 1.11 of syslogd.c. It was bogus.

Correct the man page to reflect the new reality.
This commit is contained in:
Joerg Wunsch 1996-10-28 08:25:13 +00:00
parent 19bb578358
commit 1c0899bbb0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19224
2 changed files with 8 additions and 53 deletions

View File

@ -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.

View File

@ -104,14 +104,11 @@ static const char rcsid[] =
#define SYSLOG_NAMES
#include <sys/syslog.h>
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