1semanage_exists(3) Libsemanage API documentation semanage_exists(3)
2
3
4
6 SELinux Management API
7
8
10 The following exists function is supported for any semanage record.
11 Replace the function and object name as necessary.
12
13 extern int EXISTS_FUNCTION (
14 semanage_handle_t *handle,
15 const semanage_OBJECT_key_t *key,
16 semanage_OBJECT_t **response);
17
18
20 Behavior:
21 The exists function will return 0 if a matching key is not
22 found, and 1 otherwise.
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 checked. The result of the test will be stored in the
29 address pointed by response The key is a property of the caller,
30 and will not be stored or modified internally.
31
32
33 Requirements:
34 This function requires an semanage connection to be established
35 (see semanage_connect(3) )
36
37
39 In case of failure, -1 is returned, and the semanage error callback is
40 invoked, describing the error. Otherwise a non-negative integer is
41 returned (a commit number). The same number will be returned by all
42 other read calls to the semanage database until the next commit.
43
44
46 semanage_handle_create(3), semanage_connect(3),
47
48
49
50ivg2@cornell.edu 16 March 2006 semanage_exists(3)