virt-aa-helper fails when serial or console type is 'tcp'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Jamie Strandboge | ||
Karmic |
Fix Released
|
Medium
|
Jamie Strandboge | ||
Lucid |
Fix Released
|
Medium
|
Jamie Strandboge |
Bug Description
When serial and console devices are defined as follows:
...
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='1234'/>
<protocol type='telnet'/>
<target port='0'/>
</serial>
<console type='tcp'>
<source mode='bind' host='127.0.0.1' service='1234'/>
<protocol type='telnet'/>
<target port='0'/>
</console>
...
virt-aa-helper will incorrectly add "127.0.0.1" to the included files list, which causes apparmor_parser to fail and that causes the guest to not start unless apparmor is disabled for libvirtd. Simple check if the serial or console type is 'tcp' in virt-aa-helper's get_files() function should fix it.
This broke in 0.7.0-1ubuntu8 (which is when virt-aa-helper was changed to use the XML for the file paths) and is still broken as of 0.7.0-1ubuntu13.
affects: | libvirt (Ubuntu) → apparmor (Ubuntu) |
Changed in apparmor (Ubuntu): | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
affects: | apparmor (Ubuntu) → libvirt (Ubuntu) |
Changed in libvirt (Ubuntu): | |
milestone: | none → karmic-updates |
tags: | added: apparmor |
Changed in libvirt (Ubuntu Karmic): | |
status: | Triaged → In Progress |
Changed in libvirt (Ubuntu Karmic): | |
status: | In Progress → Fix Committed |
Changed in libvirt (Ubuntu Lucid): | |
milestone: | karmic-updates → none |
tags: |
added: verification-done removed: verification-needed |
TEST CASE: a22e3930- d87a-584e- 22b2-1d8950212b ac -c --dryrunvirt- aa-helper: warning: path does not exist, skipping file type checks d/libvirt/ libvirt- a22e3930- d87a-584e- 22b2-1d8950212b ac.files log/libvirt/ **/testqemu. log" w, run/libvirt/ **/testqemu. monitor" rw, run/libvirt/ **/testqemu. pid" rwk, jamie/tmp/ test.img" rw,
$ cat /tmp/460271.xml | sudo virt-aa-helper -u libvirt-
virt-aa-helper:
/etc/apparmor.
virt-aa-helper:
"/var/
"/var/
"/var/
"/home/
"127.0.0.1" w,
virt-aa-helper: d/libvirt/ libvirt- a22e3930- d87a-584e- 22b2-1d8950212b ac a22e3930- d87a-584e- 22b2-1d8950212b ac libvirt- a22e3930- d87a-584e- 22b2-1d8950212b ac.files>
/etc/apparmor.
virt-aa-helper:
libvirt-
virt-aa-helper:
#include <libvirt/
Notice the "127.0.0.1" w, entry-- it should not be added because it chokes apparmor_parser.