Reader small image

You're reading from  SELinux Cookbook

Product typeBook
Published inSep 2014
Publisher
ISBN-139781783989669
Edition1st Edition
Right arrow
Author (1)
Sven Vermeulen
Sven Vermeulen
author image
Sven Vermeulen

Sven Vermeulen (sjvermeu on Twitter) is a long-term contributor to various free software projects and the author of several online guides and resources, including the Gentoo Handbook. He got his first taste of free software in 1997 and never looked back. Within SELinux, Sven contributed several policies to the Reference Policy project, and actively participated in policy development and user space development projects. In his daily job, Sven is an enterprise architect in a European financial institution as well as a self-employed solution engineer and consultant. Prior to this, he graduated with an MSE in computer engineering from Ghent University and an MSc in ICT enterprise architecture from IC Institute.
Read more about Sven Vermeulen

Right arrow

Creating the administrative interface


To end the SELinux module development for services, we need to create proper role-based interfaces. Whereas the _role interface is usually for nonprivileged user roles, an _admin interface is used to provide all the necessary privileges to fully administer a service.

How to do it…

An administrative interface which we can later assign to the user and role that will administer the environment is created with the following steps:

  1. Create a specific init script type for the init scripts of the daemon. For instance, for the virtd daemon inside virt.te, the following policy rules create the proper init script type:

    type virtd_initrc_exec_t;
    init_script_file(virtd_initrc_exec_t)
  2. Make sure that this init script is labeled correctly through the .fc file:

    /etc/rc\.d/init\.d/libvirtd  --  gen_context(system_u:object_r:virtd_initrc_exec_t,s0)
  3. Start with a skeleton _admin interface:

    ##########################################
    ## <summary>
    ##   All rules related to administer...
lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
SELinux Cookbook
Published in: Sep 2014Publisher: ISBN-13: 9781783989669

Author (1)

author image
Sven Vermeulen

Sven Vermeulen (sjvermeu on Twitter) is a long-term contributor to various free software projects and the author of several online guides and resources, including the Gentoo Handbook. He got his first taste of free software in 1997 and never looked back. Within SELinux, Sven contributed several policies to the Reference Policy project, and actively participated in policy development and user space development projects. In his daily job, Sven is an enterprise architect in a European financial institution as well as a self-employed solution engineer and consultant. Prior to this, he graduated with an MSE in computer engineering from Ghent University and an MSc in ICT enterprise architecture from IC Institute.
Read more about Sven Vermeulen