A number of additional fixed from Pavel Roskin, note some more bugs in the
TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox, which is now included. -Erik
This commit is contained in:
@ -194,7 +194,7 @@ static void doSyslogd (void)
|
||||
/* Create the syslog file so realpath() can work. */
|
||||
close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
|
||||
if (realpath (_PATH_LOG, lfile) == NULL)
|
||||
fatalError ("Could not resolv path to " _PATH_LOG ": %s", strerror (errno));
|
||||
fatalError ("Could not resolv path to " _PATH_LOG ": %s\n", strerror (errno));
|
||||
|
||||
unlink (lfile);
|
||||
|
||||
@ -202,14 +202,14 @@ static void doSyslogd (void)
|
||||
sunx.sun_family = AF_UNIX;
|
||||
strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path));
|
||||
if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
|
||||
fatalError ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s", strerror (errno));
|
||||
fatalError ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s\n", strerror (errno));
|
||||
|
||||
addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path);
|
||||
if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5)))
|
||||
fatalError ("Could not connect to socket " _PATH_LOG ": %s", strerror (errno));
|
||||
fatalError ("Could not connect to socket " _PATH_LOG ": %s\n", strerror (errno));
|
||||
|
||||
if (chmod (lfile, 0666) < 0)
|
||||
fatalError ("Could not set permission on " _PATH_LOG ": %s", strerror (errno));
|
||||
fatalError ("Could not set permission on " _PATH_LOG ": %s\n", strerror (errno));
|
||||
|
||||
FD_ZERO (&fds);
|
||||
FD_SET (sock_fd, &fds);
|
||||
|
Reference in New Issue
Block a user