Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2012 12:14:37 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Benjamin Kaduk <kaduk@MIT.EDU>
Cc:        Tim Kientzle <tim@kientzle.com>, freebsd-arch@freebsd.org, Robert Millan <rmh@freebsd.org>, Simon Gerraty <sjg@juniper.net>
Subject:   Re: Allow user install
Message-ID:  <86ipdarfqq.fsf@ds4.des.no>
In-Reply-To: <alpine.GSO.1.10.1207241921490.22690@multics.mit.edu> (Benjamin Kaduk's message of "Tue, 24 Jul 2012 19:22:43 -0400 (EDT)")
References:  <20120626063017.D05DA58081@chaos.jnpr.net> <CAOfDtXNWnPpLuZNLR0gwKFFksVmTHF8iTb8wqG4Wzj49N2d32w@mail.gmail.com> <BD95C7EE-11BF-4E9C-BB13-AB9AE22A1DE7@kientzle.com> <alpine.GSO.1.10.1207241921490.22690@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Benjamin Kaduk <kaduk@MIT.EDU> writes:
> Tim Kientzle <tim@kientzle.com> writes:
> > Does fakeroot itself require root permissions to run?

Of course not.  What would be the point if it did?

> > I was under the impression that it used some form of
> > loopback mount which --- at least in FreeBSD --- still
> > requires root permissions.
> I thought it was an LD_PRELOAD wrapping g/setuid and friends.

It is.  It actually wraps a large number of syscalls; it needs to keep
track of what the wrapped program thinks the ownership and permissions
of files it has created or modified are, etc. so you can do fakeroot the
equivalent of "make all install package" and end up with a tarball that
contains the right ownership and permission information.

There is a competing implementation that uses PTRACE instead, which
allows it to also handle static binaries.  Unfortunately, FreeBSD's
PTRACE breaks job control.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ipdarfqq.fsf>