Skip to contentSkip to conversation

libselinux: man: Explain how to free policy type from selinux_getpolicytype()

PATCH Applied Petr Lautrbach 2 participants 3 messages Jun 20, 2016 – Jun 23, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libselinux: man: Explain how to free policy type from selinux_getpolicytype()

From: David King <[email protected]>

Additionally, fix a typo.

---
 libselinux/man/man3/selinux_getpolicytype.3 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
libselinux/man/man3/selinux_getpolicytype.3 +4 -1
index c947e2c..b219d42 100644
@@ -13,7 +13,10 @@ Reads the contents of the
 .I /etc/selinux/config
 file to determine the SELinux policy used on the system, and sets
 .I \%policytype
-accordinly.
+accordingly. Free
+.I \%policytype
+with
+.BR free (3).
 .
 .SH "RETURN VALUE"
 On success, zero is returned.
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 libselinux: man: Clarify is_selinux_mls_enabled() description

From: David King <[email protected]>

Improve the description by mentioning that if is_selinux_mls_enabled(), it simply means that the kernel has MLS support and the policy contains MLS features. To check whether MLS support is enabled on the running system, use selinux_getpolicytype().

---
 libselinux/man/man3/is_selinux_enabled.3 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
libselinux/man/man3/is_selinux_enabled.3 +3 -1
index b2df562..df62c22 100644
@@ -18,7 +18,9 @@ returns 1 if SELinux is running or 0 if it is not.
 On error, \-1 is returned.
 
 .BR is_selinux_mls_enabled ()
-returns 1 if SELinux is running in MLS mode or 0 if it is not. 
+returns 1 if SELinux is capable of running in MLS mode or 0 if it is not. To
+determine the policy in use on the system, use
+.BR selinux_getpolicytype (3).
 .
 .SH "SEE ALSO"
 .BR selinux "(8)"
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 2/2] libselinux: man: Clarify is_selinux_mls_enabled() description

Quoted 8 lines · Petr Lautrbach

From: David King <[email protected]>

Improve the description by mentioning that if is_selinux_mls_enabled(), it simply means that the kernel has MLS support and the policy contains MLS features. To check whether MLS support is enabled on the running system, use selinux_getpolicytype().

Thanks, applied both.

Quoted 20 lines
---
 libselinux/man/man3/is_selinux_enabled.3 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
libselinux/man/man3/is_selinux_enabled.3 +3 -1
index b2df562..df62c22 100644
@@ -18,7 +18,9 @@ returns 1 if SELinux is running or 0 if it is not.
 On error, \-1 is returned.
 
 .BR is_selinux_mls_enabled ()
-returns 1 if SELinux is running in MLS mode or 0 if it is not. 
+returns 1 if SELinux is capable of running in MLS mode or 0 if it is not. To
+determine the policy in use on the system, use
+.BR selinux_getpolicytype (3).
 .
 .SH "SEE ALSO"
 .BR selinux "(8)"