On Sat, Nov 28, 2015 at 12:30:52AM +0100, Cyril Brulebois wrote:
> Now if I log out of the schroot session, remove my user 'kibi' from the
> cdrom group and re-enter a schroot session, I'm now getting a failure on
> the next group:
> | (sid-amd64-devel)kibi@wodi:~/debian-installer/installer$ make -C build 
> build_netboot-gtk USE_UDEBS_FROM=sid 
> | make: Entering directory '/home/kibi/debian-installer/installer/build'
> | Using generated sources.list.udeb:
> |    deb [trusted=yes] copy:/home/kibi/debian-installer/installer/build/ 
> localudebs/
> |    deb http://localhost/debian sid main/debian-installer
> | make[2]: 'sources.list.udeb' is up to date.
> | Reading package lists... Done
> | E: Method gave invalid 400 URI Failure message: Could not switch group, 
> user _apt is still in group 25
> | E: Method gave invalid 400 URI Failure message: Could not switch group, 
> user _apt is still in group 25
> | E: Method copy has died unexpectedly!
> | E: Sub-process copy returned an error code (112)
> | 
> | (sid-amd64-devel)kibi@wodi:~/debian-installer/installer$ getent group floppy
> | floppy:x:25:kibi
> | 
> | (sid-amd64-devel)kibi@wodi:~/debian-installer/installer$ groups
> | kibi floppy audio dip video plugdev sbuild kvm libvirt
> 
> Iterating again, I'm now failing because of the audio group…

Mhhhhhh. apt is run as root (as we don't reach this codepath with uid !=
0), but it has all the groups of kibi and a setgroups is silently
ignored… wtf…

The code is if someone wants to look:
https://anonscm.debian.org/cgit/apt/apt.git/tree/apt-pkg/contrib/fileutl.cc#n2264
I will go to bed now, maybe I have an epiphany tomorrow.
(or manage to reproduce this for a start)


> While I've been experimenting with adding/removing myself from the said
> groups, I'm noticed this a few times, without being able to figure out
> what exactly causes this…
> | W: No sandbox user '_apt' on the system, can not drop privileges
> 
> In which case, going back to apt.git and "sudo debi -u" to reinstall all
> packages I've built seems to fix the issue.

As mentioned briefly schroot copies users & groups from your host
system, so if your host system has no _apt user, the _apt user in your
schroot will "disappear" next time it is copied over.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to