Proposing SELinux support in strace

Dmitry V. Levin ldv at
Fri Mar 26 01:07:42 UTC 2021

Hi Dmitry,

On Thu, Mar 25, 2021 at 01:51:09PM +0100, Renaud Métrich wrote:
> Hi Dmitry,
> I reworked all the tests to stop having getcwd() calls.
> This means realpath() cannot be used.
> Please check the PR, tests/ only, rest was already reviewed (since it's 
> basically *your* code ...)

I've just got two comments about get_curdir_fd:
- when using readlink, please make sure the returned string is
  NUL-terminated, see e.g. getfdpath_pid;
- the most likely reason why readlink of /proc/self/cwd could fail is that
  /proc is not mounted, let's use perror_msg_and_skip instead of
  perror_msg_and_fail in that case.


More information about the Strace-devel mailing list