Debian Codegraph @

libsemanage/man/man3/semanage_exists.3

raw
1 .TH semanage_exists 3 "16 March 2006" "[email protected]" "Libsemanage API documentation"
2
3 .SH "NAME"
4 semanage_exists \- SELinux Management API
5
6 .SH "SYNOPSIS"
7 The following exists function is supported for any semanage record.
8 .br
9 Replace the function and object name as necessary.
10
11 .B extern int EXISTS_FUNCTION (
12 .br
13 .BI " semanage_handle_t *" handle ","
14 .br
15 .BI " const semanage_OBJECT_key_t *" key ","
16 .br
17 .BI " semanage_OBJECT_t **" response ");"
18
19 .SH "DESCRIPTION"
20 .TP
21 .B Behavior:
22 The exists function will return 0 if a matching key is not found, and 1 otherwise.
23
24 .TP
25 .B Parameters:
26 The
27 .I handle
28 is used to track persistent state across semanage calls, and for error reporting. The
29 .I key
30 identifies the object being checked. The result of the test will be stored in the address pointed by
31 .I response
32 The key is a property of the caller, and will not be stored or modified internally.
33
34 .TP
35 .B Requirements:
36 This function requires an semanage connection to be established (see
37 .BR semanage_connect "(3)"
38 )
39
40 .SH "RETURN VALUE"
41 In case of failure, \-1 is returned, and the semanage error callback is invoked, describing the error.
42 Otherwise a non-negative integer is returned (a commit number). The same number will be returned by all other read calls to the semanage database until the next commit.
43
44 .SH "SEE ALSO"
45 .BR semanage_handle_create "(3), " semanage_connect "(3), "