Bug 198648 - openvt and su: no controlling tty
openvt and su: no controlling tty
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-12 10:42 EDT by Stiphane Doyon
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-12 11:51:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stiphane Doyon 2006-07-12 10:42:17 EDT
Description of problem:

openvt -s -w -- su - someuser -c "vlock -a"
no longer works: vlock: could not open /dev/tty: No such device or address.

Version-Release number of selected component (if applicable):

Used to work in FC4: coreutils-5.2.1-48.1
No longer works with coreutils-5.96-1.2.

How reproducible:
Systematically.

Steps to Reproduce:
1. openvt -s -w -- su - someuser -c "vlock -a"
2. or to debug: openvt -s -w -- su - someuser -c "vlock -a 2>/tmp/xx"; cat xx
  
Actual results:
vlock: could not open /dev/tty: No such device or address.

Expected results:
[switch VT]
The entire console display is now completely locked.
You will not be able to switch to another virtual console.
Please enter the password to unlock.
someuser's Password:

Additional info:

If I copy /bin/su from an FC4 machine and I do
openvt -s -w -- /tmp/fc4-su - someuser -c "vlock -a"
then it works as before.

From the changelog, I guess this entry must be it:
* Mon Nov 14 2005 Tim Waugh <twaugh@redhat.com> 5.93-2
- Call setsid() in su under some circumstances (bug #173008).

In case someone is wondering, the weird openvt invocation is used
to control access on resume from suspend to RAM, it's called from an
ACPI event handler.
Comment 1 Tim Waugh 2006-07-12 11:51:04 EDT
Well, that change was made in order to prevent a security attack vector, so
can't be changed back. :-/

Note You need to log in before you can comment on or make changes to this bug.