From owner-freebsd-stable@FreeBSD.ORG Tue Nov 6 20:46:31 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F9F616A421 for ; Tue, 6 Nov 2007 20:46:31 +0000 (UTC) (envelope-from gepu@iogyte.ro) Received: from iogyte.ro (mail.iogyte.ro [62.231.111.163]) by mx1.freebsd.org (Postfix) with SMTP id A14B513C4A5 for ; Tue, 6 Nov 2007 20:46:30 +0000 (UTC) (envelope-from gepu@iogyte.ro) Received: (qmail 6738 invoked by uid 1001); 6 Nov 2007 20:19:48 -0000 Date: Tue, 6 Nov 2007 22:19:48 +0200 From: Dan Epure To: freebsd-stable@freebsd.org Message-ID: <20071106201948.GA6590@iogyte.ro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Subject: openpty() and jail in RELENG_7 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Epure List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 20:46:31 -0000 Hi All, I'm using on the host system (7.0-BETA2): #sysctl kern.pts.enable kern.pts.enable: 1 I have no problem at all. The jail is also 7.0-BETA2 The problem is inside the jail openpty() can not allocate the pty: === cut here === debug1: monitor_child_preauth: test2 has been authenticated by privileged process debug1: PAM: reinitializing credentials debug1: Entering interactive session for SSH2. debug1: server_init_dispatch_20 debug1: server_input_channel_open: ctype session rchan 0 win 65536 max 16384 debug1: input_session_request debug1: channel 0: new [server-session] debug1: session_new: init debug1: session_new: session 0 debug1: session_open: channel 0 debug1: session_open: session 0: link with channel 0 debug1: server_input_channel_open: confirm session debug1: server_input_channel_req: channel 0 request pty-req reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req pty-req debug1: Allocating pty. debug1: session_new: init debug1: session_new: session 0 openpty: No such file or directory session_pty_req: session 0 alloc failed debug1: server_input_channel_req: channel 0 request shell reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req shell === and here === the ssh session just hangs. (no pty ?) I did not forget to mount devfs inside the jail. The jail is configured in rc.conf: === cut here === jail_enable="YES" jail_list="test" jail_test_hostname="test.mydomain.org" jail_test_rootdir="/jails/test" jail_test_interface="bge0" jail_test_devfs_enable="YES" jail_test_ip="192.168.10.2" jail_set_hostname_allow="NO" jail_sysvipc_allow="NO" jail_socket_unixiproute_only="YES" === and here === I think the problem is related to restrictions imposed by the jail. Please advise. Gepu