diff mbox series

libselinux: drop error return from is_selinux_enabled documentation

Message ID 20200214184751.8211-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Headers show
Series libselinux: drop error return from is_selinux_enabled documentation | expand

Commit Message

Christian Göttsche Feb. 14, 2020, 6:47 p.m. UTC
Since commit e3cab998b48ab293a9962faf9779d70ca339c65d ("libselinux
mountpoint changing patch.") for version 20120216 is_selinux_enabled()
does never return -1; drop mentions in the man-page and header file.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libselinux/include/selinux/selinux.h     | 2 +-
 libselinux/man/man3/is_selinux_enabled.3 | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Stephen Smalley Feb. 14, 2020, 7:42 p.m. UTC | #1
On 2/14/20 1:47 PM, Christian Göttsche wrote:
> Since commit e3cab998b48ab293a9962faf9779d70ca339c65d ("libselinux
> mountpoint changing patch.") for version 20120216 is_selinux_enabled()
> does never return -1; drop mentions in the man-page and header file.
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

> ---
>   libselinux/include/selinux/selinux.h     | 2 +-
>   libselinux/man/man3/is_selinux_enabled.3 | 1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
> index 7922d96b..883d8b85 100644
> --- a/libselinux/include/selinux/selinux.h
> +++ b/libselinux/include/selinux/selinux.h
> @@ -8,7 +8,7 @@
>   extern "C" {
>   #endif
>   
> -/* Return 1 if we are running on a SELinux kernel, or 0 if not or -1 if we get an error. */
> +/* Return 1 if we are running on a SELinux kernel, or 0 otherwise. */
>   extern int is_selinux_enabled(void);
>   /* Return 1 if we are running on a SELinux MLS kernel, or 0 otherwise. */
>   extern int is_selinux_mls_enabled(void);
> diff --git a/libselinux/man/man3/is_selinux_enabled.3 b/libselinux/man/man3/is_selinux_enabled.3
> index df62c225..a887b48c 100644
> --- a/libselinux/man/man3/is_selinux_enabled.3
> +++ b/libselinux/man/man3/is_selinux_enabled.3
> @@ -15,7 +15,6 @@ is_selinux_mls_enabled \- check whether SELinux is enabled for (Multi Level Secu
>   .SH "DESCRIPTION"
>   .BR is_selinux_enabled ()
>   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 capable of running in MLS mode or 0 if it is not. To
>
Stephen Smalley Feb. 18, 2020, 3:41 p.m. UTC | #2
On 2/14/20 2:42 PM, Stephen Smalley wrote:
> On 2/14/20 1:47 PM, Christian Göttsche wrote:
>> Since commit e3cab998b48ab293a9962faf9779d70ca339c65d ("libselinux
>> mountpoint changing patch.") for version 20120216 is_selinux_enabled()
>> does never return -1; drop mentions in the man-page and header file.
>>
>> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> 
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

Thanks, applied.
diff mbox series

Patch

diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
index 7922d96b..883d8b85 100644
--- a/libselinux/include/selinux/selinux.h
+++ b/libselinux/include/selinux/selinux.h
@@ -8,7 +8,7 @@ 
 extern "C" {
 #endif
 
-/* Return 1 if we are running on a SELinux kernel, or 0 if not or -1 if we get an error. */
+/* Return 1 if we are running on a SELinux kernel, or 0 otherwise. */
 extern int is_selinux_enabled(void);
 /* Return 1 if we are running on a SELinux MLS kernel, or 0 otherwise. */
 extern int is_selinux_mls_enabled(void);
diff --git a/libselinux/man/man3/is_selinux_enabled.3 b/libselinux/man/man3/is_selinux_enabled.3
index df62c225..a887b48c 100644
--- a/libselinux/man/man3/is_selinux_enabled.3
+++ b/libselinux/man/man3/is_selinux_enabled.3
@@ -15,7 +15,6 @@  is_selinux_mls_enabled \- check whether SELinux is enabled for (Multi Level Secu
 .SH "DESCRIPTION"
 .BR is_selinux_enabled ()
 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 capable of running in MLS mode or 0 if it is not. To