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?

struct vt_mode {
        char            mode;
#define VT_AUTO         0               /* switching is automatic       */
#define VT_PROCESS      1               /* switching controlled by prog */
#define VT_KERNEL       255             /* switching controlled in kernel */
        char            waitv;          /* not implemented yet  SOS     */
        short           relsig;
        short           acqsig;
        short           frsig;          /* not implemented yet  SOS     */
};
typedef struct vt_mode vtmode_t;
#define VT_SETMODE      _IOW('v', 2, vtmode_t)
#define VT_GETMODE      _IOR('v', 3, vtmode_t)

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).

-- 
        Dan Nelson
        [EMAIL PROTECTED]

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

Reply via email to