Robin Hack
2013-Jan-10 12:02 UTC
[nsd-users] PATCH: Double pid file truncation in NSD 4.0.0b2
Hi. I wrote little patch (as attachment) for NSD 4.0.0b2 which changed server.c and nsd.c. I found that unlinkpid(const char* file) in nsd.c do same like code in server_main (server.c). But code in server_main don't check if filename is not blank. Best regards Robin Hack -------------- next part -------------- A non-text attachment was scrubbed... Name: nsd-4.0.0b2-double-truncation.patch Type: application/octet-stream Size: 1097 bytes Desc: not available URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20130110/c908bd1f/attachment.obj>
W.C.A. Wijngaards
2013-Jan-10 12:11 UTC
[nsd-users] PATCH: Double pid file truncation in NSD 4.0.0b2
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Robin, On 01/10/2013 01:02 PM, Robin Hack wrote:> Hi. > > I wrote little patch (as attachment) for NSD 4.0.0b2 which changed > server.c and nsd.c. I found that unlinkpid(const char* file) in > nsd.c do same like code in server_main (server.c). But code in > server_main don't check if filename is not blank.Thank you I have applied it. This code is different from NSD3, because NSD4 has a 'stable pid', so that once started the contents of the pidfile do no change and NSD4 could run attached to a console for example. Best regards, Wouter -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBAgAGBQJQ7q/hAAoJEJ9vHC1+BF+NzTgQAJNvceNgKgTC3iP4m/7jxT8f na31UNFHMQUTbeumFufl13ylb8c/4uIHzMSaavlFl2Q/7raAIA5MbgbOPZuk/4Gy 3D4c4Fv9KMvd0fUYHkNzKcFC4ujoJNdU0tRcoKSDLqXUK7cmqrnhsndes5zH4aOx PV+DtEQ2CyHDnAPpqGCuYJG31qbZYesKSFi0xe+M+FUpS7s5/Ed67Faf6zUow/iT 16ro7rU1EFPhELcMUE7wfUfqTSR4zf69bISK2qohAmNw5lg1y/w9QY2DkyxfynXP /daOkd3rEO8EGFNYQQsWbunB127OaQjUSo5zMyIkxB22zM496yvqvQdF3QfAVJBb HxgT80k9Td66NKOfTh5sIPhTZC7bjeFK7gns+8Tq1mLTGeq5GKONr8wokWyxk2nm tH/22OzVf80pgZCHhe7qS6Q0G0bdmlakxAKzp4US+ooxfIIn9drWVmQ/1XPgPueq QDUYX8VrAyqvzGBmIb7lWgYa6MRd5hRu5ZFwoOVH/PCYxREE3ujfuCwWMf/pRzCG pgCbowDiOv7rkpQLfRLDVX/oUP2ivfe44Y8bR1L2/YKOt6T7kJx7OsClENUdaQMm 63FcFUxFr4L7Lng4QAFI05d52OArtHujagkf2bHasQOpMDps5GgVNBMv/lnTMyDf 0ikZQqEt9/K0f5Y82P1V =iYhh -----END PGP SIGNATURE-----