Project

General

Profile

Actions

Feature #14249

closed

pseudo-terminal nomenclature should reflect POSIX

Added by Joshua M. Clulow 8 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
manpage - manual pages
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The Austin Group has, after much debate, decided on a new set of names for various pseudo-terminal facilities. We should update our documentation and source comments to match the new terminology.

See also: https://www.austingroupbugs.net/view.php?id=1466


Related issues

Related to illumos gate - Bug #12852: Remove "slave" terminology from illumosNew

Actions
Related to illumos gate - Feature #5386: implement openpty(3C), forkpty(3C), and login_tty(3C)NewJoshua M. Clulow2014-12-03

Actions
Has duplicate illumos gate - Feature #13994: align pseudo-terminal terminology with POSIXDuplicateJoshua M. Clulow

Actions
Actions #1

Updated by Dan McDonald 8 months ago

Joshua M. Clulow wrote:

The Austin Group has, after much debate, decided on a new set of names for various pseudo-terminal facilities. We should update our documentation and source comments to match the new terminology.

Will this also affect symbol names (I can imagine they might?).

Actions #2

Updated by Joshua M. Clulow 8 months ago

  • Description updated (diff)
Actions #3

Updated by Joshua M. Clulow 8 months ago

Dan McDonald wrote in #note-1:

Will this also affect symbol names (I can imagine they might?).

Fortunately it does not! Each word in the new terminology uses the same first letter as the analogous word in the old terminology.

Actions #4

Updated by Dan McDonald 8 months ago

It is directly related to #12852 . I will link it.

Actions #5

Updated by Dan McDonald 8 months ago

  • Related to Bug #12852: Remove "slave" terminology from illumos added
Actions #6

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 1812
Actions #7

Updated by Joshua M. Clulow 5 months ago

  • Related to Feature #5386: implement openpty(3C), forkpty(3C), and login_tty(3C) added
Actions #8

Updated by Joshua M. Clulow 5 months ago

  • Has duplicate Feature #13994: align pseudo-terminal terminology with POSIX added
Actions #9

Updated by Joshua M. Clulow 5 months ago

Testing Notes

  • Basic smoke test of in.rlogind.
    • Install the software and enable root logins on non-console terminals:
      # pkg install /service/network/network-servers
      # svcadm enable rlogin
      # sed -e '/^CONSOLE=/s/^/#/' -i /etc/default/login
      
    • From another system:
      $ rlogin -l root 192.168.122.120
      Password:
      Last login: Tue Feb 22 03:40:11 from 192.168.122.1
      The illumos Project rti-rti/14249-0-gb26770da7cf    February 2022
      root@oitest:~#
      
  • Basic smoke test of in.telnetd.
    • Install the software:
      # pkg install /service/network/telnet
      # svcadm enable telnet
      
    • From another system:
      $ telnet 192.168.122.120
      Trying 192.168.122.120...
      Connected to 192.168.122.120.
      Escape character is '^]'.
      login: root
      Password:
      Last login: Tue Feb 22 03:43:55 from 192.168.122.1
      The illumos Project     rti-rti/14249-0-gb26770da7cf    February 2022
      root@oitest:~#
      
  • Confirmed that enhance ed /etc/release gives command-line editing and history to ed that it does not otherwise have.
  • Confirmed that script starts and begins logging to the typescript file with shell and command output that I also see on the screen.
  • Console and SSH logins continue to work as expected. Confirmed that modified functions are running as expected:
    # dtrace -qn 'fbt::ptms_attach_subsidiary:return,fbt::ptms_subsidiary_attached:return { printf("%6d %16s %s() -> %d\n", pid, execname, probefunc, (int)arg1); }'
      1434       in.telnetd ptms_attach_subsidiary() -> 0
      1434       in.telnetd ptms_subsidiary_attached() -> 171
      1434       in.telnetd ptms_subsidiary_attached() -> 171
      1436       in.telnetd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_attach_subsidiary() -> 0
      1437             sshd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_subsidiary_attached() -> 171
      1439             sshd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_subsidiary_attached() -> 171
      1437             sshd ptms_subsidiary_attached() -> 171
      1443       in.rlogind ptms_attach_subsidiary() -> 0
      1443       in.rlogind ptms_subsidiary_attached() -> 171
      1443       in.rlogind ptms_subsidiary_attached() -> 171
      1444       in.rlogind ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
      1444            login ptms_subsidiary_attached() -> 171
    
  • Old language no longer present in modinfo output:
    # modinfo | grep -Ei 'master|slave|\<pt'
    151 fffffffff7ef3000   14d0 172   1  ptsl (tty pseudo driver subsidiary 'p)
    152 fffffffff7ef5000   1b88 169   1  ptc (tty pseudo driver control 'ptc')
    257 fffffffff790e588    d20 170   1  ptm (Pseudo-Terminal Manager Driver)
    258 fffffffff7b025c0    cc0 171   1  pts (Pseudo-Terminal Subsidiary Driv)
    265 fffffffff800f040   1180   -   1  ptem (pty hardware emulator)
    
  • Basic smoke test of zones infrastructure.
    • Created a basic ipkg zone with no networking.
    • Before booting the zone, grab zoneadmd before it is able to do anything:
      # dtrace -qwn 'exec-success /execname == "zoneadmd"/ { printf("pid %d is now zoneadmd\n", pid); raise(SIGSTOP); exit(0); }'
      pid 11846 is now zoneadmd
      
    • Attach truss to it and set things moving again:
      # truss -t ioctl -f -o /tmp/ioctls.txt -p 11846 &
      # prun 11846
      
    • Test zlogin.
      • Console:
        # zlogin -C -e \# testing
        [Connected to zone 'testing' console]
        
        testing console login:
        testing console login: #.
        [Connection to zone 'testing' console closed]
        
      • Regular interactive:
        # zlogin testing
        [Connected to zone 'testing' pts/4]
        Last login: Tue Feb 22 04:09:21 on pts/3
        The illumos Project     rti-rti/14249-0-gb26770da7cf    February 2022
        root@testing:~#
        logout
        
        [Connection to zone 'testing' pts/4 closed]
        
    • Stop zone and check that truss was able to translate the modified ioctls:
      # grep ZC_ /tmp/ioctls.txt
      11849:  ioctl(4, ZC_HOLDSUBSID, 0x00000005)             = 0
      11849/1:        ioctl(2, ZC_RELEASESUBSID, 0x00000005)          = 0
      
  • View these manual pages:
    man -s 1m  in.rlogind
    man -s 1m  in.telnetd
    man -s 1m  pppd
    man -s 2   close
    man -s 2   open
    man -s 3c  grantpt
    man -s 3c  posix_openpt
    man -s 3c  ptsname
    man -s 3c  unlockpt
    man -s 7d  ptm
    man -s 7d  pts
    man -s 7d  pty
    man -s 7d  zcons
    man -s 7m  pckt
    man -s 7m  ptem
    
Actions #10

Updated by Electric Monk 5 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 1fa2a66491e7d8ae0be84e7da4da8e812480c710

commit  1fa2a66491e7d8ae0be84e7da4da8e812480c710
Author: Joshua M. Clulow <josh@sysmgr.org>
Date:   2022-02-22T06:48:06.000Z

    14249 pseudo-terminal nomenclature should reflect POSIX
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Rich Lowe <richlowe@richlowe.net>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF