summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authordtse <none@none>2008-07-02 10:25:00 -0700
committerdtse <none@none>2008-07-02 10:25:00 -0700
commit1f79c0b880fa5add6fffbf5debc7996dbef5c1a3 (patch)
tree640702d926c7d432fcca4670dc9b73d7dbc230ec /usr/src
parent5987056561a7f4dcea82d9c16a63f53df4007d1d (diff)
downloadillumos-gate-1f79c0b880fa5add6fffbf5debc7996dbef5c1a3.tar.gz
6711774 Consoles without write permission are unresponsive to <RET> but respond to other key inputs.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/vntsd/read.c35
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;