[Libguestfs] libguestfs-test-tool on ubuntu: kernel panic
Richard W.M. Jones
rjones at redhat.com
Wed Aug 10 19:37:34 UTC 2011
On Wed, Aug 10, 2011 at 11:59:47AM -0700, David Konerding wrote:
> OK. I hacked some extra eprintfs into febootstrap.ml (learning a bit of
> ocaml in the process). I can confirm that the unpacked debian file has
> restrictive permissions:
>
> tmp/febootstrape193191fefe36c245623bc48e5b150a2.tmp/bash_4.1-2ubuntu3_amd64.deb.d$
> ls -l bin
> total 920
> -rwxr-x--- 1 dek redacted 934336 Apr 18 2010 bash
> lrwxrwxrwx 1 dek redacted 4 Aug 10 11:43 rbash -> bash
> lrwxrwxrwx 1 dek redacted 4 Aug 10 11:43 sh -> bash
>
> which is what is causing the permission check in febootstrap.ml to fail:
> else if mode land 0o004 = 0 then
> warn_unreadable := path :: !warn_unreadable
OK, you seem to be way ahead of me :-)
> It looks like when I extract a package using dpkg-deb directly, it has
> permissive permissions,
>
> $ dpkg-deb --extract
> /tmp/febootstrap02946e2e929e78a0efa20670d79db1ab.tmp/bash_4.1-2ubuntu3_amd64.deb
> /tmp/shoop
> $ ls -l /tmp/shoop
> total 920
> -rwxr-xr-x 1 dek redacted 934336 Apr 18 2010 bash
> lrwxrwxrwx 1 dek redacted 4 Aug 10 09:39 rbash -> bash
> lrwxrwxrwx 1 dek redacted 4 Aug 10 09:39 sh -> bash
>
>
> but, febootstrap runs this command:
> dpkg-deb --fsys-tarfile
> /tmp/febootstrape193191fefe36c245623bc48e5b150a2.tmp/bash_4.1-2ubuntu3_amd64.deb
> | (cd
> /tmp/febootstrape193191fefe36c245623bc48e5b150a2.tmp/bash_4.1-2ubuntu3_amd64.deb.d
> && tar xf -
>
> which creates a tar file that has this:
> -rwxr-xr-x root/root 934336 2010-04-18 19:16 ./bin/bash
>
> which unpacks to:
> -rwxr-x--- 1 dek redacted 934336 Apr 18 2010 bash
>
> I think this was happening due to my umask being set to '0027'. I set it to
> 0000, and I don't get the warning any more, and the generated appliance has
> a /bin/bash.
>
> Sorry about the noise. Maybe febootstrap should set a reasonable umask
> internally?
Thanks, yes, this is a bug in febootstrap.
Fixed in this commit:
http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=0d57e883e1fc6a0ca7bf435ddbe0b0f9b4380295
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list