ca1a91
.TH "secolor.conf" "5" "08 April 2011" "SELinux API documentation"
ca1a91
.SH "NAME"
ca1a91
secolor.conf \- The SELinux color configuration file
ca1a91
.
ca1a91
.SH "DESCRIPTION"
ca1a91
This optional file controls the color to be associated to the context components associated to the 
ca1a91
.I raw
ca1a91
context passed by 
ca1a91
.BR selinux_raw_context_to_color "(3),"
ca1a91
when context related information is to be displayed in color by an SELinux-aware application. 
ca1a91
.sp
ca1a91
.BR selinux_raw_context_to_color "(3)"
ca1a91
obtains this color information from the active policy 
ca1a91
.B secolor.conf
ca1a91
file as returned by 
ca1a91
.BR selinux_colors_path "(3)."
ca1a91
.
ca1a91
.SH "FILE FORMAT"
ca1a91
The file format is as follows:
ca1a91
.RS
ca1a91
.B color
ca1a91
.I color_name
ca1a91
.BI "= #"color_mask
ca1a91
.br
ca1a91
[...]
ca1a91
.sp
ca1a91
.I context_component string
ca1a91
.B =
ca1a91
.I fg_color_name bg_color_name
ca1a91
.br
ca1a91
[...]
ca1a91
.sp 
ca1a91
.RE
ca1a91
ca1a91
Where:
ca1a91
.br
ca1a91
.B color
ca1a91
.RS
ca1a91
The color keyword. Each color entry is on a new line.
ca1a91
.RE
ca1a91
.I color_name
ca1a91
.RS
ca1a91
A single word name for the color (e.g. red).
ca1a91
.RE
ca1a91
.I color_mask
ca1a91
.RS
ca1a91
A color mask starting with a hash (#) that describes the hexadecimal RGB colors with black being #000000 and white being #ffffff.
ca1a91
.RE
ca1a91
.I context_component
ca1a91
.RS
ca1a91
The context component name that must be one of the following:
ca1a91
.br
ca1a91
.RS
ca1a91
user, role, type or range 
ca1a91
.RE
ca1a91
Each
ca1a91
.IR context_component " " string " ..."
ca1a91
entry is on a new line.
ca1a91
.RE
ca1a91
.I string
ca1a91
.RS
ca1a91
This is the 
ca1a91
.I context_component
ca1a91
string that will be matched with the 
ca1a91
.I raw
ca1a91
context component passed by
ca1a91
.BR selinux_raw_context_to_color "(3)."
ca1a91
.br
ca1a91
A wildcard '*' may be used to match any undefined string for the user, role and type 
ca1a91
.I context_component
ca1a91
entries only.
ca1a91
.RE
ca1a91
ca1a91
.I fg_color_name
ca1a91
.RS
ca1a91
The color_name string that will be used as the foreground color.
ca1a91
A 
ca1a91
.I color_mask
ca1a91
may also be used.
ca1a91
.RE
ca1a91
.I bg_color_name
ca1a91
.RS
ca1a91
The color_name string that will be used as the background color.
ca1a91
A 
ca1a91
.I color_mask
ca1a91
may also be used.
ca1a91
.RE
ca1a91
.
ca1a91
.SH "EXAMPLES"
ca1a91
Example 1 entries are:
ca1a91
.RS
ca1a91
color black  = #000000
ca1a91
.br
ca1a91
color green  = #008000
ca1a91
.br
ca1a91
color yellow = #ffff00
ca1a91
.br
ca1a91
color blue   = #0000ff
ca1a91
.br
ca1a91
color white  = #ffffff
ca1a91
.br
ca1a91
color red    = #ff0000
ca1a91
.br
ca1a91
color orange = #ffa500
ca1a91
.br
ca1a91
color tan    = #D2B48C
ca1a91
.sp
ca1a91
user * = black white
ca1a91
.br
ca1a91
role * = white black
ca1a91
.br
ca1a91
type * = tan orange
ca1a91
.br
ca1a91
range s0\-s0:c0.c1023 = black green
ca1a91
.br
ca1a91
range s1\-s1:c0.c1023 = white green
ca1a91
.br
ca1a91
range s3\-s3:c0.c1023 = black tan
ca1a91
.br
ca1a91
range s5\-s5:c0.c1023 = white blue
ca1a91
.br
ca1a91
range s7\-s7:c0.c1023 = black red
ca1a91
.br
ca1a91
range s9\-s9:c0.c1023 = black orange
ca1a91
.br
ca1a91
range s15:c0.c1023   = black yellow
ca1a91
.RE
ca1a91
ca1a91
.sp
ca1a91
Example 2 entries are:
ca1a91
.RS
ca1a91
color black  = #000000
ca1a91
.br
ca1a91
color green  = #008000
ca1a91
.br
ca1a91
color yellow = #ffff00
ca1a91
.br
ca1a91
color blue   = #0000ff
ca1a91
.br
ca1a91
color white  = #ffffff
ca1a91
.br
ca1a91
color red    = #ff0000
ca1a91
.br
ca1a91
color orange = #ffa500
ca1a91
.br
ca1a91
color tan    = #d2b48c
ca1a91
.sp
ca1a91
user unconfined_u = #ff0000 green
ca1a91
.br
ca1a91
role unconfined_r = red #ffffff
ca1a91
.br
ca1a91
type unconfined_t = red orange
ca1a91
.br
ca1a91
user user_u       = black green
ca1a91
.br
ca1a91
role user_r       = white black
ca1a91
.br
ca1a91
type user_t       = tan red
ca1a91
.br
ca1a91
user xguest_u     = black yellow
ca1a91
.br
ca1a91
role xguest_r     = black red
ca1a91
.br
ca1a91
type xguest_t     = black green
ca1a91
.br
ca1a91
user sysadm_u     = white black
ca1a91
.br
ca1a91
range s0:c0.c1023 = black white
ca1a91
.br
ca1a91
user *            = black white
ca1a91
.br
ca1a91
role *            = black white
ca1a91
.br
ca1a91
type *            = black white
ca1a91
.RE
ca1a91
.
ca1a91
.SH "SEE ALSO"
ca1a91
.BR selinux "(8), " selinux_raw_context_to_color "(3), " selinux_colors_path "(3)"