aboutsummaryrefslogtreecommitdiff
path: root/sysklogd
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
commit86ab8a32bd63b2f2a73bdcead8e2bb037589e175 (patch)
tree10aa90962757d07724c78e4fc9baaa27ca7b4858 /sysklogd
parent4062268bc7ac748e2ea2e569aa862b2b3f8a2db2 (diff)
downloadbusybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.gz
busybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.bz2
busybox-w32-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.zip
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
Diffstat (limited to 'sysklogd')
-rw-r--r--sysklogd/syslogd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index faa6f15e9..9a4af4926 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -194,7 +194,7 @@ static void doSyslogd (void)
194 /* Create the syslog file so realpath() can work. */ 194 /* Create the syslog file so realpath() can work. */
195 close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644)); 195 close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
196 if (realpath (_PATH_LOG, lfile) == NULL) 196 if (realpath (_PATH_LOG, lfile) == NULL)
197 fatalError ("Could not resolv path to " _PATH_LOG ": %s", strerror (errno)); 197 fatalError ("Could not resolv path to " _PATH_LOG ": %s\n", strerror (errno));
198 198
199 unlink (lfile); 199 unlink (lfile);
200 200
@@ -202,14 +202,14 @@ static void doSyslogd (void)
202 sunx.sun_family = AF_UNIX; 202 sunx.sun_family = AF_UNIX;
203 strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path)); 203 strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path));
204 if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) 204 if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
205 fatalError ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s", strerror (errno)); 205 fatalError ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s\n", strerror (errno));
206 206
207 addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path); 207 addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path);
208 if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5))) 208 if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5)))
209 fatalError ("Could not connect to socket " _PATH_LOG ": %s", strerror (errno)); 209 fatalError ("Could not connect to socket " _PATH_LOG ": %s\n", strerror (errno));
210 210
211 if (chmod (lfile, 0666) < 0) 211 if (chmod (lfile, 0666) < 0)
212 fatalError ("Could not set permission on " _PATH_LOG ": %s", strerror (errno)); 212 fatalError ("Could not set permission on " _PATH_LOG ": %s\n", strerror (errno));
213 213
214 FD_ZERO (&fds); 214 FD_ZERO (&fds);
215 FD_SET (sock_fd, &fds); 215 FD_SET (sock_fd, &fds);