libselinux: add man page redirections
PATCH 1/4 libselinux: add man page redirections
The following interfaces are documented but do not have a redirection:
- context_str(3)
- security_get_checkreqprot(3)
- security_set_boolean_list(3)
- selinux_sepgsql_context_path(3)
- setexecfilecon(3)
--- libselinux/man/man3/context_str.3 | 1 + libselinux/man/man3/security_get_checkreqprot.3 | 1 + libselinux/man/man3/security_set_boolean_list.3 | 1 + libselinux/man/man3/selinux_sepgsql_context_path.3 | 1 + libselinux/man/man3/setexecfilecon.3 | 1 + 5 files changed, 5 insertions(+) create mode 100644 libselinux/man/man3/context_str.3 create mode 100644 libselinux/man/man3/security_get_checkreqprot.3 create mode 100644 libselinux/man/man3/security_set_boolean_list.3 create mode 100644 libselinux/man/man3/selinux_sepgsql_context_path.3 create mode 100644 libselinux/man/man3/setexecfilecon.3
libselinux/man/man3/context_str.3 new file +1 -0
@@ -0,0 +1 @@ +.so man3/context_new.3
libselinux/man/man3/security_get_checkreqprot.3 new file +1 -0
@@ -0,0 +1 @@ +.so man3/security_getenforce.3
libselinux/man/man3/security_set_boolean_list.3 new file +1 -0
@@ -0,0 +1 @@ +.so man3/security_load_booleans.3
libselinux/man/man3/selinux_sepgsql_context_path.3 new file +1 -0
@@ -0,0 +1 @@ +.so man3/selinux_binary_policy_path.3
libselinux/man/man3/setexecfilecon.3 new file +1 -0
@@ -0,0 +1 @@ +.so man3/getexeccon.3
Signature · 1 line
2.36.1
PATCH 2/4 libselinux: enclose macro definition in parenthesis
Avoid potential precedence issues.
--- libselinux/include/selinux/avc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/include/selinux/avc.h +1 -1
@@ -24,7 +24,7 @@ struct security_id { };typedef struct security_id *security_id_t ; -#define SECSID_WILD (security_id_t)NULL/* unspecified SID */ +#define SECSID_WILD ((security_id_t)NULL)/* unspecified SID */ /** * avc_sid_to_context - get copy of context corresponding to SID.
Signature · 1 line
2.36.1
PATCH 3/4 libselinux: name parameters in context.h
In reply to Christian Göttsche--- libselinux/include/selinux/context.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
libselinux/include/selinux/context.h +11 -11
@@ -17,7 +17,7 @@ extern "C" {/* Return a new context initialized to a context string */ -extern context_t context_new (const char *); +extern context_t context_new (const char *str);/* * Return a pointer to the string value of the context_t
@@ -25,24 +25,24 @@ extern "C" {* for the same context_t* */ -extern char *context_str (context_t ); +extern char *context_str (context_t con);/* Free the storage used by a context */ -extern void context_free (context_t ); +extern void context_free (context_t con);/* Get a pointer to the string value of a context component */ -extern const char *context_type_get (context_t ); -extern const char *context_range_get (context_t ); -extern const char *context_role_get (context_t ); -extern const char *context_user_get (context_t ); +extern const char *context_type_get (context_t con); +extern const char *context_range_get (context_t con); +extern const char *context_role_get (context_t con); +extern const char *context_user_get (context_t con);/* Set a context component. Returns nonzero if unsuccessful */ -extern int context_type_set (context_t ,const char *); -extern int context_range_set (context_t ,const char *); -extern int context_role_set (context_t ,const char *); -extern int context_user_set (context_t ,const char *); +extern int context_type_set (context_t con,const char *type); +extern int context_range_set (context_t con,const char *range); +extern int context_role_set (context_t con,const char *role); +extern int context_user_set (context_t con,const char *user); #ifdef __cplusplus }
Signature · 1 line
2.36.1
PATCH v2 3/4 libselinux: name parameters in context.h
---
v2:
- Rebase on top of dd98fa32 ("libselinux: declare return value of
context_str(3) const") --- libselinux/include/selinux/context.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
libselinux/include/selinux/context.h +11 -11
@@ -17,7 +17,7 @@ extern "C" {/* Return a new context initialized to a context string */ -extern context_t context_new (const char *); +extern context_t context_new (const char *str);/* * Return a pointer to the string value of the context_t
@@ -25,24 +25,24 @@ extern "C" {* for the same context_t* */ -extern const char *context_str (context_t ); +extern const char *context_str (context_t con);/* Free the storage used by a context */ -extern void context_free (context_t ); +extern void context_free (context_t con);/* Get a pointer to the string value of a context component */ -extern const char *context_type_get (context_t ); -extern const char *context_range_get (context_t ); -extern const char *context_role_get (context_t ); -extern const char *context_user_get (context_t ); +extern const char *context_type_get (context_t con); +extern const char *context_range_get (context_t con); +extern const char *context_role_get (context_t con); +extern const char *context_user_get (context_t con);/* Set a context component. Returns nonzero if unsuccessful */ -extern int context_type_set (context_t ,const char *); -extern int context_range_set (context_t ,const char *); -extern int context_role_set (context_t ,const char *); -extern int context_user_set (context_t ,const char *); +extern int context_type_set (context_t con,const char *type); +extern int context_range_set (context_t con,const char *range); +extern int context_role_set (context_t con,const char *role); +extern int context_user_set (context_t con,const char *user); #ifdef __cplusplus }
Signature · 1 line
2.36.1
PATCH 4/4 libselinux: declare parameter of security_load_policy(3) const
In reply to Christian Göttschesecurity_load_policy(3) takes a read-only memory address for a binary policy to be loaded.
--- libselinux/include/selinux/selinux.h | 2 +- libselinux/man/man3/security_load_policy.3 | 2 +- libselinux/src/load_policy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
libselinux/include/selinux/selinux.h +1 -1
@@ -279,7 +279,7 @@ extern int security_validatetrans_raw(const char *scon, const char *newcon);/* Load a policy configuration. */ -extern int security_load_policy (void *data,size_t len); +extern int security_load_policy (const void *data,size_t len);/* Get the context of an initial kernel security identifier by name. Caller must free via freecon */
libselinux/man/man3/security_load_policy.3 +1 -1
@@ -5,7 +5,7 @@ security_load_policy \- load a new SELinux policy .SH "SYNOPSIS" .B #include <selinux/selinux.h> .sp -.BI "int security_load_policy(void *" data ", size_t "len ); +.BI "int security_load_policy(const void *" data ", size_t "len ); .sp .BI "int selinux_mkload_policy(int " preservebools ");" .sp
libselinux/src/load_policy.c +1 -1
@@ -23,7 +23,7 @@#define MNT_DETACH 2#endif -int security_load_policy (void *data,size_t len) +int security_load_policy (const void *data,size_t len) {char path[PATH_MAX ];int fd, ret;
Signature · 1 line
2.36.1
Quoted 10 lines · Christian Göttsche
The following interfaces are documented but do not have a redirection:
-
context_str(3)
-security_get_checkreqprot(3)
-security_set_boolean_list(3)
-selinux_sepgsql_context_path(3)
- setexecfilecon(3)Signed-off-by Christian Göttsche <[email protected]>
For these four patches:
Quoted 51 lines
--- libselinux/man/man3/context_str.3 | 1 + libselinux/man/man3/security_get_checkreqprot.3 | 1 + libselinux/man/man3/security_set_boolean_list.3 | 1 + libselinux/man/man3/selinux_sepgsql_context_path.3 | 1 + libselinux/man/man3/setexecfilecon.3 | 1 + 5 files changed, 5 insertions(+) create mode 100644 libselinux/man/man3/context_str.3 create mode 100644 libselinux/man/man3/security_get_checkreqprot.3 create mode 100644 libselinux/man/man3/security_set_boolean_list.3 create mode 100644 libselinux/man/man3/selinux_sepgsql_context_path.3 create mode 100644 libselinux/man/man3/setexecfilecon.3libselinux/man/man3/context_str.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/context_new.3libselinux/man/man3/security_get_checkreqprot.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/security_getenforce.3libselinux/man/man3/security_set_boolean_list.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/security_load_booleans.3libselinux/man/man3/selinux_sepgsql_context_path.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/selinux_binary_policy_path.3libselinux/man/man3/setexecfilecon.3 new file +1
-1@@ -0,0 +1 @@ +.so man3/getexeccon.3 --2.36.1
Quoted 12 lines · James Carter
Quoted 9 lines · Christian Göttsche
The following interfaces are documented but do not have a redirection:
-
context_str(3)
-security_get_checkreqprot(3)
-security_set_boolean_list(3)
-selinux_sepgsql_context_path(3)
- setexecfilecon(3)
Quoted 5 lines
Quoted 1 line
Signed-off-by Christian Göttsche <[email protected]>For these four patches:
Acked-by James Carter <[email protected]>
This series has been merged.
Thanks,
Jim
Quoted 51 lines
Quoted 51 lines
--- libselinux/man/man3/context_str.3 | 1 + libselinux/man/man3/security_get_checkreqprot.3 | 1 + libselinux/man/man3/security_set_boolean_list.3 | 1 + libselinux/man/man3/selinux_sepgsql_context_path.3 | 1 + libselinux/man/man3/setexecfilecon.3 | 1 + 5 files changed, 5 insertions(+) create mode 100644 libselinux/man/man3/context_str.3 create mode 100644 libselinux/man/man3/security_get_checkreqprot.3 create mode 100644 libselinux/man/man3/security_set_boolean_list.3 create mode 100644 libselinux/man/man3/selinux_sepgsql_context_path.3 create mode 100644 libselinux/man/man3/setexecfilecon.3libselinux/man/man3/context_str.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/context_new.3libselinux/man/man3/security_get_checkreqprot.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/security_getenforce.3libselinux/man/man3/security_set_boolean_list.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/security_load_booleans.3libselinux/man/man3/selinux_sepgsql_context_path.3 new file +1
-0@@ -0,0 +1 @@ +.so man3/selinux_binary_policy_path.3libselinux/man/man3/setexecfilecon.3 new file +1
-1@@ -0,0 +1 @@ +.so man3/getexeccon.3 --2.36.1