Bug 214599 - Add a cap_fill_flag function to copy a flag from one cap_t to another cap_t
Summary: Add a cap_fill_flag function to copy a flag from one cap_t to another cap_t
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-01 20:45 UTC by Andrew G. Morgan
Modified: 2021-10-02 02:27 UTC (History)
1 user (show)

See Also:
Kernel Version: n/a
Subsystem:
Regression: No
Bisected commit-id:


Attachments
implement cap_fill_flag() (8.30 KB, application/mbox)
2021-10-01 23:29 UTC, Andrew G. Morgan
Details

Description Andrew G. Morgan 2021-10-01 20:45:12 UTC
Some user feedback: I would have been preferable to implement the following API for filling a capability (cap_fill isn't as generally useful):

  int cap_fill_flag(cap_t working, cap_flag_t to,
      const cap_t ref, cap_flag_t from);

a function that would transcribe from one capability set's from flag to the other's to flag.
Comment 1 Andrew G. Morgan 2021-10-01 23:29:04 UTC
Created attachment 299053 [details]
implement cap_fill_flag()

Here is a patch.

Note You need to log in before you can comment on or make changes to this bug.