selinux/libsemanage
Petr Lautrbach c35919a703 libsemanage: sync filesystem with sandbox
Commit 331a109f91 ("libsemanage: fsync final files before rename")
added fsync() for policy files and improved situation when something
unexpected happens right after rename(). However the module store could
be affected as well. After the following steps module files could be 0
size:

1. Run `semanage fcontext -a -t var_t "/tmp/abc"`
2. Force shutdown the server during the command is run, or right after
   it's finished
3. Boot the system and look for empty files:
    # find /var/lib/selinux/targeted/ -type f -size 0 | wc -l
    1266

It looks like this situation can be avoided if the filesystem with the
sandbox is sync()ed before we start to rename() directories in the
store.

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2021-02-01 15:11:40 +01:00
..
example
include libsemanage: Remove legacy and duplicate symbols 2020-10-19 22:11:40 +02:00
man libsemanage: clarify handle-unknown configuration setting in man page 2020-04-28 09:27:49 +02:00
src libsemanage: sync filesystem with sandbox 2021-02-01 15:11:40 +01:00
tests libsemanage/tests: check that string pointers are not NULL before comparing them 2019-10-01 14:33:04 -04:00
utils Always use /usr/bin/python3 in Python scripts 2019-02-20 16:43:27 +01:00
.gitignore
COPYING
Makefile
VERSION Update VERSIONs and Python bindings version to 3.2-rc1 for release 2021-01-20 12:40:14 +01:00