| 1 |
.TH semanage_list 3 "16 March 2006" "[email protected]" "SELinux managent API documentation" |
| 2 |
|
| 3 |
.SH "NAME" |
| 4 |
semanage_list \- SELinux Lists Management API |
| 5 |
|
| 6 |
.SH "SYNOPSIS" |
| 7 |
The following list function is supported for any SELinux managent record. |
| 8 |
.br |
| 9 |
Replace the function and object name as necessary. |
| 10 |
|
| 11 |
.B extern int LIST_FUNCTION ( |
| 12 |
.br |
| 13 |
.BI " semanage_handle_t *" handle "," |
| 14 |
.br |
| 15 |
.BI " semanage_OBJECT_t ***" objects "," |
| 16 |
.br |
| 17 |
.BI " unsigned int* " count ");" |
| 18 |
|
| 19 |
.SH "DESCRIPTION" |
| 20 |
.TP |
| 21 |
.B Behavior: |
| 22 |
The list function will return an array of all the objects in the selected location. |
| 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 function will allocate and populate the array of objects, and store it at the location pointed by |
| 29 |
.I objects. |
| 30 |
It will write the number of objects at the location pointed by |
| 31 |
.I count. |
| 32 |
The array, and all its objects become property of the caller. Each object must be freed with |
| 33 |
.B semanage_OBJECT_free. |
| 34 |
|
| 35 |
.TP |
| 36 |
.B Requirements: |
| 37 |
This function requires an semanage connection to be established (see |
| 38 |
.BR semanage_connect "(3)" |
| 39 |
) |
| 40 |
|
| 41 |
.SH "RETURN VALUE" |
| 42 |
In case of failure, \-1 is returned, and the semanage error callback is invoked, describing the error. |
| 43 |
Otherwise a non-negative integer is returned (a commit number). The same number will be returned by all other semanage object read calls until the next commit. |
| 44 |
|
| 45 |
.SH "SEE ALSO" |
| 46 |
.BR semanage_handle_create "(3), " semanage_connect "(3), " |