Fix writepid for retvalue 0.

This commit is contained in:
W.C.A. Wijngaards 2020-11-23 14:17:58 +01:00
parent 19f8f4d9f9
commit 62152e0493
2 changed files with 6 additions and 0 deletions

View file

@ -365,6 +365,11 @@ writepid (const char* pidfile, pid_t pid)
pidfile, strerror(errno));
close(fd);
return 0;
} else if(r == 0) {
log_err("cannot write any bytes to pidfile %s: "
"write returns 0 bytes written", pidfile);
close(fd);
return 0;
}
count += r;
}

View file

@ -8,6 +8,7 @@
- Option to toggle udp-connect, default is enabled.
- Fix for #303 CVE-2020-28935 : Fix that symlink does not interfere
with chown of pidfile.
- Further fix for it and retvalue 0 fix for it.
12 November 2020: Wouter
- Fix to connect() to UDP destinations, default turned on,