1 |
On Tue, Feb 11, 2014 at 12:28:43AM +0000, Kerin Millar wrote |
2 |
> On 10/02/2014 23:57, Walter Dnes wrote: |
3 |
> > |
4 |
> > What's the point, if you still have to run as root (or su or sudo) for |
5 |
> > the emerge update process? |
6 |
> |
7 |
> It's the principle of least privilege. Is there any specific reason for |
8 |
> portage to fork and exec rsync as root? Is rsync sandboxed? Should rsync |
9 |
> have unfettered read/write access to all mounted filesystems? Can it be |
10 |
> guaranteed that rsync hasn't been compromised? Can it be guaranteed that |
11 |
> PORTAGE_RSYNC_OPTS will contain safe options at all times? |
12 |
> |
13 |
> The answer to all of these questions is "no". Basically, the combination |
14 |
> of usersync and non-root ownership of PORTDIR hardens the process in a |
15 |
> sensible way while conferring no disadvantage. |
16 |
|
17 |
If /usr/portage is owned by portage:portage, then wouldn't a user |
18 |
(member of portage) be able to do mischief by tweaking ebuilds? E.g. |
19 |
modify an ebuild to point to a tarball located on a usb stick, at |
20 |
http://127.0.0.1/media/sdc1/my_tarball.tgz. This would allow a local |
21 |
user to supply code that gets built and then installed in /usr/bin, or |
22 |
/sbin, etc. |
23 |
|
24 |
-- |
25 |
Walter Dnes <waltdnes@××××××××.org> |
26 |
I don't run "desktop environments"; I run useful applications |