bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fakeroot


From: Roland McGrath
Subject: fakeroot
Date: Sat, 4 May 2002 19:44:39 -0400 (EDT)

I've added a script that the Hurd will install as /bin/fakeroot.  I think
this will be sufficiently compatible to the Debian/Linux fakeroot package
to use it for building Debian packages, but that has yet to be tried.  This
is a trivial script that brings together three independent features, all of
which are new and none of which has been adequately tested either alone or
in combination with the others.

1. The /bin/fakeauth program.  This runs a command with the illusion that
   it has the root UID and GID and that it can set whatever UIDs and GIDs
   for itself it wants.  However, in actuality it will always be using your
   normal credentials (even when it think it created a "nobody" auth port).
2. The /hurd/fakeroot filesystem translator.  This provides a virtual
   filesystem that accesses an underlying directory tree always as the
   owner of the filesystem (i.e. you if you started the translator) but
   allows anyone to make any and all fictional UID, GID, and permission
   changes, which don't really happen to the underlying files but appear
   consistently if you read them back from the virtual filesystem.
3. The --chroot option to the existing settrans command.  This starts an
   active translator without making its virtual filesystem available
   anywhere in any parent filesystem, but only as the root directory for a
   given command.  This is a good idea for filesystems like fakeroot that
   will act on other filesystems using your identity without checking the
   identity of the user--so you wouldn't want to attach it to a filesystem
   node that any untrusted user could look up.  

The script I checked in has another 56 lines of pro forma crapola,
but the actual meat is this one line:

exec /bin/settrans --chroot /bin/fakeauth "$@" -- / /hurd/fakeroot

My recent postings about fakeroot, fakeauth, and settrans individually
should suffice to explain what each is doing in this command line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]