Date: Fri, 20 Apr 2001 00:32:14 -0700 From: Dima Dorfman <dima@unixfreak.org> To: Dan Nelson <dnelson@emsphone.com> Cc: hackers@FreeBSD.ORG Subject: Re: Restricting the console to one vty (patch) Message-ID: <20010420073214.93BD43E09@bazooka.unixfreak.org> In-Reply-To: <20010418092731.B733@dan.emsphone.com>; from dnelson@emsphone.com on "Wed, 18 Apr 2001 09:27:31 -0500"
next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson <dnelson@emsphone.com> writes: > In the last episode (Apr 18), Dima Dorfman said: > > Attached is a patch that makes it possible to restrict (``freeze'') > > the console to a single vty (the active one). This can be used in > > conjunction with, e.g., lock(1) to setup a relative safeguard against > > malicious access while the user is away from his terminal (lock(1) > > alone doesn't help unless the user wants to do it for every vty he's > > logged into, which quickly gets repetitive). I believe this would be > > especially useful for laptops. > > Isn't there already support for this? > > [ snip definition of struct vt_mode ] > > If you call VT_SETMODE and tell the console that screen switching is > VT_PROCESS, that will disable VTY switching (libvgl sets this so it can > disable graphics mode when the user wants to switch screens). It doesn't do quite what's needed in this case. This mechanism is intended to notify processes when the user wants to switch screens, not to allow the process to stop the switch. It can be used that way, but 1) the process must be in the foreground on that terminal, so if it is used it'd have to be built into lock(1) or some such; and 2) if you do try to switch the screen while it's active, weird stuff starts happening; e.g., all input to the program running stops for a while, then restarts. I don't know if this is how it's supposed to work (although that may very well be the case, since all the program should be doing is releasing resources to allow the switch to happen), but esp. the latter makes it kind of useless for this purpose. Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010420073214.93BD43E09>
