| Summary: | lcap removes all capabilities | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Mark Aikens <marka> |
| Component: | Current packages | Assignee: | Patrick Kursawe (RETIRED) <phosphan> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Mark Aikens
2003-05-31 15:29:47 UTC
Strange things happening... If I just lcap -vv CAP_SYS_MODULE, all capabilities are blanked. If I try lcap -vv CAP_SYS_TIME, I can safely remove CAP_SYS_MODULE afterwards, but trying CAP_NET_RAW then blanks everything again. Seems it has strange problems with certain bit combinations. Investigating... Looks like sometimes it can't read back the data it writes to the kernel via /proc - still no idea who gets it wrong, the kernel or lcap. Stay tuned. Got it. The kernel (at least 2.4.20) uses the function proc_dointvec_bset from kernel/sysctl.c for access to /proc/sys/kernel/cap-bound - this function forbids any access if CAP_SYS_MODULE is not available (please don't ask me why they made it this way). lcap is satisfied if it can open the file (which will work), then it reads from it (which fails, but isn't caught). It gets a zero and displays all capabilities as deleted though they aren't. Just removing CAP_NET_RAW does not show this effect (at least not on my system). Please try to verify this with the new -r1 revision which should be in portage soon. It should print an error message if it can't read the capabilities. OK, thanks. I just won't remove CAP_SYS_MODULE. Removing other capabilities work as expected. Fine. Setting this to fixed. Fixed. |