satellite icon indicating copy to clipboard operation
satellite copied to clipboard

Please use atomic filesystem operations to update the whitelist

Open rustyconover opened this issue 8 years ago • 1 comments

It seems that the whitelist is written in such a way that the whitelist file is truncated then new whitelist is written to the same file. I determined this behavior by watching the whitelist and noticing that inode number never changes.

It would be better to create a new file, write the new whitelist contents there, then rename that new file to whitelist. This would be an atomic operation and there wouldn't be a time when the whitelist contained zero hosts which does happen now.

Thank you,

Rusty

rustyconover avatar Mar 16 '16 16:03 rustyconover

Thanks for the report @rustyconover.

mforsyth avatar Mar 17 '16 14:03 mforsyth