Skip to content
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

Make "--unshare-user-try" check if /proc is mounted with hidepid #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

madaidan
Copy link

This is a workaround for #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.

@madaidan madaidan changed the title Make --unshare-user-try check if /proc is mounted with hidepid Make "--unshare-user-try" check if /proc is mounted with hidepid Oct 10, 2019
@rh-atomic-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@alexlarsson
Copy link
Collaborator

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.

@madaidan
Copy link
Author

It is very rough but I don't know how else to detect the flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants