Fwd: [Re: openpty() and jail in RELENG_7]
Dan Epure
gepu at iogyte.ro
Thu Nov 15 12:20:32 PST 2007
----- Forwarded message from Dan Epure <gepu at iogyte.ro> -----
Date: Thu, 15 Nov 2007 19:11:43 +0200
From: Dan Epure <gepu at iogyte.ro>
To: John Baldwin <jhb at freebsd.org>
Cc: freebsd-current at freebsd.org
Subject: Re: openpty() and jail in RELENG_7
The /etc/defaults/devfs.rules version is:
# $FreeBSD: src/etc/defaults/devfs.rules,v 1.4.2.1 2007/11/11 22:52:31 csjp Exp $
This solved my problem. But other issues came out.
1. The following patch would help the stop/start of the jail (now, if you stop and start a jail /dev/pts and /dev/pty would not show again):
=== cut here ===
*** /usr/src/etc/defaults/devfs.rules Mon Nov 12 09:56:30 2007
--- /etc/defaults/devfs.rules Thu Nov 15 18:20:35 2007
***************
*** 54,56 ****
--- 54,58 ----
add path 'ttyS*' unhide
+ add path 'pts' unhide
add path 'pts/*' unhide
+ add path 'pty' unhide
add path 'pty/*' unhide
=== and here ===
2. I noticed a strange behavior.
=== cut here ===
# ls -la /dev/pt[sy]/
/dev/pts/:
total 1
dr-xr-xr-x 2 root wheel 512 Nov 15 18:46 .
dr-xr-xr-x 6 root wheel 512 Nov 15 18:42 ..
crw-rw-rw- 1 root wheel 0, 95 Nov 15 18:48 0
/dev/pty/:
total 1
dr-xr-xr-x 2 root wheel 512 Nov 15 18:46 .
dr-xr-xr-x 6 root wheel 512 Nov 15 18:42 ..
crw-rw-rw- 1 root wheel 0, 93 Nov 15 18:48 0
# ls -la /dev/ptmx
crw-rw-rw- 1 root wheel 0, 99 Nov 15 18:41 /dev/ptmx
# ls -la /dev/pt[sy]
/dev/pts:
total 1
dr-xr-xr-x 2 root wheel 512 Nov 15 18:45 .
dr-xr-xr-x 6 root wheel 512 Nov 15 18:41 ..
crw--w---- 1 gepu tty 0, 95 Nov 15 19:06 0
/dev/pty:
total 1
dr-xr-xr-x 2 root wheel 512 Nov 15 18:45 .
dr-xr-xr-x 6 root wheel 512 Nov 15 18:41 ..
crw-rw-rw- 1 root wheel 0, 93 Nov 15 19:06 0
crw-rw-rw- 1 root wheel 0, 99 Nov 15 18:41 1
crw-rw-rw- 1 root wheel 0, 100 Nov 15 18:41 2
=== and here ===
for every "ls -la /dev/ptmx" I get another two entries in /dev/pty and no aditional entry in /dev/pts. I can repeat this until I reach kern.pts.max in /dev/pty. At this moment there is not available pty.
Regards,
Gepu
On Thu, Nov 15, 2007 at 08:56:34AM -0500, John Baldwin wrote:
> On Sunday 11 November 2007 06:24:56 am Dan Epure wrote:
> > Maybe I have better luck here:
>
> Do you have the recent fix to unhide /dev/pts devices in the default jail
> rules for devfs?
>
> --
> John Baldwin
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
_______________________________________________
freebsd-current at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
----- End forwarded message -----
More information about the freebsd-stable
mailing list