Skip to content

[bug] capability: some errors related to pid #168

@lifubang

Description

@lifubang

As capability package can be used to set other process's cap, but unfortunately except these two type caps:

  1. Bounding cap: we can only drop capabilities from the bounding set via prctl(PR_CAPBSET_DROP), but this operation is only used for current process;
  2. Ambient cap: we can only modify ambient cap set via prctl(PR_CAP_AMBIENT), but this operation is also only used for current process.

So if we use capability package for other process via NewPid(pid>0), when we want to use Apply to modify target process's bounding and ambient cap set, it will modify current process's bouding and ambient cap set, rather than the target process.

The original post is here: #165 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions