Dan Nelson <[EMAIL PROTECTED]> 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
                                        [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to