bubblewrap
bubblewrap copied to clipboard
Make "--unshare-user-try" check if /proc is mounted with hidepid
This is a workaround for https://github.com/containers/bubblewrap/issues/198
It checks if /proc/mounts contains anything related to hidepid.
I'm very new to C so sorry if there's anything wrong. It worked fine when testing.
Can one of the admins verify this patch? I understand the following commands:
bot, add author to whitelistbot, test pull requestbot, test pull request once
That is a very very rough way of detecting the flags (string compare over entire file). There is some mountinfo parsing in bind-mount.c, i think using that for this would make more sense.
It is very rough but I don't know how else to detect the flags.