Subject: Re: [vserver] vserver "exec" gives TTY in Lenny but not in Squeeze guest (was: Re: [vserver] Problem with sudo inside Squeeze Guest)
From: Bastian Blank <bastian+vserver=list.linux-vserver.org@waldi.eu.org>
Date: Sat, 21 Jul 2012 13:39:25 +0200

On Fri, Jul 20, 2012 at 10:21:36PM +0200, Markus Fischer wrote:
> I did the following tests (excutable put inside guest in /tmp/ttyname):
> 
> theuser@host:~$ sudo vserver guest01 exec /tmp/ttyname
> ttyname = '(null)'
> 
> theuser@host:~$ sudo vserver guest01 enter
> guest01:~# /tmp/ttyname
> ttyname = '/dev/pts/12'
> guest01:~# logout
> 
> theuser@host:~$ sudo vserver guest01 exec su - theuser
> theuser@guest01:~$ /tmp/ttyname
> ttyname = '(null)'
> theuser@guest01:~$ logout
> 
> theuser@host:~$ sudo vserver guest01 enter
> guest01:~# su - theuser
> theuser@guest01:~$ /tmp/ttyname
> ttyname = '/dev/pts/12'
> 
> 
> So, whenever I used "enter" to get in the system, my user has a valid tty.
> 
> But when I use "exec", there's none. And I used "su - theuser" all the
> time to enter the system as my user directly.

I remember something about this being expected behaviour. exec does not
open a new pty, while enter does.

Bastian

-- 
We fight only when there is no other choice.  We prefer the ways of
peaceful contact.
		-- Kirk, "Spectre of the Gun", stardate 4385.3