capability: introduce CAP_TO_MASK_CORRECTED() macro replacing CAP_TO_MASK()
linux/capability.h's CAP_TO_MASK potentially shifts a signed int "1"
(i.e. 32bit wide) left by 31 which means it becomes negative. That's
just weird, and ubsan complains about it. Let's introduce our own macro
CAP_TO_MASK_CORRECTED which doesn't fall into this trap, and make use of
it.
Fixes: #10347
(cherry picked from commit 5f00c5684f96c93a22840f7241ee444b9a632b1e)
Resolves: #1683319
patch_name: 0184-capability-introduce-CAP_TO_MASK_CORRECTED-macro-rep.patch
present_in_specfile: true
location_in_specfile: 184
squash_commits: true