Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selinux: package to query SELinux status and verify/restore file contexts #6285

Merged
merged 7 commits into from Dec 13, 2018

Commits on Dec 11, 2018

  1. selinux: package to query SELinux status and verify/restore file cont…

    …exts
    
    Adding a new package for working with SELinux.
    
    There is basic functionality to query SELinux state, enabled and
    permissive/enforcing. The code founds out where the selinux filesystem is
    mounted and uses that path to query the status, rather than hardcoding
    /sys/fs/selinux.
    
    The package has additional helpers to verify whether a path is labeled accroding
    it its default context and possibly restore the context. Trying to avoid calling
    to libselinux directly, the command line tools `matchpathcon` and `restorecon`
    are used.
    
    Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
    bboozzoo committed Dec 11, 2018
    Configuration menu
    Copy the full SHA
    81dd13c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7f9ed6b View commit details
    Browse the repository at this point in the history
  3. selinux: tag implementation files are linux specific, add stubs for d…

    …arwin
    
    Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
    bboozzoo committed Dec 11, 2018
    Configuration menu
    Copy the full SHA
    e29faaf View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2018

  1. selinux: renames and tweaks

    Renames suggested during the review (thanks @zyga!)
    
    Extend the comment on matchpathcon.
    
    Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
    bboozzoo committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    2bcbe94 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9372938 View commit details
    Browse the repository at this point in the history
  3. selinux: skip relevant tests when the tools are present

    Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
    bboozzoo committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    08632d8 View commit details
    Browse the repository at this point in the history
  4. selinux: drop naked bool in RestoreContext

    Replace a naked bool passed to RestoreContext with a struct to make the code
    easier to read/follow.
    
    Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
    bboozzoo committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    8cd8b25 View commit details
    Browse the repository at this point in the history