1semanage_modify(3)       Libsemanage API documentation      semanage_modify(3)
2
3
4

NAME

6       semanage_modify - SELinux Management API
7
8

SYNOPSIS

10       The following modify function is supported for any semanage record.
11       Replace the function and object name as necessary.
12
13       extern int MODIFY_FUNCTION (
14            semanage_handle_t *handle,
15            const semanage_OBJECT_key_t *key,
16            const semanage_OBJECT_t *data);
17
18

DESCRIPTION

20       Behavior:
21              If  a  matching  key  is  found in the local store, the provided
22              object will replace the current one. Otherwise, it will be added
23              to  the  store. When semanage_commit(3) is invoked, changes will
24              be permanently written into the local  store,  and  then  loaded
25              into  policy.  Validity  of the object being added is checked at
26              commit time. Adding  new  objects  with  respect  to  policy  is
27              allowed,  except  in  the  case  of booleans. Attempt to add new
28              booleans with respect to policy will fail at commit time.
29
30
31       Parameters:
32              The handle is used to track  persistent  state  across  semanage
33              calls,  and  for  error  reporting.  The key identifies the data
34              object, which will be written into the store. The key  are  data
35              are  properties  of  the  caller, and are not stored or modified
36              internally.
37
38
39       Requirements:
40              This function requires an semanage connection to be  established
41              (see  semanage_connect(3)  ), and must be executed in a transac‐
42              tion (see semanage_begin_transaction(3) ).
43
44

RETURN VALUE

46       In case of failure, -1 is returned, and the semanage error callback  is
47       invoked, describing the error.  Otherwise 0 is returned.
48
49

SEE ALSO

51       semanage_handle_create(3), semanage_begin_transaction(3), semanage_con‐
52       nect(3), semanage_commit(3).
53
54
55
56ivg2@cornell.edu                 16 March 2006              semanage_modify(3)
Impressum