Print this page
12306 XPG4v2 slave pty behaviour should generally be disabled
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Change-ID: I7ccd399c22866f34dd20c6bb9d28e77ba4e24c67

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ptm.c
          +++ new/usr/src/uts/common/io/ptm.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  25   25  /*        All Rights Reserved   */
  26   26  
       27 +/*
       28 + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
       29 + */
  27   30  
  28      -
  29   31  /*
  30   32   * Pseudo Terminal Master Driver.
  31   33   *
  32   34   * The pseudo-tty subsystem simulates a terminal connection, where the master
  33   35   * side represents the terminal and the slave represents the user process's
  34   36   * special device end point. The master device is set up as a cloned device
  35   37   * where its major device number is the major for the clone device and its minor
  36   38   * device number is the major for the ptm driver. There are no nodes in the file
  37   39   * system for master devices. The master pseudo driver is opened using the
  38   40   * open(2) system call with /dev/ptmx as the device parameter.  The clone open
↓ open down ↓ 475 lines elided ↑ open up ↑
 514  516                          break;
 515  517                  case UNLKPT:
 516  518                          mutex_enter(&ptmp->pt_lock);
 517  519                          ptmp->pt_state &= ~PTLOCK;
 518  520                          mutex_exit(&ptmp->pt_lock);
 519  521                          /*FALLTHROUGH*/
 520  522                  case ISPTM:
 521  523                          DBG(("ack the UNLKPT/ISPTM\n"));
 522  524                          miocack(qp, mp, 0, 0);
 523  525                          break;
      526 +                case PTSSTTY:
      527 +                        mutex_enter(&ptmp->pt_lock);
      528 +                        ptmp->pt_state |= PTSTTY;
      529 +                        mutex_exit(&ptmp->pt_lock);
      530 +                        DBG(("ack PTSSTTY\n"));
      531 +                        miocack(qp, mp, 0, 0);
      532 +                        break;
 524  533                  case ZONEPT:
 525  534                  {
 526  535                          zoneid_t z;
 527  536                          int error;
 528  537  
 529  538                          if ((error = drv_priv(iocp->ioc_cr)) != 0) {
 530  539                                  miocnak(qp, mp, 0, error);
 531  540                                  break;
 532  541                          }
 533  542                          if ((error = miocpullup(mp, sizeof (zoneid_t))) != 0) {
↓ open down ↓ 174 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX