Skip to content
  • Jonathon Jongsma's avatar
    run: add ability to set selinux context · 2aa5c078
    Jonathon Jongsma authored
    
    
    When running libvirt from the build directory with the 'run' script, it
    will run as unconfined_t. This can result in unexpected behavior when
    selinux is enforcing due to the fact that the selinux policies are
    written assuming that libvirt is running with the
    system_u:system_r:virtd_t context. This patch adds a new --selinux
    option to the run script. When this option is specified, it will launch
    the specified binary using the 'runcon' utility to set its selinux
    context to the one mentioned above. Since this may require root
    privileges, setting the selinux context is not the default behavior and
    must be enabled with the command line switch.
    
    Signed-off-by: default avatarJonathon Jongsma <jjongsma@redhat.com>
    Reviewed-by: default avatarMartin Kletzander <mkletzan@redhat.com>
    2aa5c078