Subject: Re: Disabling L1-A and root passwds

From: [email-masked] (Klaus Kaempf)
Date: Thu, 16 Dec 1993 13:46:57 GMT

We had this discussion last year regarding Solaris 1.x. I still have the stuff
here, if anyone is interested ...

Carsten Dieste ([email-masked]) asked me about this a few weeks
ago and mailed me his version of the program to enable/disable L1-A. The following
program should work on Solaris 2.x (I haven't tested it, use at your own risk :-)

/*
 * The reset sequence disable program.
 */
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/kbd.h>
#include <sys/kbio.h>

main()
{
  struct kiockey key ;
  int fd ;
  int z,i ;

  fd = open( "/dev/kbd", 1 ) ;
  if( fd < 0 ) {
    perror("Open") ;
    exit( 1 ) ;
  }
  key.kio_tablemask = KIOCABORT1 ;
  ioctl( fd, KIOCGETKEY, &key ) ;             /* read abort key entry */
  if (key.kio_station == 0)
    printf("L1-A reset sequence already disabled\n");
  else if (key.kio_station == 1)
    printf("L1-A reset sequence enabled\n");
  key.kio_station = 0 ;
  ioctl( fd, KIOCSETKEY, &key ) ;             /* map it to a 'hole' in map */
  ioctl( fd, KIOCGETKEY, &key ) ;             /* verify the change */
  if (key.kio_station == 0)
    printf("L1-A reset sequence disabled\n");
  else if (key.kio_station == 1)
    printf("L1-A reset sequence still enabled\n");
}

-- 
Klaus Kaempf                 E-Mail: [email-masked]
Jakobstr. 181                Fax:    0241-403407
D-52064 Aachen               Voice:  0241-403446