diff mbox

[5/5] libselinux: fix argument order in get_default_context_with_rolelevel() doc

Message ID 20170115130359.6108-5-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nicolas Iooss Jan. 15, 2017, 1:03 p.m. UTC
libselinux/src/get_context_list.c defines

    get_default_context_with_rolelevel(user, role, level...

libselinux/utils/getdefaultcon.c uses

    get_default_context_with_rolelevel(seuser, role, level...

but libselinux/include/selinux/get_context_list.h declares

    get_default_context_with_rolelevel(user, level, role...

and libselinux/man/man3/get_ordered_context_list.3 follows this
declaration.

Fix the header and the man page.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libselinux/include/selinux/get_context_list.h  | 2 +-
 libselinux/man/man3/get_ordered_context_list.3 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stephen Smalley Jan. 19, 2017, 4:57 p.m. UTC | #1
On Sun, 2017-01-15 at 14:03 +0100, Nicolas Iooss wrote:
> libselinux/src/get_context_list.c defines
> 
>     get_default_context_with_rolelevel(user, role, level...
> 
> libselinux/utils/getdefaultcon.c uses
> 
>     get_default_context_with_rolelevel(seuser, role, level...
> 
> but libselinux/include/selinux/get_context_list.h declares
> 
>     get_default_context_with_rolelevel(user, level, role...
> 
> and libselinux/man/man3/get_ordered_context_list.3 follows this
> declaration.
> 
> Fix the header and the man page.

Thanks, applied all 5 patches.

> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
>  libselinux/include/selinux/get_context_list.h  | 2 +-
>  libselinux/man/man3/get_ordered_context_list.3 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libselinux/include/selinux/get_context_list.h
> b/libselinux/include/selinux/get_context_list.h
> index 8bd8f99d004c..a15b9c4ec34e 100644
> --- a/libselinux/include/selinux/get_context_list.h
> +++ b/libselinux/include/selinux/get_context_list.h
> @@ -57,8 +57,8 @@ extern "C" {
>     that has the specified role and level.  If no reachable context
> exists
>     for the user with that role, then return -1. */
>  	int get_default_context_with_rolelevel(const char *user,
> -					       const char *level,
>  					       const char *role,
> +					       const char *level,
>  					       char * fromcon,
>  					       char ** newcon);
>  
> diff --git a/libselinux/man/man3/get_ordered_context_list.3
> b/libselinux/man/man3/get_ordered_context_list.3
> index 8de90b744c72..e084da406af1 100644
> --- a/libselinux/man/man3/get_ordered_context_list.3
> +++ b/libselinux/man/man3/get_ordered_context_list.3
> @@ -17,7 +17,7 @@ get_ordered_context_list,
> get_ordered_context_list_with_level, get_default_conte
>  .sp
>  .BI "int get_default_context_with_role(const char *" user ", const
> char *" role ", char *" fromcon ", char **" newcon ");
>  .sp
> -.BI "int get_default_context_with_rolelevel(const char *" user ",
> const char *" level ", const char *" role ", char *" fromcon ", char
> **" newcon ");
> +.BI "int get_default_context_with_rolelevel(const char *" user ",
> const char *" role ", const char *" level ", char *" fromcon ", char
> **" newcon ");
>  .sp
>  .BI "int query_user_context(char **" list ", char **" newcon );
>  .sp
diff mbox

Patch

diff --git a/libselinux/include/selinux/get_context_list.h b/libselinux/include/selinux/get_context_list.h
index 8bd8f99d004c..a15b9c4ec34e 100644
--- a/libselinux/include/selinux/get_context_list.h
+++ b/libselinux/include/selinux/get_context_list.h
@@ -57,8 +57,8 @@  extern "C" {
    that has the specified role and level.  If no reachable context exists
    for the user with that role, then return -1. */
 	int get_default_context_with_rolelevel(const char *user,
-					       const char *level,
 					       const char *role,
+					       const char *level,
 					       char * fromcon,
 					       char ** newcon);
 
diff --git a/libselinux/man/man3/get_ordered_context_list.3 b/libselinux/man/man3/get_ordered_context_list.3
index 8de90b744c72..e084da406af1 100644
--- a/libselinux/man/man3/get_ordered_context_list.3
+++ b/libselinux/man/man3/get_ordered_context_list.3
@@ -17,7 +17,7 @@  get_ordered_context_list, get_ordered_context_list_with_level, get_default_conte
 .sp
 .BI "int get_default_context_with_role(const char *" user ", const char *" role ", char *" fromcon ", char **" newcon ");
 .sp
-.BI "int get_default_context_with_rolelevel(const char *" user ", const char *" level ", const char *" role ", char *" fromcon ", char **" newcon ");
+.BI "int get_default_context_with_rolelevel(const char *" user ", const char *" role ", const char *" level ", char *" fromcon ", char **" newcon ");
 .sp
 .BI "int query_user_context(char **" list ", char **" newcon );
 .sp