{"id":13440590,"url":"https://github.com/SELinuxProject/selinux","last_synced_at":"2025-03-20T10:31:39.594Z","repository":{"id":17778981,"uuid":"20648799","full_name":"SELinuxProject/selinux","owner":"SELinuxProject","description":"This is the upstream repository for the Security Enhanced Linux (SELinux) userland libraries and tools. The software provided by this project complements the SELinux features integrated into the Linux kernel and is used by Linux distributions. All bugs and patches should be submitted to selinux@vger.kernel.org","archived":false,"fork":false,"pushed_at":"2024-05-22T15:51:19.000Z","size":17578,"stargazers_count":1265,"open_issues_count":96,"forks_count":343,"subscribers_count":107,"default_branch":"main","last_synced_at":"2024-05-22T16:58:52.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SELinuxProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-09T14:09:57.000Z","updated_at":"2024-06-05T19:42:42.933Z","dependencies_parsed_at":"2024-01-10T06:12:42.618Z","dependency_job_id":"1b40f2a6-c88f-4d1a-ac77-435b7d3b17ae","html_url":"https://github.com/SELinuxProject/selinux","commit_stats":{"total_commits":3771,"total_committers":186,"mean_commits":"20.274193548387096","dds":0.869795810129939,"last_synced_commit":"804e52b7f8a3c8649615211a961ef8189fe73f39"},"previous_names":[],"tags_count":653,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SELinuxProject%2Fselinux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SELinuxProject%2Fselinux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SELinuxProject%2Fselinux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SELinuxProject%2Fselinux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SELinuxProject","download_url":"https://codeload.github.com/SELinuxProject/selinux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213299268,"owners_count":15566595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:24.220Z","updated_at":"2025-03-20T10:31:39.585Z","avatar_url":"https://github.com/SELinuxProject.png","language":"C","readme":"SELinux Userspace\n=================\n\n![SELinux logo](https://github.com/SELinuxProject.png)\n[![Run Tests](https://github.com/SELinuxProject/selinux/actions/workflows/run_tests.yml/badge.svg)](https://github.com/SELinuxProject/selinux/actions/workflows/run_tests.yml)\n[![Run SELinux testsuite in Testing Farm](https://github.com/SELinuxProject/selinux/actions/workflows/tf_testsuite.yml/badge.svg)](https://github.com/SELinuxProject/selinux/actions/workflows/tf_testsuite.yml)\n[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/selinux.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#selinux)\n[![CIFuzz Status](https://github.com/SELinuxProject/selinux/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/SELinuxProject/selinux/actions/workflows/cifuzz.yml)\n\nSELinux is a flexible Mandatory Access Control (MAC) system built into the\nLinux Kernel. SELinux provides administrators with a comprehensive access\ncontrol mechanism that enables greater access granularity over the existing\nLinux Discretionary Access Controls (DAC) and is present in many major Linux\ndistributions. This repository contains the sources for the SELinux utilities\nand system libraries which allow for the configuration and management of an\nSELinux-based system.\n\nPlease submit all bug reports and patches to the \u003cselinux@vger.kernel.org\u003e\nmailing list. You can subscribe by sending \"subscribe selinux\" in the body of\nan email to \u003cmajordomo@vger.kernel.org\u003e. Archives of the mailing list are\navailable at https://lore.kernel.org/selinux.\n\nInstallation\n------------\n\nSELinux libraries and tools are packaged in several Linux distributions:\n\n* Alpine Linux (https://pkgs.alpinelinux.org/package/edge/testing/x86/policycoreutils)\n* Arch Linux User Repository (https://aur.archlinux.org/packages/policycoreutils/)\n* Buildroot (https://git.buildroot.net/buildroot/tree/package/policycoreutils)\n* Debian and Ubuntu (https://packages.debian.org/sid/policycoreutils)\n* Gentoo (https://packages.gentoo.org/packages/sys-apps/policycoreutils)\n* RHEL and Fedora (https://src.fedoraproject.org/rpms/policycoreutils)\n* Yocto Project (http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/tree/recipes-security/selinux)\n* and many more (https://repology.org/project/policycoreutils/versions)\n\n\nBuilding and testing\n--------------------\n\nBuild dependencies on Fedora:\n\n```sh\n# For C libraries and programs\ndnf install \\\n    audit-libs-devel \\\n    bison \\\n    bzip2-devel \\\n    CUnit-devel \\\n    diffutils \\\n    flex \\\n    gcc \\\n    gettext \\\n    glib2-devel \\\n    make \\\n    libcap-devel \\\n    libcap-ng-devel \\\n    pam-devel \\\n    pcre2-devel \\\n    xmlto\n\n# For Python and Ruby bindings\ndnf install \\\n    python3-devel \\\n    python3-pip \\\n    python3-setuptools \\\n    python3-wheel \\\n    ruby-devel \\\n    swig\n```\n\nBuild dependencies on Debian:\n\n```sh\n# For C libraries and programs\napt-get install --no-install-recommends --no-install-suggests \\\n    bison \\\n    flex \\\n    gawk \\\n    gcc \\\n    gettext \\\n    make \\\n    libaudit-dev \\\n    libbz2-dev \\\n    libcap-dev \\\n    libcap-ng-dev \\\n    libcunit1-dev \\\n    libglib2.0-dev \\\n    libpcre2-dev \\\n    pkgconf \\\n    python3 \\\n    systemd \\\n    xmlto\n\n# For Python and Ruby bindings\napt-get install --no-install-recommends --no-install-suggests \\\n    python3-dev \\\n    python3-pip \\\n    python3-setuptools \\\n    python3-wheel \\\n    ruby-dev \\\n    swig\n```\n\nTo build and install everything under a private directory, run:\n\n    make clean distclean\n\n    make DESTDIR=~/obj install install-rubywrap install-pywrap\n\nOn Debian the environment variable `DEB_PYTHON_INSTALL_LAYOUT` needs to be set\nto `deb` when installing the Python wrappers in order to create the correct\nPython directory structure.\nOn Debian systems older than bookworm set\n`PYTHON_SETUP_ARGS='--install-option \"--install-layout=deb\"'` instead.\n\nTo run tests with the built libraries and programs, several paths (relative to `$DESTDIR`) need to be added to variables `$LD_LIBRARY_PATH`, `$PATH` and `$PYTHONPATH`.\nThis can be done using [./scripts/env_use_destdir](./scripts/env_use_destdir):\n\n    DESTDIR=~/obj ./scripts/env_use_destdir make test\n\nSome tests require the reference policy to be installed (for example in `python/sepolgen`).\n\nTo install as the default system libraries and binaries\n(overwriting any previously installed ones - dangerous!),\non x86_64, run:\n\n    make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel\n\nor on x86 (32-bit), run:\n\n    make install install-pywrap relabel\n\nThis may render your system unusable if the upstream SELinux userspace\nlacks library functions or other dependencies relied upon by your\ndistribution.  If it breaks, you get to keep both pieces.\n\n\n## Setting CFLAGS\n\nSetting CFLAGS during the make process will cause the omission of many defaults. While the project strives\nto provide a reasonable set of default flags, custom CFLAGS could break the build, or have other undesired\nchanges on the build output. Thus, be very careful when setting CFLAGS. CFLAGS that are encouraged to be\nset when overriding are:\n\n- -fno-semantic-interposition for gcc or compilers that do not do this. clang does this by default. clang-10 and up\n   will support passing this flag, but ignore it. Previous clang versions fail.\n\n\nmacOS\n-----\n\nTo install libsepol on macOS (mainly for policy analysis):\n\n    cd libsepol; make PREFIX=/usr/local install\n\nThis requires GNU coreutils:\n\n    brew install coreutils\n","funding_links":[],"categories":["Security Tools","C","Security","Tools"],"sub_categories":["Interfaces","Sensor and Acuator Interfaces","Winetricks","Objective-C Tools, Libraries, and Frameworks","Mesh networks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSELinuxProject%2Fselinux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSELinuxProject%2Fselinux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSELinuxProject%2Fselinux/lists"}