Commit e778361
committed
umh: simplify the capability pointer logic
The usermodehelper code uses two fake pointers for the two capability
cases: CAP_BSET for reading and writing 'usermodehelper_bset', and
CAP_PI to read and write 'usermodehelper_inheritable'.
This seems to be a completely unnecessary indirection, since we could
instead just use the pointers themselves, and never have to do any "if
this then that" kind of logic.
So just get rid of the fake pointer values, and use the real pointer
values instead.
Reviewed-by: Luis Chamberlain <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Iurii Zaikin <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>1 parent fb35342 commit e778361
1 file changed
Lines changed: 5 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
| |||
512 | 509 | | |
513 | 510 | | |
514 | 511 | | |
| 512 | + | |
| 513 | + | |
515 | 514 | | |
| 515 | + | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | 517 | | |
526 | 518 | | |
527 | 519 | | |
| |||
555 | 547 | | |
556 | 548 | | |
557 | 549 | | |
558 | | - | |
| 550 | + | |
559 | 551 | | |
560 | 552 | | |
561 | 553 | | |
562 | 554 | | |
563 | 555 | | |
564 | 556 | | |
565 | | - | |
| 557 | + | |
566 | 558 | | |
567 | 559 | | |
568 | 560 | | |
| |||
0 commit comments