selinux/libsemanage
Petr Lautrbach 267d4f9bf5 libsemanage: open lock_file with O_RDWR
man 2 flock:
    Since Linux 2.6.12, NFS clients support flock() locks by emulating
    them as fcntl(2) byte-range locks on the entire file.  This means
    that fcntl(2) and  flock()  locks  do  interact with one another
    over NFS.  It also means that in order to place an exclusive lock,
    the file must be opened for writing.

Fixes:
    # semanage fcontext -d -e /home /tmp/testdir
    libsemanage.semanage_get_lock: Error obtaining direct transaction lock at /var/lib/selinux/targeted/semanage.trans.LOCK. (Bad file descriptor).
    OSError: Bad file descriptor

Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
Acked-by: James Carter <jwcart2@gmail.com>
2024-11-15 13:59:07 -05:00
..
example
include libsemanage: always write kernel policy when check_ext_changes is specified 2022-06-30 21:09:00 +02:00
man libsemanage: Optionally allow duplicate declarations 2024-11-15 13:26:44 -05:00
src libsemanage: open lock_file with O_RDWR 2024-11-15 13:59:07 -05:00
tests libsemanage/tests: use strict prototypes 2023-08-16 13:33:12 -04:00
utils
.gitignore
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Release 3.7 2024-06-26 17:30:41 +02:00