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

providers/linux: Fix linux Capabilities #196

Closed
wants to merge 1 commit into from

Commits on Dec 4, 2023

  1. providers/linux: Fix linux Capabilities

    I believe this never worked, as readCapabilities() expected a Capabilities line
    but was passed the full file as input, it also would allocate its own
    CapabilityInfo and return it, even though it would fill one member.
    
    So change all this:
      o Scan the file line by line, as to avoid loading a full file into memory,
        then parse out only the desired lines and pass down.
      o Pass the structure as a parameter and let each member be filled.
      o Error out if we failed to report at least one of the capabilities.
      o Add a test against init(1) as it will """always""" be run as root and have
        all capabilities, test is a bit conservative but should be ok for now.
    haesbaert committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    6ad5c63 View commit details
    Browse the repository at this point in the history