How To Install mcstrans on Fedora 34

mcstrans is SELinux Translation Daemon

Introduction

In this tutorial we learn how to install mcstrans on Fedora 34.

What is mcstrans

Security-enhanced Linux is a feature of the Linux® kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux. The Security-enhanced Linux kernel contains new architectural components originally developed to improve the security of the Flask operating system. These architectural components provide general support for the enforcement of many kinds of mandatory access control policies, including those based on the concepts of Type Enforcement®, Role-based Access Control, and Multi-level Security. mcstrans provides an translation daemon to translate SELinux categories from internal representations to user defined representation.

We can use yum or dnf to install mcstrans on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install mcstrans.

Install mcstrans on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install mcstrans using dnf by running the following command:

sudo dnf -y install mcstrans

Install mcstrans on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install mcstrans using yum by running the following command:

sudo yum -y install mcstrans

How To Uninstall mcstrans on Fedora 34

To uninstall only the mcstrans package we can use the following command:

sudo dnf remove mcstrans

mcstrans Package Contents on Fedora 34

/etc/selinux/mls/setrans.d
/usr/lib/.build-id
/usr/lib/.build-id/59
/usr/lib/.build-id/59/16db13222e3472d6ae250bff964c4d52ea69e1
/usr/lib/systemd/system/mcstrans.service
/usr/lib/systemd/system/mcstransd.service
/usr/sbin/mcstransd
/usr/share/man/man5/setrans.conf.5.gz
/usr/share/man/man8/mcs.8.gz
/usr/share/man/man8/mcstransd.8.gz
/usr/share/man/man8/secolor.conf.8.gz
/usr/share/man/ru/man5/setrans.conf.5.gz
/usr/share/man/ru/man8/mcs.8.gz
/usr/share/man/ru/man8/mcstransd.8.gz
/usr/share/mcstrans
/usr/share/mcstrans/examples
/usr/share/mcstrans/examples/default
/usr/share/mcstrans/examples/default/README
/usr/share/mcstrans/examples/default/default.test
/usr/share/mcstrans/examples/default/setrans.conf
/usr/share/mcstrans/examples/include
/usr/share/mcstrans/examples/include/README
/usr/share/mcstrans/examples/include/default.test
/usr/share/mcstrans/examples/include/setrans.conf
/usr/share/mcstrans/examples/include/setrans.d
/usr/share/mcstrans/examples/include/setrans.d/include-example
/usr/share/mcstrans/examples/nato
/usr/share/mcstrans/examples/nato/README
/usr/share/mcstrans/examples/nato/nato.test
/usr/share/mcstrans/examples/nato/setrans.conf
/usr/share/mcstrans/examples/nato/setrans.d
/usr/share/mcstrans/examples/nato/setrans.d/constraints.conf
/usr/share/mcstrans/examples/nato/setrans.d/eyes-only.conf
/usr/share/mcstrans/examples/nato/setrans.d/rel.conf
/usr/share/mcstrans/examples/non-mls-color
/usr/share/mcstrans/examples/non-mls-color/README
/usr/share/mcstrans/examples/non-mls-color/non-mls.color
/usr/share/mcstrans/examples/non-mls-color/secolor.conf
/usr/share/mcstrans/examples/pipes
/usr/share/mcstrans/examples/pipes/pipes.test
/usr/share/mcstrans/examples/pipes/setrans.conf
/usr/share/mcstrans/examples/pipes/setrans.d
/usr/share/mcstrans/examples/pipes/setrans.d/pipes.conf
/usr/share/mcstrans/examples/urcsts
/usr/share/mcstrans/examples/urcsts-via-include
/usr/share/mcstrans/examples/urcsts-via-include/README
/usr/share/mcstrans/examples/urcsts-via-include/secolor.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/c.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/r.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/s.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/system.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/ts.conf
/usr/share/mcstrans/examples/urcsts-via-include/setrans.d/u.conf
/usr/share/mcstrans/examples/urcsts-via-include/urcsts.color
/usr/share/mcstrans/examples/urcsts-via-include/urcsts.test
/usr/share/mcstrans/examples/urcsts/README
/usr/share/mcstrans/examples/urcsts/secolor.conf
/usr/share/mcstrans/examples/urcsts/setrans.conf
/usr/share/mcstrans/examples/urcsts/urcsts.color
/usr/share/mcstrans/examples/urcsts/urcsts.test
/usr/share/mcstrans/util
/usr/share/mcstrans/util/mlscolor-test
/usr/share/mcstrans/util/mlstrans-test
/usr/share/mcstrans/util/try-all

References

Summary

In this tutorial we learn how to install mcstrans on Fedora 34 using yum and dnf.