Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
libsemanage: fsync final files before rename
Prior to rename(2)'ing the final selinux policy files into place, fsync(2) them to ensure the contents will be fully written prior to rename. While we are here, also fix checking of write(2) to detect short writes and treat them as an error. This code could be more generally improved but keeping to the minimal changes required to fix this bug. Fixes: SELinuxProject/selinux#237 Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
- Loading branch information
1 parent
4159890
commit 331a109
Showing
3 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters