mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-24 15:02:44 +00:00
libselinux: copy the reason why selinux_status_open() returns 1
The function comment of selinux_status_open() states: It returns 0 on success, or -1 on error. However the implementation of this function can also return 1. This is documented in its manpage (libselinux/man/man3/selinux_status_open.3) as intended. Copy the reason near the function definition in order to make the code more auditable. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
0bcaba30d7
commit
164f437b19
@ -250,7 +250,9 @@ static int fallback_cb_policyload(int policyload)
|
||||
* Since Linux 2.6.37 or later supports this feature, we may run
|
||||
* fallback routine using a netlink socket on older kernels, if
|
||||
* the supplied `fallback' is not zero.
|
||||
* It returns 0 on success, or -1 on error.
|
||||
* It returns 0 on success, -1 on error or 1 when we are ready to
|
||||
* use these interfaces, but netlink socket was opened as fallback
|
||||
* instead of the kernel status page.
|
||||
*/
|
||||
int selinux_status_open(int fallback)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user