- Fix that when the server truncates the pidfile, it does not follow

symbolic links.
This commit is contained in:
W.C.A. Wijngaards 2024-03-27 14:07:54 +01:00
parent 238a796e38
commit 192f1b0e2b
2 changed files with 7 additions and 1 deletions

View file

@ -746,7 +746,11 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, int need_pi
if(daemon->pidfile) {
int fd;
/* truncate pidfile */
fd = open(daemon->pidfile, O_WRONLY | O_TRUNC, 0644);
fd = open(daemon->pidfile, O_WRONLY | O_TRUNC
#ifdef O_NOFOLLOW
| O_NOFOLLOW
#endif
, 0644);
if(fd != -1)
close(fd);
/* delete pidfile */

View file

@ -5,6 +5,8 @@
- Fix for #1032, add safeguard to make table space positive.
- Fix comment in lruhash space function.
- Fix to add unit test for lruhash space that exercises the routines.
- Fix that when the server truncates the pidfile, it does not follow
symbolic links.
25 March 2024: Yorgos
- Merge #831 from Pierre4012: Improve Windows NSIS installer