libselinux/3.6

Security-enhanced Linux is a patch of the Linux kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux
Recipe info
libselinux-1.0, LGPL-2.1-or-later
2024-06-06

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
libselinux/3.6

Using libselinux

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
libselinux/3.6
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("libselinux/3.6")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): libselinux
  • CMake target name(s): libselinux::libselinux
  • sepol => libselinux::sepol
    selinux => libselinux::selinux
    
  • pkg-config file name(s): libselinux.pc
  • sepol => libsepol.pc
    selinux => libselinux.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(libselinux REQUIRED)
# ...
target_link_libraries(YOUR_TARGET libselinux::libselinux)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the libselinux homepage listed above:

#include "selinux/avc.h"
#include "selinux/context.h"
#include "selinux/get_context_list.h"
#include "selinux/get_default_type.h"
#include "selinux/label.h"
#include "selinux/restorecon.h"
#include "selinux/selinux.h"
#include "sepol/boolean_record.h"
#include "sepol/booleans.h"
#include "sepol/context.h"
#include "sepol/context_record.h"
#include "sepol/debug.h"
#include "sepol/errcodes.h"
#include "sepol/handle.h"
#include "sepol/ibendport_record.h"
#include "sepol/ibendports.h"
#include "sepol/ibpkey_record.h"
#include "sepol/ibpkeys.h"
#include "sepol/iface_record.h"
#include "sepol/interfaces.h"
#include "sepol/kernel_to_cil.h"
#include "sepol/kernel_to_conf.h"
#include "sepol/module.h"
#include "sepol/module_to_cil.h"
#include "sepol/node_record.h"
#include "sepol/nodes.h"
#include "sepol/policydb.h"
#include "sepol/policydb/avrule_block.h"
#include "sepol/policydb/avtab.h"
#include "sepol/policydb/conditional.h"
#include "sepol/policydb/constraint.h"
#include "sepol/policydb/context.h"
#include "sepol/policydb/ebitmap.h"
#include "sepol/policydb/expand.h"
#include "sepol/policydb/flask_types.h"
#include "sepol/policydb/hashtab.h"
#include "sepol/policydb/hierarchy.h"
#include "sepol/policydb/link.h"
#include "sepol/policydb/mls_types.h"
#include "sepol/policydb/module.h"
#include "sepol/policydb/polcaps.h"
#include "sepol/policydb/policydb.h"
#include "sepol/policydb/services.h"
#include "sepol/policydb/sidtab.h"
#include "sepol/policydb/symtab.h"
#include "sepol/policydb/util.h"
#include "sepol/port_record.h"
#include "sepol/ports.h"
#include "sepol/sepol.h"
#include "sepol/user_record.h"
#include "sepol/users.h"