aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/drivers/char/console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index e10bed5d55..ef24f63895 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -363,11 +363,14 @@ long do_console_io(int cmd, int count, XEN_GUEST_HANDLE(char) buffer)
long rc;
unsigned int idx, len;
-#ifndef VERBOSE
- /* Only domain 0 may access the emergency console. */
if ( current->domain->domain_id != 0 )
- return -EPERM;
+#ifndef VERBOSE
+ /* Only domain 0 may access the emergency console. */
+#else
+ /* Only console writes are permitted for other than Dom0. */
+ if ( cmd != CONSOLEIO_write )
#endif
+ return -EPERM;
rc = xsm_console_io(current->domain, cmd);
if ( rc )