Debian Codegraph @

libsemanage/man/man3/semanage_modify.3

raw
1 .TH semanage_modify 3 "16 March 2006" "[email protected]" "Libsemanage API documentation"
2
3 .SH "NAME"
4 semanage_modify \- SELinux Management API
5
6 .SH "SYNOPSIS"
7 The following modify function is supported for any semanage record.
8 .br
9 Replace the function and object name as necessary.
10
11 .B extern int MODIFY_FUNCTION (
12 .br
13 .BI " semanage_handle_t *" handle ","
14 .br
15 .BI " const semanage_OBJECT_key_t *" key ","
16 .br
17 .BI " const semanage_OBJECT_t *" data ");"
18
19 .SH "DESCRIPTION"
20 .TP
21 .B Behavior:
22 If a matching key is found in the local store, the provided object will replace the current one. Otherwise, it will be added to the store. When
23 .BR semanage_commit "(3)"
24 is invoked, changes will be permanently written into the local store, and then loaded into policy. Validity of the object being added is checked at commit time. Adding new objects with respect to policy is allowed, except in the case of booleans. Attempt to add new booleans with respect to policy will fail at commit time.
25
26 .TP
27 .B Parameters:
28 The
29 .I handle
30 is used to track persistent state across semanage calls, and for error reporting. The
31 .I key
32 identifies the
33 .I data
34 object, which will be written into the store. The key are data are properties of the caller, and are not stored or modified internally.
35
36 .TP
37 .B Requirements:
38 This function requires an semanage connection to be established (see
39 .BR semanage_connect "(3)"
40 ), and must be executed in a transaction (see
41 .BR semanage_begin_transaction "(3)"
42 ).
43
44 .SH "RETURN VALUE"
45 In case of failure, \-1 is returned, and the semanage error callback is invoked, describing the error.
46 Otherwise 0 is returned.
47
48 .SH "SEE ALSO"
49 .BR semanage_handle_create "(3), " semanage_begin_transaction "(3), " semanage_connect "(3), " semanage_commit "(3). "