1getzonelabelbyid(3TSOLT)rusted Extensions Library Functiongsetzonelabelbyid(3TSOL)
2
3
4
6 getzonelabelbyid, getzonelabelbyname, getzoneidbylabel - map between
7 zones and labels
8
10 cc [flags...] file... -ltsol [library...]
11
12
13 #include <tsol/label.h>
14
15 m_label_t *getzonelabelbyid(zoneid_t zoneid);
16
17
18 m_label_t *getzonelabelbyname(const char *zonename);
19
20
21 zoneid_t *getzoneidbylabel(const m_label_t *label);
22
23
25 The getzonelabelbyid() function returns the mandatory access control
26 (MAC) label of zoneid.
27
28
29 The getzonelabelbyname() function returns the MAC label of the zone
30 whose name is zonename.
31
32
33 The getzoneidbylabel() function returns the zone ID of the zone whose
34 label is label.
35
36
37 All of these functions require that the specified zone's state is at
38 least ZONE_IS_READY. The zone of the calling process must dominate the
39 specified zone's label, or the calling process must be in the global
40 zone.
41
43 On successful completion, the getzonelabelbyid() and getzonelabelby‐
44 name() functions return a pointer to a sensitivity label that is allo‐
45 cated within these functions. To free the storage, use
46 m_label_free(3TSOL). If the zone does not exist, NULL is returned.
47
48
49 On successful completion, the getzoneidbylabel() function returns the
50 zone ID with the matching label. If there is no matching zone, the
51 function returns -1.
52
54 The getzonelabelbyid() and getzonelabelbyname() functions will fail if:
55
56 ENOENT The specified zone does not exist.
57
58
59
60 The getzonelabelbyid() function will fail if:
61
62 ENOENT No zone corresponds to the specified label.
63
64
66 See attributes(5) for descriptions of the following attributes:
67
68
69
70
71 ┌─────────────────────────────┬─────────────────────────────┐
72 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │Interface Stability │Committed │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │MT-Level │Safe │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 Intro(2), getzonenamebyid(3C), getzoneidbyname(3C), libtsol(3LIB),
81 m_label_free(3TSOL), attributes(5), labels(5)
82
84 The functionality described on this manual page is available only if
85 the system is configured with Trusted Extensions.
86
87
88
89SunOS 5.11 20 Jul 2007 getzonelabelbyid(3TSOL)