On Wed, Mar 20, 2019 at 4:33 PM Michael Paquier <michael@paquier.xyz> wrote:
And actually it seems to me that you have a race condition in that stuff. I think that you had better use umask(), then fopen, and then once again umask() to put back the previous permissions, removing the extra chmod() call.
Changed the patch to use umask() instead of chmod() according to
your suggestion.
updated patch attached.
Earlier attached patch is wrong.
Correct patch attached. Sorry for the inconvenience.