summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--syslogd.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 1e75f38e..73bb5cf3 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ Version 1.0.3 (RGer), 2005-10-10
file support was not enabled (ok, this is hopefully an unlikely scenario)
- fixed a bug that caused additional Unix domain sockets to be incorrectly
processed - could lead to message loss in extreme cases
+- applied some patches available from the sysklogd project to code
+ shared from there
---------------------------------------------------------------------------
Version 1.0.2 (RGer), 2005-10-05
- fixed an issue with MySQL error reporting. When an error occured,
diff --git a/syslogd.c b/syslogd.c
index 02fb021e..d7d2e0db 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2281,11 +2281,11 @@ int main(argc, argv)
dprintf("Checking pidfile.\n");
if (!check_pid(PidFile))
{
+ signal (SIGTERM, doexit);
if (fork()) {
/*
* Parent process
*/
- signal (SIGTERM, doexit);
sleep(300);
/*
* Not reached unless something major went wrong. 5
@@ -2820,7 +2820,7 @@ crunch_list(list)
for (count=i=0; p[i]; i++)
if (p[i] == LIST_DELIMITER) count++;
- if ((result = (char **)malloc(sizeof(char *) * count+2)) == NULL) {
+ if ((result = (char **)malloc(sizeof(char *) * (count+2))) == NULL) {
printf ("Sorry, can't get enough memory, exiting.\n");
exit(0);
}
@@ -4002,7 +4002,7 @@ void endutent(void)
void wallmsg(f)
register struct filed *f;
{
- char p[6 + UNAMESZ];
+ char p[sizeof(_PATH_DEV) + UNAMESZ];
register int i;
int ttyf;
static int reenter = 0;