Skip to content

Commit

Permalink
make pr ready for ros2cli security feature (ros2#1)
Browse files Browse the repository at this point in the history
* update docs about possibility of rcl_take no taking (ros2#356)

* update rcl_wait doc with respect to subs and possibility of failing takes

* add a note about possible failing takes in rcl_take docs

* 0.6.2

* Set rmw_wait timeout using ros timers too (ros2#357)

* 0.6.3

* Avoid timer period being set to 0 (ros2#359)

* Fix logic that moves goal handles when one expires (ros2#360)

* Fix error from uncrustify v0.68 (ros2#364)

* Ensure that context instance id storage is aligned correctly (ros2#365)

* Ensure that context instance id storage is aligned correctly

* Make alignment compatible with MSVC

* Namespace alignment macro with RCL_

* [rcl] Guard against bad allocation calling rcl_arguments_copy() (ros2#367)

* [rcl] Add test for copying arguments struct with no arguments

* Override allocate function in test to reveal bug

* [rcl] Only allocate arrays if there are things to copy in rcl_argument_copy()

Also guard against freeing invalid pointers if rcl_argument_copy() fails.

* Remove uncessary guard against NULL pointer

* linter, styles, uncrustify fixes

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
  • Loading branch information
xabxx authored and Emerson Knapp committed Feb 13, 2019
1 parent 435ad08 commit fd0fbda
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 252 deletions.
18 changes: 10 additions & 8 deletions rcl/include/rcl/security_directory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
#ifndef RCL__SECURITY_DIRECTORY_H_
#define RCL__SECURITY_DIRECTORY_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "rcl/allocator.h"
#include "rcl/visibility_control.h"

#ifndef ROS_SECURITY_NODE_DIRECTORY_VAR_NAME
#define ROS_SECURITY_NODE_DIRECTORY_VAR_NAME "ROS_SECURITY_NODE_DIRECTORY"
Expand All @@ -29,11 +35,6 @@
#define ROS_SECURITY_LOOKUP_TYPE_VAR_NAME "ROS_SECURITY_LOOKUP_TYPE"
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/// Return the secure root directory associated with a node given its validated name and namespace.
/**
* E.g. for a node named "c" in namespace "/a/b", the secure root path will be
Expand All @@ -50,10 +51,11 @@ extern "C"
* \param[in] allocator the allocator to use for allocation
* \returns machine specific (absolute) node secure root path or NULL on failure
*/
RCL_PUBLIC
const char * rcl_get_secure_root(
const char * node_name,
const char * node_namespace,
const rcl_allocator_t * allocator
const char * node_name,
const char * node_namespace,
const rcl_allocator_t * allocator
);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit fd0fbda

Please sign in to comment.