From d7a0ccdcd6a548aa078d0088152932697a22307e Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Wed, 18 Dec 2019 16:59:35 -0300 Subject: [PATCH 1/6] Rename rmw_security_options_t Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 38db44e6..3e91748a 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -191,7 +191,7 @@ RMW_INTERFACE_FN( rmw_create_node, rmw_node_t *, nullptr, 6, ARG_TYPES( - rmw_context_t *, const char *, const char *, size_t, const rmw_node_security_options_t *, + rmw_context_t *, const char *, const char *, size_t, const rmw_security_options_t *, bool)) RMW_INTERFACE_FN( From c760d4c85c9771d638917ab5b76c660e47e5a1ce Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Fri, 24 Jan 2020 14:29:39 -0300 Subject: [PATCH 2/6] Add rmw_use_node_name_in_security_directory_lookup function Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 3e91748a..abff6ebc 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -32,6 +32,7 @@ #include "rmw/get_topic_endpoint_info.h" #include "rmw/get_topic_names_and_types.h" #include "rmw/rmw.h" +#include "rmw/security.h" #define STRINGIFY_(s) #s #define STRINGIFY(s) STRINGIFY_(s) @@ -567,6 +568,10 @@ RMW_INTERFACE_FN( bool, rmw_topic_endpoint_info_array_t *)) +RMW_INTERFACE_FN(rmw_use_node_name_in_security_directory_lookup, + bool, true, + 0, ARG_TYPES(void)) + #define GET_SYMBOL(x) symbol_ ## x = get_symbol(#x); void prefetch_symbols(void) @@ -644,6 +649,7 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_set_log_severity) GET_SYMBOL(rmw_get_publishers_info_by_topic) GET_SYMBOL(rmw_get_subscriptions_info_by_topic) + GET_SYMBOL(rmw_use_node_name_in_security_directory_lookup) } void * symbol_rmw_init = nullptr; From d549cddbcd715511cb8c94ee0295468889cbfa03 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Mon, 2 Mar 2020 09:09:09 -0300 Subject: [PATCH 3/6] Please uncrustify Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index abff6ebc..ed532c3c 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -568,7 +568,8 @@ RMW_INTERFACE_FN( bool, rmw_topic_endpoint_info_array_t *)) -RMW_INTERFACE_FN(rmw_use_node_name_in_security_directory_lookup, +RMW_INTERFACE_FN( + rmw_use_node_name_in_security_directory_lookup, bool, true, 0, ARG_TYPES(void)) From c2044a452434bc091357eb6393df27468b11a59f Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Fri, 13 Mar 2020 13:43:08 -0300 Subject: [PATCH 4/6] Changes after last update about sros2 Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index ed532c3c..68b70764 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -191,9 +191,8 @@ RMW_INTERFACE_FN( RMW_INTERFACE_FN( rmw_create_node, rmw_node_t *, nullptr, - 6, ARG_TYPES( - rmw_context_t *, const char *, const char *, size_t, const rmw_security_options_t *, - bool)) + 5, ARG_TYPES( + rmw_context_t *, const char *, const char *, size_t, bool)) RMW_INTERFACE_FN( rmw_destroy_node, @@ -518,6 +517,13 @@ RMW_INTERFACE_FN( rmw_ret_t, RMW_RET_ERROR, 3, ARG_TYPES(const rmw_node_t *, rcutils_string_array_t *, rcutils_string_array_t *)) +RMW_INTERFACE_FN( + rmw_get_node_names_with_context_names, + rmw_ret_t, RMW_RET_ERROR, + 4, ARG_TYPES( + const rmw_node_t *, rcutils_string_array_t *, + rcutils_string_array_t *, rcutils_string_array_t *)) + RMW_INTERFACE_FN( rmw_count_publishers, rmw_ret_t, RMW_RET_ERROR, From 0d9ba2cb8f840feb3c39df93b0d5fd52b9090625 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Fri, 13 Mar 2020 15:11:58 -0300 Subject: [PATCH 5/6] Delete unused function Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 68b70764..83b456d8 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -32,7 +32,6 @@ #include "rmw/get_topic_endpoint_info.h" #include "rmw/get_topic_names_and_types.h" #include "rmw/rmw.h" -#include "rmw/security.h" #define STRINGIFY_(s) #s #define STRINGIFY(s) STRINGIFY_(s) @@ -574,11 +573,6 @@ RMW_INTERFACE_FN( bool, rmw_topic_endpoint_info_array_t *)) -RMW_INTERFACE_FN( - rmw_use_node_name_in_security_directory_lookup, - bool, true, - 0, ARG_TYPES(void)) - #define GET_SYMBOL(x) symbol_ ## x = get_symbol(#x); void prefetch_symbols(void) @@ -648,6 +642,7 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_get_topic_names_and_types) GET_SYMBOL(rmw_get_service_names_and_types) GET_SYMBOL(rmw_get_node_names) + GET_SYMBOL(rmw_get_node_names_with_context_names) GET_SYMBOL(rmw_count_publishers) GET_SYMBOL(rmw_count_subscribers) GET_SYMBOL(rmw_get_gid_for_publisher) @@ -656,7 +651,6 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_set_log_severity) GET_SYMBOL(rmw_get_publishers_info_by_topic) GET_SYMBOL(rmw_get_subscriptions_info_by_topic) - GET_SYMBOL(rmw_use_node_name_in_security_directory_lookup) } void * symbol_rmw_init = nullptr; From 1ff2c426c4c10158f56be0ee0b6156adec1d77e0 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Tue, 17 Mar 2020 10:53:53 -0300 Subject: [PATCH 6/6] Naming: replace context_name with security_context Signed-off-by: Ivan Santiago Paunovic --- rmw_implementation/src/functions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 83b456d8..c6cfbccc 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -517,7 +517,7 @@ RMW_INTERFACE_FN( 3, ARG_TYPES(const rmw_node_t *, rcutils_string_array_t *, rcutils_string_array_t *)) RMW_INTERFACE_FN( - rmw_get_node_names_with_context_names, + rmw_get_node_names_with_security_contexts, rmw_ret_t, RMW_RET_ERROR, 4, ARG_TYPES( const rmw_node_t *, rcutils_string_array_t *, @@ -642,7 +642,7 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_get_topic_names_and_types) GET_SYMBOL(rmw_get_service_names_and_types) GET_SYMBOL(rmw_get_node_names) - GET_SYMBOL(rmw_get_node_names_with_context_names) + GET_SYMBOL(rmw_get_node_names_with_security_contexts) GET_SYMBOL(rmw_count_publishers) GET_SYMBOL(rmw_count_subscribers) GET_SYMBOL(rmw_get_gid_for_publisher)