Locking Virtual Terminals

Paul de Bra wsinpdb at eutws1.win.tue.nl
Tue Feb 13 20:27:25 AEST 1990


In article <8030 at cbnewsh.ATT.COM> gkm at cbnewsh.ATT.COM (gary.k.mc nees,ho,) writes:
>I have a locking program which will lock any particular virtual terminal.
>However, all one has to do to get in is to key to another vt which is not
>locked.  Its too much to lock all of them. Does anyone know how to securly
>lock the PC when the vtlmgr is running?  Is there a way to keep the ALT
>key from being recognized? Any ideas? Has anyone written a program to lock
>one terminal when one has several terminals running and prevent access to
>other terminals?

The key to the solution is in kd(7).
One can set the vt-mode so the switching between vt's is disabled.
Try something like:
    vtmode.mode = VT_PROCESS;
    vtmode.waitv = 1;
    vtmode.relsig = SIGUSR1;
    vtmode.acqsig = SIGUSR1;
    vtmode.frsig = SIGUSR2;
    if (ioctl(egafd, VT_SETMODE, &vtmode) < 0)
      fprintf(stderr,"Warning, cannot set VT mode\n");
    signal(SIGUSR1, donothing);
    ...

Paul.
(debra at research.att.com)



More information about the Comp.unix.i386 mailing list