Re: Capabilities across execve
From: Pavel Machek
Date: Sun Mar 13 2005 - 13:38:13 EST
> 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
> 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.
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/