[SRU] Fails to generate valid image if /tmp is mounted nosuid,nodev & -t is not specified
Bug #228744 reported by
Emmet Hikory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-vm-builder (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Hardy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: ubuntu-vm-builder
ubuntu-vm-builder assumes that $TMPDIR allows suid and device files. For the case where a user has mounted both /home and /tmp with -o nodev,nosuid, this is potentially problematic. While there are a number of ways to test for this, and verify that the executing user has the necessary permissions to create the files required by the image, an easy workaround would be to mount a tmpfs at $WORKINGDIR to ensure that the target temporary location supports the needed functionality.
Related branches
To post a comment you must log in.
Attached is a quick hack patch with the described solution. It works for me, although it might benefit from a command-line switch to disable it, and some error checking (although ubuntu-vm-builder fails back to the unpatched behaviour, with a bit of extra output, if the mount fails, so adding error checking doesn't make it more robust (unless someone sets -e or the like)).