From adc79eb002951f3c91bb52db3190dd11e5e558a4 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 3 Aug 2019 00:43:19 +0200 Subject: [PATCH 1/3] Prints the node name when failing to find security directory Also quotes directory, node_name and lookup strategy in error message for readability Signed-off-by: Mikael Arguedas --- rcl/src/rcl/security_directory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rcl/src/rcl/security_directory.c b/rcl/src/rcl/security_directory.c index 6e7d9f54e..3a1b37cd5 100644 --- a/rcl/src/rcl/security_directory.c +++ b/rcl/src/rcl/security_directory.c @@ -247,12 +247,12 @@ char * rcl_get_secure_root( // Check node_secure_root is not NULL before checking directory if (NULL == node_secure_root) { RCL_SET_ERROR_MSG_WITH_FORMAT_STRING( - "SECURITY ERROR: unable to find a folder matching the node name in %s%s." - "Lookup strategy: %s", - ros_secure_root_env, node_namespace, lookup_strategy); + "SECURITY ERROR: unable to find a folder matching the node name '%s' in '%s%s'.\n" + "Lookup strategy: '%s'", + node_name, ros_secure_root_env, node_namespace, lookup_strategy); } else { RCL_SET_ERROR_MSG_WITH_FORMAT_STRING( - "SECURITY ERROR: directory %s does not exist. Lookup strategy: %s", + "SECURITY ERROR: directory '%s' does not exist. Lookup strategy: '%s'", node_secure_root, lookup_strategy); } allocator->deallocate(ros_secure_root_env, allocator->state); From 129a2cd5f42b377f4565a5805a400b3fa3d2e6f2 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 3 Aug 2019 01:06:39 +0200 Subject: [PATCH 2/3] don't quote lookup strategy Signed-off-by: Mikael Arguedas --- rcl/src/rcl/security_directory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcl/src/rcl/security_directory.c b/rcl/src/rcl/security_directory.c index 3a1b37cd5..6fe4683a3 100644 --- a/rcl/src/rcl/security_directory.c +++ b/rcl/src/rcl/security_directory.c @@ -248,11 +248,11 @@ char * rcl_get_secure_root( if (NULL == node_secure_root) { RCL_SET_ERROR_MSG_WITH_FORMAT_STRING( "SECURITY ERROR: unable to find a folder matching the node name '%s' in '%s%s'.\n" - "Lookup strategy: '%s'", + "Lookup strategy: %s", node_name, ros_secure_root_env, node_namespace, lookup_strategy); } else { RCL_SET_ERROR_MSG_WITH_FORMAT_STRING( - "SECURITY ERROR: directory '%s' does not exist. Lookup strategy: '%s'", + "SECURITY ERROR: directory '%s' does not exist. Lookup strategy: %s", node_secure_root, lookup_strategy); } allocator->deallocate(ros_secure_root_env, allocator->state); From b6269f2f78cf3d8eec96082b290e74c7af658a29 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 3 Aug 2019 01:32:35 +0200 Subject: [PATCH 3/3] newline -> whitespace Signed-off-by: Mikael Arguedas --- rcl/src/rcl/security_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcl/src/rcl/security_directory.c b/rcl/src/rcl/security_directory.c index 6fe4683a3..b4e0fdb6a 100644 --- a/rcl/src/rcl/security_directory.c +++ b/rcl/src/rcl/security_directory.c @@ -247,7 +247,7 @@ char * rcl_get_secure_root( // Check node_secure_root is not NULL before checking directory if (NULL == node_secure_root) { RCL_SET_ERROR_MSG_WITH_FORMAT_STRING( - "SECURITY ERROR: unable to find a folder matching the node name '%s' in '%s%s'.\n" + "SECURITY ERROR: unable to find a folder matching the node name '%s' in '%s%s'. " "Lookup strategy: %s", node_name, ros_secure_root_env, node_namespace, lookup_strategy); } else {