1bltocolor(3TSOL) Trusted Extensions Library Functions bltocolor(3TSOL)
2
3
4
6 bltocolor, bltocolor_r - get character-coded color name of label
7
9 cc [flag...] file... -ltsol [library...]
10
11
12 #include <tsol/label.h>
13
14 char *bltocolor(const m_label_t *label);
15
16
17 char *bltocolor_r(const m_label_t *label, const int size,
18 char *color_name);
19
20
22 The bltocolor() and bltocolor_r() functions get the character-coded
23 color name associated with the binary label label.
24
25
26 The calling process must have PRIV_SYS_TRANS_LABEL in its set of effec‐
27 tive privileges to get color names of labels that dominate the current
28 process's sensitivity label.
29
31 The bltocolor() function returns a pointer to a statically allocated
32 string that contains the character-coded color name specified for the
33 label or returns (char *)0 if, for any reason, no character-coded color
34 name is available for this binary label.
35
36
37 The bltocolor_r() function returns a pointer to the color_name string
38 which contains the character-coded color name specified for the label
39 or returns (char *)0 if, for any reason, no character-coded color name
40 is available for this binary label. color_name must provide for a
41 string of at least size characters.
42
44 /etc/security/tsol/label_encodings
45
46 The label encodings file contains the classification names, words,
47 constraints, and values for the defined labels of this system.
48
49
51 See attributes(5) for descriptions of the following attributes:
52
53
54
55
56 ┌─────────────────────────────┬─────────────────────────────┐
57 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
58 ├─────────────────────────────┼─────────────────────────────┤
59 │Interface Stability │Obsolete │
60 ├─────────────────────────────┼─────────────────────────────┤
61 │MT-Level │MT-Safe with exceptions │
62 └─────────────────────────────┴─────────────────────────────┘
63
64
65 These functions are obsolete and retained for ease of porting. They
66 might be removed in a future Solaris Trusted Extensions release. Use
67 the label_to_str(3TSOL) function instead.
68
69
70 The bltocolor() function returns a pointer to a statically allocated
71 string. Subsequent calls to it will overwrite that string with a new
72 character-coded color name. It is not MT-Safe. The bltocolor_r() func‐
73 tion should be used in multithreaded applications.
74
76 label_to_str(3TSOL), libtsol(3LIB), attributes(5)
77
79 The functionality described on this manual page is available only if
80 the system is configured with Trusted Extensions.
81
82
83 If label includes a specified word or words, the character-coded color
84 name associated with the first word specified in the label encodings
85 file is returned. Otherwise, if no character-coded color name is speci‐
86 fied for label, the first character-coded color name specified in the
87 label encodings file with the same classification as the binary label
88 is returned.
89
90
91
92SunOS 5.11 20 Jul 2007 bltocolor(3TSOL)