[buildd-tools-devel] Bug#608840: --chroot-setup-commands does not run as root

Kees Cook kees at debian.org
Mon Jan 3 22:04:27 UTC 2011


Package: sbuild
Version: 0.60.8-1
Severity: normal
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu natty

Hi,

With the deprecation of --setup-hook in favor of --chroot-setup-commands,
it seems that the root uid was dropped when executing. Now I am just my
regular user, and cannot do the work I need to do with this hook (i.e. I
cannot modify the apt sources.list etc).

For example:
$ sbuild --chroot-setup-commands /tmp/where-am-i.sh -A -d natty-amd64 hello_2.6-1.dsc
...
┌──────────────────────────────────────────────────────────────────────────────┐
│ Chroot Setup Commands
│
└──────────────────────────────────────────────────────────────────────────────┘


/tmp/where-am-i.sh
──────────────────

+ id
uid=501(kees) gid=501(kees)
groups=501(kees),4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),104(lpadmin),105(scanner),106(admin),109(sbuild),116(fuse),126(mythtv),132(sambashare),134(libvirtd),4000(house),4001(inkscape)
+ ls -lda /
drwxr-xr-x 26 root root 4096 Jan  3 13:59 /

I: Finished running '/tmp/where-am-i.sh'.

Finished processing commands.


I'm in the chroot, but not the root user.

Thanks,


-Kees

-- 
Kees Cook                                            @debian.org


More information about the Buildd-tools-devel mailing list