ubuntu-device-flash snap doesn't work on eCryptfs encrypted home
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Triaged
|
Medium
|
Tyler Hicks |
Bug Description
Originally reported by Michael Vogt and investigated by Jamie Strandboge:
1. create a VM with 5G free space (at least)
2. create a testuser: sudo adduser --encrypt-home testuser
3. add the testuser to 'sudo': sudo adduser testuser sudo
4. login as test user and do:
$ sudo snap install --devmode --edge ubuntu-device-flash
$ sudo DEBUG_DISK=1 strace -o /tmp/trace -f -vv /snap/bin/
[sudo] password for testuser:
Determining gadget configuration
744.00 KB / 744.00 KB [======
Parallel unsquashfs: Using 1 processor
13 inodes (35 blocks) to write
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
/tmp/gadget5308
created 13 files
created 2 directories
created 0 symlinks
created 0 devices
created 0 fifos
Error: Could not stat device /home/testuser/
issues while partitioning
From strace:
2007 lstat("/home", {st_dev=
2007 lstat("
2007 lstat("
But the file exists:
$ stat ./dragon.img
File: './dragon.img'
Size: 3899999744 Blocks: 7617216 IO Block: 4096 regular file
Device: 28h/40d Inode: 101 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1001/testuser) Gid: ( 1001/testuser)
Access: 2016-08-12 06:41:46.871343338 -0500
Modify: 2016-08-12 06:41:46.871343338 -0500
Change: 2016-08-12 06:41:46.871343338 -0500
Birth: -
Doing this in a non-ecryptfs dir:
$ sudo mkdir /home/foo
$ sudo chown testuser:testuser /home/foo
$ cd /home/foo
$ sudo DEBUG_DISK=1 strace -o /tmp/trace -f -vv /snap/bin/
...
New image complete
Summary:
Output: /home/foo/
Architecture: arm64
Channel: edge
Version: 0
Looking in this strace:
2032 lstat("/home", {st_dev=
2032 lstat("/home/foo", {st_dev=
2032 lstat("
This is an odd one. I can consistently reproduce it using the Xenial kernel (4.4.0- 34.53-generic) but cannot reproduce it using other kernels.
u-d-f works when running under a development kernel build of 4.7. It also works when running under 4.7, 4.6, 4.5, and 4.4 kernels from http:// kernel. ubuntu. com/~kernel- ppa/mainline/.