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_at_waldi.eu.org>
Date: Sat 21 Jul 2012 - 12:39:25 BST
Message-ID: <20120721113925.GA28154@wavehammer.waldi.eu.org>

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
Received on Sat Jul 21 12:39:40 2012
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 21 Jul 2012 - 12:39:40 BST by hypermail 2.1.8