1secolor.conf(5) File Formats Manual secolor.conf(5)
2
3
4
6 secolor.conf - The SELinux color configuration file
7
9 This optional file controls the color to be associated to the context
10 components associated to the raw context passed by selinux_raw_con‐
11 text_to_color(3), when context related information is to be displayed
12 in color by an SELinux-aware application.
13
14 selinux_raw_context_to_color(3) obtains this color information from the
15 active policy secolor.conf file as returned by selinux_colors_path(3).
16
18 The file format is as follows:
19 color color_name = #color_mask
20 [...]
21
22 context_component string = fg_color_name bg_color_name
23 [...]
24
25
26 Where:
27 color
28 The color keyword. Each color entry is on a new line.
29 color_name
30 A single word name for the color (e.g. red).
31 color_mask
32 A color mask starting with a hash (#) that describes the hexa‐
33 decimal RGB colors with black being #000000 and white being
34 #ffffff.
35 context_component
36 The context component name that must be one of the following:
37 user, role, type or range
38 Each context_component string ... entry is on a new line.
39 string
40 This is the context_component string that will be matched with
41 the raw context component passed by selinux_raw_con‐
42 text_to_color(3).
43 A wildcard '*' may be used to match any undefined string for the
44 user, role and type context_component entries only.
45
46 fg_color_name
47 The color_name string that will be used as the foreground color.
48 A color_mask may also be used.
49 bg_color_name
50 The color_name string that will be used as the background color.
51 A color_mask may also be used.
52
54 Example 1 entries are:
55 color black = #000000
56 color green = #008000
57 color yellow = #ffff00
58 color blue = #0000ff
59 color white = #ffffff
60 color red = #ff0000
61 color orange = #ffa500
62 color tan = #D2B48C
63
64 user * = black white
65 role * = white black
66 type * = tan orange
67 range s0-s0:c0.c1023 = black green
68 range s1-s1:c0.c1023 = white green
69 range s3-s3:c0.c1023 = black tan
70 range s5-s5:c0.c1023 = white blue
71 range s7-s7:c0.c1023 = black red
72 range s9-s9:c0.c1023 = black orange
73 range s15:c0.c1023 = black yellow
74
75
76 Example 2 entries are:
77 color black = #000000
78 color green = #008000
79 color yellow = #ffff00
80 color blue = #0000ff
81 color white = #ffffff
82 color red = #ff0000
83 color orange = #ffa500
84 color tan = #d2b48c
85
86 user unconfined_u = #ff0000 green
87 role unconfined_r = red #ffffff
88 type unconfined_t = red orange
89 user user_u = black green
90 role user_r = white black
91 type user_t = tan red
92 user xguest_u = black yellow
93 role xguest_r = black red
94 type xguest_t = black green
95 user sysadm_u = white black
96 range s0:c0.c1023 = black white
97 user * = black white
98 role * = black white
99 type * = black white
100
102 selinux(8), selinux_raw_context_to_color(3), selinux_colors_path(3)
103
104
105
106SELinux API documentation 08 April 2011 secolor.conf(5)