Go to the source code of this file.
|
char * | rcl_get_secure_root (const char *node_name, const char *node_namespace, const rcl_allocator_t *allocator) |
| Return the secure root directory associated with a node given its validated name and namespace. More...
|
|
◆ ROS_SECURITY_NODE_DIRECTORY_VAR_NAME
#define ROS_SECURITY_NODE_DIRECTORY_VAR_NAME "ROS_SECURITY_NODE_DIRECTORY" |
◆ ROS_SECURITY_ROOT_DIRECTORY_VAR_NAME
#define ROS_SECURITY_ROOT_DIRECTORY_VAR_NAME "ROS_SECURITY_ROOT_DIRECTORY" |
◆ ROS_SECURITY_LOOKUP_TYPE_VAR_NAME
#define ROS_SECURITY_LOOKUP_TYPE_VAR_NAME "ROS_SECURITY_LOOKUP_TYPE" |
◆ rcl_get_secure_root()
char* rcl_get_secure_root |
( |
const char * |
node_name, |
|
|
const char * |
node_namespace, |
|
|
const rcl_allocator_t * |
allocator |
|
) |
| |
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 "a/b/c", where the delimiter "/" is native for target file system (e.g. "\\" for _WIN32). If no exact match is found for the node name, a best match would be used instead (by performing longest-prefix matching).
However, this expansion can be overridden by setting the secure node directory environment variable, allowing users to explicitly specify the exact secure root directory to be utilized. Such an override is useful for where the FQN of a node is non-deterministic before runtime, or when testing and using additional tools that may not otherwise be easily provisioned.
- Parameters
-
[in] | node_name | validated node name (a single token) |
[in] | node_namespace | validated, absolute namespace (starting with "/") |
[in] | allocator | the allocator to use for allocation |
- Returns
- machine specific (absolute) node secure root path or NULL on failure returned pointer must be deallocated by the caller of this function