Allow user install

Dag-Erling Smørgrav des at des.no
Fri Jul 27 08:37:09 UTC 2012


Benjamin Kaduk <kaduk at MIT.EDU> writes:
> Tim Kientzle <tim at 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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-arch mailing list