Package: fakeroot
Version: 1.2.10
Severity: normal

I'm not sure that subject is clear, but the demonstration that follows
should be:

wildcat$ fakeroot
wildcat# id -u
0
wildcat# id -g
0
wildcat# python
Python 2.4.1 (#2, Oct 18 2006, 20:58:01) 
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.setuid(900)
>>> os.system("sh")
sh-2.05b$ id -u
900
sh-2.05b$ id -g
0
sh-2.05b$ fakeroot
wildcat$ id -u
900
wildcat$ id -g
0


pbuilder (in particular, /usr/lib/pbuilder/pbuilder-buildpackage) uses
BUILDUSERID, and if you're using pbuilder with an external ccache this
is kind of useful...  but it means that you can be in a fakeroot,
fake-change to uid $BUILDUSERID (900 as above), then when
"dpkg-buildpackage -rfakeroot" does a "fakeroot debian/rules clean",
the ensuing "dh_testroot" fails:

        dh_testroot
        dh_testroot: You must run this as root (or use fakeroot).
        make: *** [clean] Error 1
        pbuilder: Failed autobuilding of package

because just calling fakeroot doesn't fake-change back up to 0.

fakeroot-tcp behaves no differently than the default fakeroot-sysv
(not that I expected it to.)

It looks like 1.5.10 (from roughly current debian/testing) behaves
exactly the same way.

A quick look at fakeroot-1.2.10/scripts/fakeroot.in doesn't show an
obvious way to fix this, without shipping a (obviously not-setuid)
helper that does the above setuid call and exec; bash doesn't appear
to have a syscall builtin :-) (Another possibility is rewriting
fakeroot.in in just about any other language; python or perl would do
fine.)

Another, somewhat twisted, possibility is for libfakeroot to check an
environment variable, that fakeroot.in could set, to execute that
setuid, but there may be reasons that doesn't work out.  Just another
path if delivering a helper doesn't work out for some reason...


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15-mc2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages fakeroot depends on:
ii  libc6                 2.3.2.ds1-22sarge4 GNU C Library: Shared libraries an

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to