selinux/python/audit2allow
наб eb963a88b4 Insert -I../../libselinux/include and -L../../libselinux/src into subprograms where needed
These subprograms (sublibraries) use plain
  #include <selinux/selinux.h>
  cc ... -lselinux ...
&c. which includes/links to the system libselinux.

Naturally, this doesn't work if you don't have one.

All of these fell out of a plain make invocation,
yielding errors like
  cc  -O2 -Werror -Wall -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnull-dereference -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings -fno-common -I../include -D_GNU_SOURCE -c -o boolean_record.o boolean_record.c
  boolean_record.c:26:10: fatal error: selinux/selinux.h: No such file or directory
     26 | #include <selinux/selinux.h>
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.

  make[2]: Entering directory '/tmp/selinux/policycoreutils/sestatus'
  cc -O2 -Werror -Wall -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnull-dereference -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings -fno-common -D_FILE_OFFSET_BITS=64   -c -o sestatus.o sestatus.c
  sestatus.c:12:10: fatal error: selinux/selinux.h: No such file or directory
     12 | #include <selinux/selinux.h>
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.

Signed-off-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Acked-by: James Carter <jwcart2@gmail.com>
2025-04-07 11:37:37 -04:00
..
.gitignore python/audit2allow: make the tests useful again 2019-01-08 10:15:46 +01:00
audit2allow audit2allow: CIL output mode 2024-03-20 14:18:40 -04:00
audit2allow.1 audit2allow: CIL output mode 2024-03-20 14:18:40 -04:00
audit2why Move policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and sepolgen to python. 2016-11-16 11:19:50 -05:00
audit2why.1 Move policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and sepolgen to python. 2016-11-16 11:19:50 -05:00
Makefile Insert -I../../libselinux/include and -L../../libselinux/src into subprograms where needed 2025-04-07 11:37:37 -04:00
sepolgen-ifgen python: Harden tools against "rogue" modules 2022-11-09 07:53:27 -05:00
sepolgen-ifgen-attr-helper.c python/audit2allow: close file stream on error 2022-06-15 08:58:54 -04:00
test_audit2allow.py python/audit2allow: use local sepolgen-ifgen-attr-helper for tests 2019-01-08 10:15:46 +01:00
test_dummy_policy.cil python/audit2allow: make the tests useful again 2019-01-08 10:15:46 +01:00
test.log python: add xperms support to audit2allow 2018-06-16 10:36:14 +02:00