mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Since28d386fc43(XSA-57), libxl writes an empty value for the console tty node, with read-only permission for the guest, when setting up pv console "frontends". (The actual tty value is later set by xenconsoled.) Writing an empty node is not strictly necessary to stop the frontend from writing dangerous values here, but it is a good belt-and-braces approach. Unfortunately this confuses xenconsole. It reads the empty value, and tries to open it as the tty. xenconsole then exits. Fix this by having xenconsole treat an empty value the same way as no value at all. Also, make the error opening the tty be nonfatal: we just print a warning, but do not exit. I think this is helpful in theoretical situations where xenconsole is racing with libxl and/or xenconsoled. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: George Dunlap <george.dunlap@eu.citrix.com> --- v2: Combine two conditions and move the free (cherry picked from commit39ba2989b1)