diff options
| author | Tobias Geerinckx-Rice | 2021-07-04 21:35:32 +0200 |
|---|---|---|
| committer | Kent Overstreet | 2023-10-22 17:09:07 -0400 |
| commit | a515d0a50c6e8bb9b8ce58d6e396b4c5eeea6905 (patch) | |
| tree | 91a12d28b422f1318c5591dffcd25440bc6a93af /tools/perf/scripts/python/stackcollapse.py | |
| parent | 508b1f71396486648e3d42d1814e7f148fbb7751 (diff) | |
bcachefs: Enforce SYS_CAP_ADMIN within ioctls
bch2_fs_ioctl() didn't distinguish between unsupported ioctls and those
which the current user is unauthorised to perform. That kept the code
simple but meant that, for example, an unprivileged TIOCGWINSZ ioctl on
a bcachefs file would return -EPERM instead of the expected -ENOTTY.
The same call made by a privileged user would correctly return -ENOTTY.
Fix this discrepancy by moving the check for CAP_SYS_ADMIN into each
privileged ioctl function.
Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
