On Tue, Feb 14, 2017 at 10:21:58PM +0000, Stuart Henderson wrote:
| Is it something where you could start the script as root and drop to a
| different user?
Using `doas script` would then persist the doas ticket in my current
shell after the script has finished. That's really about the only
downside I could see. The upside would be .. hmm .. privileged
operations run with privileges, operations that don't need privileges
don't. In one case, the parent process is privileged, in the other
the parent process has a doas ticket (and is thereby privileged).
So the unpriviliged processes are definitely unprivileged in the 'run
as root'-case, but could potentially abuse the doas ticket in the
other case. Interesting, I hadn't given it this much thought yet.
Another upside of the new build system's privilege setup, I guess.
Thanks Stuart!
Paul
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/