1 |
On Fri, 01 Oct 2004 17:41:45 -0400, Ned Ludd <solar@g.o> wrote: |
2 |
.. |
3 |
> |
4 |
> The idea seemed simple enough to me so I wrote a real quick wrapper |
5 |
> script to see how hard it would be do it. few mins of hacking later.. |
6 |
> |
7 |
> Your right it's not so hard at all. Atleast from a wrapper script. |
8 |
> Here is what the end result gives us. |
9 |
> |
10 |
> --- USER EBUILD_PHASE |
11 |
> >>> solar phase(clean) |
12 |
> >>> solar phase(setup) |
13 |
> >>> solar phase(unpack) |
14 |
> >>> solar phase(compile) |
15 |
> >>> solar phase(test) |
16 |
> >>> solar phase(install) |
17 |
> >>> solar phase(package) |
18 |
> --- call remaining phases with root privs |
19 |
> >>> root phase(setup) |
20 |
> >>> root phase(preinst) |
21 |
> >>> root phase(prerm) |
22 |
> >>> root phase(postrm) |
23 |
> >>> root phase(postinst) |
24 |
> |
25 |
> I would not really consider this any more secure by any means. An |
26 |
> attacker can still take control of your system via other methods. |
27 |
> But as far as keeping ebuilds from major screwups like rm -rf ${TYPO}/* |
28 |
> this should do the trick. |
29 |
> http://dev.gentoo.org/~solar/portage_misc/emerge-wrapper |
30 |
> I've only tested with some fairly small packages. No idea how a kernel |
31 |
> module or whatever would be handled. |
32 |
> |
33 |
> If you build an the idea please share your changes with me. I'm all for |
34 |
> handling as many phases as we can as non root. Assuming it does not lead |
35 |
> to us having to install some new suid bin todo it. |
36 |
> |
37 |
|
38 |
Very cool. I especially like the comment after checking for uid == 0. :) |
39 |
|
40 |
I'll test this out with a few packages. |
41 |
|
42 |
|
43 |
Chris |
44 |
|
45 |
-- |
46 |
gentoo-dev@g.o mailing list |