-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find_library_path() for rmw fails when running node with root capabilities #40
Comments
As per http://man7.org/linux/man-pages/man7/raw.7.html / https://linux.die.net/man/7/capabilities - EDIT: can you give EDIT 2: Oh - you already mentioned |
+1 on this. |
This is interesting. Thanks for posting! I'll read into it. My use case:
Unexpectedly (for me that is), I got errors, and had to set |
This is addressed by #122 -- you then have to add the library directories to ldconfig, but that should be okay for most use-cases. |
I already mentioned this in ros2/rcutils#143, but thought it would warrant its own issue, as the use case might be common.
If a binary is run with capabilities set via
setcap
or with the setuid bit,LD_LIBRARY_PATH
is omitted during execution. Sincefind_library_path()
relies exclusively onLD_LIBRARY_PATH
, a ros2 node requiring root capabilities fails withIn our case, we need raw socket access in our node. Maybe introducing another environment variable like
RMW_LIBRARY_PATH
could solve this, or reading outRPATH
from the binary header. Any suggestions for a workaround in the meantime would be greatly appreciated!The text was updated successfully, but these errors were encountered: