Contributed by someone who wishes to remain anonymous. 

I've made a couple of minor modifications. - mch@squirrel.com

This program is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose. You use
this program at your own risk. The author disclaims responsibility for
any damages that might result from the use of this program, even
if they result from negligence on the part of the author.

Also, please don't use this program to steal software. The intended
use is for emergency situations where an application has to be moved from
one computer to another (e.g. in the event of a hardware malfunction)
and licence keys cannot be obtained quickly from the vendor. Many
vendors will not supply licence keys outside of business hours.

--

     Most commericial packages are bounded to machine hostid for protection.
This ID is built in PROM on Sun Sparc machine.  The purpose of this program
is to let you specify the hostid freely and you can run the commericial
programs on another machine with differnet machine hostid.  This package is
tested and works fine on SunOS 4.1.2, 4.1.3 and 4.1.3_U1.

INSTALLATION:

step 1.
  Copy kern_hostid.c into /sys/os

step 2.
  Add the following line in /sys/conf.common/files.cmn
	os/kern_hostid.c	standard

step 3.
  Replace gethostid declartion with Gethostid, and add the new declartion
of sethostid.  Change system call 143 into sethostid.  The modified version
of /sys/os/init_sysent.c should contain the following lines.

line 25:
int     Gethostid(),sethostname(),gethostname(),getpid();
line 32:
int	sethostid();
line 362:
        2, Gethostid,                   /* 142 = gethostid */
        2, sethostid,                   /* 143 = old sethostid */

step 4:
  Configure your own kernel and rebuild it.  Install it in /vmunix and
reboot.

step 5:
  Compile sethostid.c and install sethostid in /bin.

step 6:
  Done.

USAGE:
     This package check running process's effective gid and user's gid
to determine which hostid should be returned.  If the gid is between
900 to 909, the specified hostid will be returned.  Otherwise, the original
hostid will be returned.  Therefore, you can setgid the target checking
excutable file and it will get what you want when the gethostid system
call is called.  For example, we run '/bin/sethostid 0 12345678'.  All
running processes with gid 900 will get hostid as 12345678 rather than
the real hostid.  Remember the hostid above are all heximal value.
     If you have any problem, try to see the source code.  No help is
provided.

see ../run for a small utility for use with this.
