pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

'sudo' "use_pty" broken on serial or wscons terminals



The default behavior of recent "security/sudo" is to open a pty.  While
this works fine in XTerm (or similar) or over an SSH connection, it
breaks programs run at a real serial terminal or wscons text console.

Displayed text stair-steps each line keyboard input is either ignored,
lost, or misdirected.  If one has another terminal (wscons) to use or
can SSH into a machine in such a state, 'ps ax' shows the command run
via 'sudo' on both the real(emulated) tty and a pty.  'kill'ing the
copy on the pty will release the affected terminal.

Adding "Defaults !use_pty" to the "sudoers" file with 'visudo' either
requires using 'su', an SSH connection, or shutting down to single-user
mode since 'visudo' run via 'sudo' will not operate properly on the real
or emulated terminal until "use_pty" is disabled.

Perhaps "Defaults !use_pty" should be default on NetBSD?

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index