| 1 |
.TH "selinux_policy_root" "3" "25 May 2004" "[email protected]" "SELinux API documentation" |
| 2 |
.SH "NAME" |
| 3 |
selinux_policy_root \- return the path of the SELinux policy files for this machine |
| 4 |
selinux_set_policy_root \- Set an alternate SELinux root path for the SELinux policy files for this machine. |
| 5 |
. |
| 6 |
.SH "SYNOPSIS" |
| 7 |
.B #include <selinux/selinux.h> |
| 8 |
.sp |
| 9 |
.B const char *selinux_policy_root(void); |
| 10 |
. |
| 11 |
.sp |
| 12 |
.B int selinux_set_policy_root(const char *policypath); |
| 13 |
. |
| 14 |
.SH "DESCRIPTION" |
| 15 |
.BR selinux_policy_root () |
| 16 |
reads the contents of the |
| 17 |
.I /etc/selinux/config |
| 18 |
file to determine which policy files should be used for this machine. |
| 19 |
. |
| 20 |
.BR selinux_set_policy_root () |
| 21 |
sets up all policy paths based on the alternate root |
| 22 |
|
| 23 |
.I /etc/selinux/config |
| 24 |
file to determine which policy files should be used for this machine. |
| 25 |
. |
| 26 |
.SH "RETURN VALUE" |
| 27 |
On success, selinux_policy_root returns a directory path containing the SELinux policy files. |
| 28 |
On failure, selinux_policy_root returns NULL. |
| 29 |
|
| 30 |
On success, selinux_set_policy_root returns 0 on success -1 on failure. |
| 31 |
|
| 32 |
. |
| 33 |
.SH "SEE ALSO" |
| 34 |
.BR selinux "(8)" |