Currently I'm trying to understand capabilities in Linux by reading http://man7.org/linux/man-pages/man7/capabilities.7.html
I created a small C++ application with the capability CAP_DAC_READ_SEARCH+eip
The capability works fine for the application. But I have a system() call inside
system("cat /dev/mtdX > targetFile"); How I can inherit the capability to this call?
Edit:
I know that system() is driven by fork() + execl(). In the documentation is mentioned, that with fork() the child process get the same capabilities as the parent process. But why is the read capability not inherited?