1semanage_query(3) Libsemanage API documentation semanage_query(3)
2
3
4
6 semanage_query - SELinux Management API
7
8
10 The following query function is supported for any semanage record.
11 Replace the function and object name as necessary.
12
13 extern int QUERY_FUNCTION (
14 semanage_handle_t *handle,
15 const semanage_OBJECT_key_t *key,
16 semanage_OBJECT_t **response);
17
18
20 Behavior:
21 The query function will fail if a matching key is not found.
22 Otherwise, the corresponding object is returned.
23
24
25 Parameters:
26 The handle is used to track persistent state across semanage
27 calls, and for error reporting. The key identifies the object
28 being queried, which will be stored in the address pointed by
29 response The key is a property of the caller, and will not be
30 stored or modified internally. The object returned becomes a
31 property of the caller, and must be freed with semanā
32 age_OBJECT_free.
33
34
35 Requirements:
36 This function requires an semanage connection to be established
37 (see semanage_connect(3) )
38
39
41 In case of failure, -1 is returned, and the semanage error callback is
42 invoked, describing the error. Otherwise a non-negative integer is
43 returned (a commit number). The same number will be returned by all
44 other semanage object read calls until the next commit.
45
46
48 semanage_handle_create(3), semanage_connect(3),
49
50
51
52ivg2@cornell.edu 15 March 2006 semanage_query(3)