File: secolor.conf.5

package info (click to toggle)
android-platform-external-libselinux 8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 33,252 kB
  • sloc: ansic: 142,533; python: 23,929; makefile: 1,760; yacc: 1,367; sh: 1,108; lex: 448; xml: 176
file content (178 lines) | stat: -rw-r--r-- 3,273 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.TH "secolor.conf" "5" "08 April 2011" "SELinux API documentation"
.SH "NAME"
secolor.conf \- The SELinux color configuration file
.
.SH "DESCRIPTION"
This optional file controls the color to be associated to the context components associated to the 
.I raw
context passed by 
.BR selinux_raw_context_to_color "(3),"
when context related information is to be displayed in color by an SELinux-aware application. 
.sp
.BR selinux_raw_context_to_color "(3)"
obtains this color information from the active policy 
.B secolor.conf
file as returned by 
.BR selinux_colors_path "(3)."
.
.SH "FILE FORMAT"
The file format is as follows:
.RS
.B color
.I color_name
.BI "= #"color_mask
.br
[...]
.sp
.I context_component string
.B =
.I fg_color_name bg_color_name
.br
[...]
.sp 
.RE

Where:
.br
.B color
.RS
The color keyword. Each color entry is on a new line.
.RE
.I color_name
.RS
A single word name for the color (e.g. red).
.RE
.I color_mask
.RS
A color mask starting with a hash (#) that describes the hexadecimal RGB colors with black being #000000 and white being #ffffff.
.RE
.I context_component
.RS
The context component name that must be one of the following:
.br
.RS
user, role, type or range 
.RE
Each
.IR context_component " " string " ..."
entry is on a new line.
.RE
.I string
.RS
This is the 
.I context_component
string that will be matched with the 
.I raw
context component passed by
.BR selinux_raw_context_to_color "(3)."
.br
A wildcard '*' may be used to match any undefined string for the user, role and type 
.I context_component
entries only.
.RE

.I fg_color_name
.RS
The color_name string that will be used as the foreground color.
A 
.I color_mask
may also be used.
.RE
.I bg_color_name
.RS
The color_name string that will be used as the background color.
A 
.I color_mask
may also be used.
.RE
.
.SH "EXAMPLES"
Example 1 entries are:
.RS
color black  = #000000
.br
color green  = #008000
.br
color yellow = #ffff00
.br
color blue   = #0000ff
.br
color white  = #ffffff
.br
color red    = #ff0000
.br
color orange = #ffa500
.br
color tan    = #D2B48C
.sp
user * = black white
.br
role * = white black
.br
type * = tan orange
.br
range s0\-s0:c0.c1023 = black green
.br
range s1\-s1:c0.c1023 = white green
.br
range s3\-s3:c0.c1023 = black tan
.br
range s5\-s5:c0.c1023 = white blue
.br
range s7\-s7:c0.c1023 = black red
.br
range s9\-s9:c0.c1023 = black orange
.br
range s15:c0.c1023   = black yellow
.RE

.sp
Example 2 entries are:
.RS
color black  = #000000
.br
color green  = #008000
.br
color yellow = #ffff00
.br
color blue   = #0000ff
.br
color white  = #ffffff
.br
color red    = #ff0000
.br
color orange = #ffa500
.br
color tan    = #d2b48c
.sp
user unconfined_u = #ff0000 green
.br
role unconfined_r = red #ffffff
.br
type unconfined_t = red orange
.br
user user_u       = black green
.br
role user_r       = white black
.br
type user_t       = tan red
.br
user xguest_u     = black yellow
.br
role xguest_r     = black red
.br
type xguest_t     = black green
.br
user sysadm_u     = white black
.br
range s0:c0.c1023 = black white
.br
user *            = black white
.br
role *            = black white
.br
type *            = black white
.RE
.
.SH "SEE ALSO"
.BR selinux "(8), " selinux_raw_context_to_color "(3), " selinux_colors_path "(3)"