History log of /external/selinux/libsepol/src/kernel_to_conf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
51bc21036ce3368506cf9db2b319ab42eb355515 03-Sep-2017 Nicolas Iooss <nicolas.iooss@m4x.org> libsepol: use IN6ADDR_ANY_INIT to initialize IPv6 addresses

When compiling libsepol with clang and some warning flags, the compiler
complains about the way IPv6 addresses are initialized:

kernel_to_cil.c:2795:35: error: suggest braces around initialization
of subobject [-Werror,-Wmissing-braces]
struct in6_addr subnet_prefix = {0};
^
{}

When replacing the initializer as suggested, gcc 4.8.4 complains:

kernel_to_cil.c: In function ‘write_selinux_ibpkey_rules_to_cil’:
kernel_to_cil.c:2795:9: error: missing initializer for field
‘__in6_u’ of ‘struct in6_addr’ [-Werror=missing-field-initializers]
struct in6_addr subnet_prefix = {};
^

Thankfully netinet/in.h provides a macro to initialize struct in6_addr
variables:

#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }

Both clang and gcc no longer report warnings when using this macro.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
/external/selinux/libsepol/src/kernel_to_conf.c
118c0cd1038efb8d869db70753d2ac449f4fda9b 22-May-2017 Daniel Jurgens <danielj@mellanox.com> libsepol: Add ibendport ocontext handling

Add support for reading, writing, and copying IB end port ocontext data.
Also add support for querying a IB end port sid to checkpolicy.

Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
/external/selinux/libsepol/src/kernel_to_conf.c
9fbb3112769a7931777f30894156d981b6933415 22-May-2017 Daniel Jurgens <danielj@mellanox.com> libsepol: Add ibpkey ocontext handling

Add support for reading, writing, and copying Infiniband Pkey ocontext
data. Also add support for querying a Pkey sid to checkpolicy.

Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
/external/selinux/libsepol/src/kernel_to_conf.c
0a08fd1e69797d6ab315ee17d797ef12dae25ce9 21-Mar-2017 James Carter <jwcart2@tycho.nsa.gov> libsepol: Add ability to convert binary policy to policy.conf file

It would sometimes be helpful for debugging or verification purposes
to be able to convert a binary policy to a human-readable form.

Create new function, sepol_kernel_policydb_to_conf(), that takes a
policydb created from a binary policy and writes a policy.conf file
to the provided FILE pointer.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
/external/selinux/libsepol/src/kernel_to_conf.c