diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/vntsd/read.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/usr/src/cmd/vntsd/read.c b/usr/src/cmd/vntsd/read.c index 5a84cf5810..d3cc711603 100644 --- a/usr/src/cmd/vntsd/read.c +++ b/usr/src/cmd/vntsd/read.c @@ -21,7 +21,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -225,21 +225,30 @@ vntsd_read(vntsd_client_t *clientp) } assert(clientp->cons); - if (clientp->cons->clientpq->handle != clientp) { - /* reader - print error message */ - if ((c != CR) && (c != LF)) { - rv = vntsd_write_line(clientp, - gettext(VNTSD_NO_WRITE_ACCESS_MSG)); - /* check errors and may exit */ - if (rv == VNTSD_STATUS_INTR) { - rv = vntsd_cons_chk_intr(clientp); - } + /* + * Only keyboard inputs from first connection to a + * guest console should be accepted. Check to see if + * this client is the first connection in console + * queue + */ + if (clientp->cons->clientpq->handle != clientp) { + /* + * Since this console connection is not the first + * connection in the console queue, + * it is operating in 'reader' + * mode, print warning and ignore the input. + */ + rv = vntsd_write_line(clientp, + gettext(VNTSD_NO_WRITE_ACCESS_MSG)); - if (rv != VNTSD_SUCCESS) { - return (rv); - } + /* check errors and interrupts */ + if (rv == VNTSD_STATUS_INTR) { + rv = vntsd_cons_chk_intr(clientp); + } + if (rv != VNTSD_SUCCESS) { + return (rv); } continue; |