[comp.sys.apollo] gpr_$borrow mode and ^q

GBOPOLY1@NUSVM.BITNET (fclim) (09/14/88)

hi,
     i am attempting to port the unix terminal-locking program
lock(1) to apollo computers.  the program is supposed to lock
the screen (by blanking it) and the keyboard.  this way, no
intruder may logoff the legal user when the latter is away from
the terminal.  a more important side-effect is that lock(1)
prevents the intruder from creating another process (eg. cp /com/sh)
and doing malicious acts like changing the legal user's passwd.

     i use the gpr routines and initialize the bitmap to gpr_$borrow
mode.  from the manuals, all keys are disabled by default.  even if
they are enabled by the instruction, gpr_$enable_inputs(type, keyset, st),
the meanings of each key as set by the dm command, kd, are lost.

     or should have been lost.  when i test my program, i found out
that <control q> causes the program to quit.   thus, the intruder
just have to hit ^q for the dm to reappear.   the strange thing is
that i use my mods of bsd4.2_key3, which redefines ^q to null.  ie,
i have kd ^q ke.

     help me, *please*.  my port is near completion.  but, if i can't
get rid of the effect of ^q, then it (the port) is useless.

     my program also needs to write to a file in /tmp.  i need the
full absolute pathname of this file right from the network root //.
so i use the unix system call, gethostname(host, strlen(host)).
but this returns -1 and *host == NULL.

     before adding the above code to my program, i used hostname(1).
at a csh level, i issued
           % hostname
           wm
so i expect gethostname(host, strlen(host)) to return 0 and put
"wm" into host.

     when we set up our network, we use the aegis commands like
uctnode and ctnode.  we did not use hostname.

     what's wrong here?   it isn't important, but any help would
make my program portable (across apollo computers installations).
so any help will be much appreciated.

     beaucoups of thanks in advance.


fclim          --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu
computer centre
singapore polytechnic
dover road
singapore 0513.