Version: 1.7.4
Nov 1997

Ever been up at 3am on Monday morning trying to move an essential 
application from one piece of hardware to another and been unable to 
do it because you'll need a new licence key from your vendor and they 
don't give them out at weird hours? Well, here's a solution that 
works in many cases. Basically it allows you to modify the value 
returned by gethostid/sysinfo for the hostid on Solaris 1.x and 2.3-2.6

This package can also be used to reprogram a new NVRAM chip if your
NVRAM fails for some reason. In particular the NVRAM on the Sun 3/80 
and all sun4c machines (Sparc 1,1+,2,IPC,ELC,IPX,etc.) will fail after
a relatively short period of time. See nvram.info if you need to do this.

See the file INSTRUCTIONS for more details than provided here.
See the file QUICK_START if you don't want a lot of details and are
just interested in changing the hostid reported by your operating 
system.

Note that there are examples which show how to load system calls via
modload into running kernels on Sun OS 4.1.x and 5.3-5.6

This kit contains scripts/programs to do this using four different
approaches. These are (pretty much in the order of severity and danger):
1. Use shared libraries to modify the value returned by gethostid/sysinfo
   for a particular group of dynamically linked executables. Does not
   work for statically linked executables.
   newhostid, sidump.c (Solaris 1.x and 2.3), sysinfo.c (Solaris 2.3 & later)
   newhostid was contributed by Jean-Louis Faraut <jlf@sauma.essi.fr>

2. Modify the in-core image of the kernel so that all processes on a running 
   Solaris system will see a different hostid via gethostid/sysinfo.
   hid.c (Sun OS 4.1.x); hid2.c, hid_solaris2.c (Solaris 1.1 and 2.3-2.6); 
   sethostid-simple-4.1; sethostid-simple-5.x

3. Build a new kernel on which certain processes running on a Solaris 
   system will see a different hostid which can be set by a new
      system call (well, really just the old sethostid system call) 
   hostid-by-egid (Solaris 1.1 only).
   Contributed by someone who wishes to remain anonymous

   hostid-by-egid-modload - dynamically loadable version of the
   above. Basically, it lets you load the new sethostid system call
   without completely rebuilding your kernel. Based on the above
   contribution.  

   hostid-by-egid-solaris2 - version of this for Solaris 2.3-2.6

   As an aside these might be useful to someone because they show
   how to dynamically load new system calls into the kernel on 
   Solaris 1.1 and 2.3-2.6

4. Reprogram your NVRAM so that you really have changed your hostid. 
   SPARC only.
   nvram.c (Solaris 1.x only), nvram.info (instructions for
                                           reprogramming from the monitor)
   nvram-sol2.c (solaris 2.4, 2.5, 2.6)
   The other approaches just fake your OS into reporting a
   different hostid via the standard system calls.  This approach is
   much more dangerous, but you may have to resort to it if your
   licence manager actually goes and fetches the IDPROM value (perhaps
   through the OPENPROM interface, see getobphostid.c for a way of
   doing this). In particular 1 and 2 can be undone very easily (reboot). 
   Approach 3 can be undone by rebooting with one's old kernel.  The NVRAM 
   modifier if it is abused or malfunctions can actually render your 
   machine unbootable, even from CDROM. Read the comments in nvram.c and 
   nvram.info before trying this. I don't generally recommend it.

5. Replace your /kernel/misc/sysinit so your Solaris 2.5 x86 machine has
   a different hostid. (Solaris 2.5 x86 only, untested on 2.6)


------------------------------------

This may seem a little overwhelming. Different approaches are better
depending upon circumstances. If you simply want to change the
hostid reported by gethostid for all programs, the simplest approach
is to use hid_solaris2 or hid2 on Solaris 2.[3456] machines, or
hid on Sun OS 4.1.x machines

------------------------------------

I'll try and maintain a copy of the latest version of this package
  on 
     ftp://ftp.mindlink.net/pub/crypto/sun-stuff
     http://www.squirrel.com/squirrel/sun-stuff.html

Please don't use these programs to steal software or to violate your
licence agreements with software vendors. 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 or when your
NVRAM gets wiped out by some unfortunate accident.

USE AT YOUR OWN RISK.

nvram.c and nvram-sol2.c are particularly dangerous.  Read the comments
and proceed with extreme caution. If this program malfunctions or is
misused you can get your NVRAM into a state where you will no longer be
able to boot Sun OS.  Unless you absolutely need to modify your NVRAM,
I recommend going with the approach in hid/hid_solaris2.  Reprogramming
your NVRAM can be useful when it gets wiped out for some reason. BE
SURE TO WRITE DOWN YOUR NVRAM INFO BEFORE YOU MODIFY IT.

Finally, if you want to communicate with me regarding this package,
and have privacy concerns, you can send me PGP encrypted messages. 

I'd also really appreciate receiving any bug reports, encrypted or 
not.

Here are my public keys

pub  1024/B2667EFF 1996/12/24 Mark C. Henderson <mch@squirrel.com>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3

mQCOAzK/JowAAAEEAKWMM60ALPZnQ77NfENyuCEqOHD8CCpJoa5qBE+m3c8F014K
+6heznky/4vqed8R9Jape83Drb2pYx6aE9J8Yd2zG1oUMn9MkTDWS8n8Lca7bM6Q
1He9bO9iDV3MqEmyGTazbWuzbz5DGPqh9F/3tGttW0VZxJqU/qWYCYyyZn7/AA9A
BbQkTWFyayBDLiBIZW5kZXJzb24gPG1jaEBzcXVpcnJlbC5jb20+iQCVAwUQMuYV
88W3gBR09MOpAQEOFgQApPSL9poWIMy+wnRIvl4oDUnHMiq9VVf1nE8VOOZTlLeC
6V437W00ppeek5JktGwiG2x3qXy9KYPS6e9ytxz4YvynkQZl8qzSClnE2okkM/Zq
LWqQnosAR9GBFxctnMkbkkYXn671mZjYMTbfHjhYU+XkH7M78cdEAyKHomzSxz+J
AJUDBRAyv36D4jXUs8WAFeMBAa7fA/91o8kzQMLztmeldJrSG5vTf1gRnyAN54Xl
GxVYYrVBrzkmVzjbEE2O/9Do993l1ZYNCEqoAIrTs6zsnbCFjcoaUboeeVv+CojS
WpTozZwRimoZgsXkgGeE7AYf5+31tRp0lZrfbJJTPAxc1s6Wc+Y8rZa6v9Q9uC5F
dZy/WrAdZokAlQMFEDK/JsGlmAmMsmZ+/wEBsywD/RstaSdIYltS5zHIdV6S9A+m
AdriBM/of50C3PdNOeCukGqQwQJg9uU2kOx4bILMF3va8SkEPs+CDWAWv+Z9PX/6
LszydI0fFE7sDUkE/od5NxbQbD2Kt2l6MnrGi9QWllMm1C7Jv1XLTlYnyjrlfE97
di2lHWcHa72OCiDoA5Bc
=g5Mm
-----END PGP PUBLIC KEY BLOCK-----


pub  1024/C58015E3 1993/04/12 Mark C. Henderson <markh@wimsey.bc.ca>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3

mQCPAivJ3w4AAAEEAMyer3mwrEAfnY65s17lbIzDKEJBJX5m1rceauKEMM5A41+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