> unshare(CLONE_FILES); > /* we don't want anything past stderr here */ > close_range(3, ~0U); > execve(....);
Yes please. nextfd(2) https://lkml.org/lkml/2012/4/1/71 fdmap(2) https://marc.info/?t=150628366900006&r=1&w=4 I like fdmap more.
> unshare(CLONE_FILES); > /* we don't want anything past stderr here */ > close_range(3, ~0U); > execve(....);
Yes please. nextfd(2) https://lkml.org/lkml/2012/4/1/71 fdmap(2) https://marc.info/?t=150628366900006&r=1&w=4 I like fdmap more.