Messages in this thread | | | Date | Sun, 13 Mar 2005 19:32:57 +0100 | From | Pavel Machek <> | Subject | Re: Capabilities across execve |
| |
Hi!
> This makes it possible for a root-task to pass capabilities to > nonroot-task across execve. The root-task needs to change it's > cap_inheritable mask and set prctl(PR_SET_KEEPCAPS, 1) to pass on > capabilities. > At execve time the capabilities will be passed on to the new > nonroot-task and any non-inheritable effective and permitted > capabilities will be masked out. > The effective capability of the new nonroot-task will be set to the > maximum permitted. > > >From here on the inheritable mask will be passed on unchanged to the new > tasks children unless told otherwise (effectively the complete > capability state is passed on). > > With a small insert of prctl(PR_SET_KEEPCAPS, 1) into pam_cap.c at the > correct place this makes pam_cap work as expected. I'm also attaching a > test-case that tests capabilities across setuid => execve (makes the new > task inherit CAP_CHOWN).
FWIV, I think this is good idea; this way capabilities will not only be castle in the sky, but also will be actually usable. Pavel
-- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |