Date: Mon, 18 Jun 2007 13:50:46 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: Kris Kennaway <kris@obsecurity.org> Cc: current@FreeBSD.org Subject: Re: Userland problems from kern.pts.enable=1 Message-ID: <1182171046.1253.10.camel@localhost> In-Reply-To: <20070617213948.GA50404@rot13.obsecurity.org> References: <20070617213948.GA50404@rot13.obsecurity.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sun, 2007-06-17 at 17:39 -0400, Kris Kennaway wrote:
> When the kern.pts.enable sysctl is set to '1', pseudo-ttys are created
> with device name /dev/pts/${NUMBER}. With some kernel fixes from kib
> this appears to now be stable and the kernel side is ready for a
> possible change of default. However, the new device naming confuses
> some userland utilities. For example:
>
> pointyhat# write simon
> write: /dev/398: No such file or directory
>
> simon was logged in on /dev/pts/398.
>
> killall -t also fails to parse the new device format:
>
> bento# ps -t pts/187
> PID TT STAT TIME COMMAND
> 67734 187 Ss 0:00.04 /bin/csh
> 72599 187 R+ 0:00.00 ps -t pts/187
> bento# killall -t pts/187
> killall: stat(/dev/ttypts/187): No such file or directory
>
> It would also be useful if ps -t recognized a numeric argument as
> magic and converted it to add the pts/. It already appears to do the
> converse when displaying the TTY, as you can see above.
>
> There are probably other utilities also affected.
>
> Kris
>
If no-one has already started working on these, I've had a look at a few
of these utils and the changes look quite straightforward. I've been
looking for something like this (simple enough for me to do, simple
enough that a I can't £$%^ it up too much) so I can contribute back to
FreeBSD.
So far, I'm looking at usr.bin/killall, bin/ps and usr.bin/write
Tom
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
iD8DBQBGdn+mlcRvFfyds/cRAuLqAJ48zWbq/ptxov2fPyzZVXTRSDms0gCgmB9J
PCYj0ShIsxJa7iKUPz8scPo=
=0HmC
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1182171046.1253.10.camel>
