1m_label(3TSOL)       Trusted Extensions Library Functions       m_label(3TSOL)
2
3
4

NAME

6       m_label, m_label_alloc, m_label_dup, m_label_free - m_label functions
7

SYNOPSIS

9       cc [flag...] file... -ltsol [library...]
10
11
12       #include <tsol/label.h>
13
14       m_label_t *m_label_alloc(const m_label_type_t label_type);
15
16
17       int m_label_dup(m_label_t **dst, const m_label_t *src);
18
19
20       void m_label_free(m_label_t *label);
21
22

DESCRIPTION

24       The  m_label_alloc()  function allocates resources for a new label. The
25       label_type argument defines the type for a newly allocated  label.  The
26       label type can be:
27
28       MAC_LABEL     A Mandatory Access Control (MAC) label.
29
30
31       USER_CLEAR    A user clearance.
32
33
34
35       The m_label_dup() function allocates resources for a new dst label. The
36       function returns a pointer to the allocated label, which  is  an  exact
37       copy  of the src label. The caller is responsible for freeing the allo‐
38       cated resources by calling m_label_free().
39
40
41       The m_label_free() function frees resources that  are  associated  with
42       the previously allocated label.
43

RETURN VALUES

45       Upon  successful  completion,  the  m_label_alloc()  function returns a
46       pointer  to  the  newly  allocated  label.  Otherwise,  m_label_alloc()
47       returns NULL and errno is set to indicate the error.
48
49
50       Upon  successful completion, the m_label_dup() function returns 0. Oth‐
51       erwise, -1 is returned and errno is set to indicate the error.
52

ERRORS

54       The m_label_alloc() function will fail if:
55
56       EINVAL    Invalid parameter.
57
58
59       ENOMEM    The physical limits of the system are exceeded by size  bytes
60                 of memory which cannot be allocated.
61
62

ATTRIBUTES

64       See attributes(5) for descriptions of the following attributes:
65
66
67
68
69       ┌─────────────────────────────┬─────────────────────────────┐
70       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │Interface Stability          │Committed                    │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │Safe                         │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       label_to_str(3TSOL),  libtsol(3LIB),  str_to_label(3TSOL), label_encod‐
79       ings(4), attributes(5), labels(5)
80
81
82       Determining Whether the Printing Service Is Running in a Labeled  Envi‐
83       ronment in Solaris Trusted Extensions Developer's Guide
84

NOTES

86       The  functionality  described  on this manual page is available only if
87       the system is configured with Trusted Extensions.
88
89
90
91SunOS 5.11                        20 Jul 2007                   m_label(3TSOL)
Impressum