aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-01-09 06:49:08 +0000
committerErik Andersen <andersen@codepoet.org>2000-01-09 06:49:08 +0000
commit9a9a261569df0c88038de48eb233890ca189e9c0 (patch)
tree4507d48158b954b221857c5b630a45c9a29a1480
parentac6e71f0c4150e9394b0a424e9d64750bcfacb85 (diff)
downloadbusybox-w32-9a9a261569df0c88038de48eb233890ca189e9c0.tar.gz
busybox-w32-9a9a261569df0c88038de48eb233890ca189e9c0.tar.bz2
busybox-w32-9a9a261569df0c88038de48eb233890ca189e9c0.zip
Fix a logger bug.
-Erik
-rw-r--r--Changelog3
-rw-r--r--logger.c2
-rw-r--r--sysklogd/logger.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/Changelog b/Changelog
index 52b34b663..823598033 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,9 @@
2 * Fixed a bug in both cp and mv preventing 'cp foo/README bar' 2 * Fixed a bug in both cp and mv preventing 'cp foo/README bar'
3 type commands (file in a directory to another directory) 3 type commands (file in a directory to another directory)
4 from working. 4 from working.
5 * Fixed a logger bug that caused garbage to be written to the syslog
6 (unless you used busybox syslog, which hid the bug). Thanks
7 to Alex Holden <alex@linuxhacker.org> for the fix.
5 8
6 -Erik Andersen, 9 -Erik Andersen,
7 10
diff --git a/logger.c b/logger.c
index 35bbb6692..7aada5dbc 100644
--- a/logger.c
+++ b/logger.c
@@ -186,7 +186,7 @@ extern int logger_main(int argc, char **argv)
186 if (toStdErrFlag==TRUE) 186 if (toStdErrFlag==TRUE)
187 fprintf(stderr, "%s\n", buf); 187 fprintf(stderr, "%s\n", buf);
188 188
189 write( fd, buf, sizeof(buf)); 189 write( fd, buf, strlen(buf)+1);
190 190
191 close(fd); 191 close(fd);
192 exit( TRUE); 192 exit( TRUE);
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index 35bbb6692..7aada5dbc 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -186,7 +186,7 @@ extern int logger_main(int argc, char **argv)
186 if (toStdErrFlag==TRUE) 186 if (toStdErrFlag==TRUE)
187 fprintf(stderr, "%s\n", buf); 187 fprintf(stderr, "%s\n", buf);
188 188
189 write( fd, buf, sizeof(buf)); 189 write( fd, buf, strlen(buf)+1);
190 190
191 close(fd); 191 close(fd);
192 exit( TRUE); 192 exit( TRUE);