This program was originally written by K. Richard Magill,
and posted to mod.sources. Since it contained a few
SYS5 dependencies, a *serious* security bug, and no sanity
checks at all, I decided to hack it up a bit.

It now checks a given shell for existence and executability (only
by looking at the mode, sorry), and it honors the standard
(as far as I know) algorithm for locking password files.

The serious security bug was the following: Imagine a user called
hacky doing the following:
chsh hacky '/bin/sh
dummy::0:0::/:'

So, if you've installed it already, better remove it *fast*.

Also, some cosmetic changes were made: If no username is given, the
current user is assumed, and if no shell/realname is given, the
old one is printed, and a new one asked.

INSTALLATION:

First, look at the defines at the top in chsh.c. If your system has
putpwent(), remove the #define NOPUTPWENT.

Second, if you don't mind people playing with other people's
shells and names, remove the #define SECURE.

Third, KEEP YOUR HANDS OFF the #define DEBUG.

I tried this on a mucho hacked up 11/34 running V7, so it is not
more than sensible that you test it before letting it anywhere near
the password file.

Now, compile it, run it a few times (not as super-user), and,
when you're satisfied, remove the #define DEBUG.

Now you can type make install, to re-compile and install it.
(Don't forget to look at the Makefile to make sure all
paths are as you would like them).

--
	Jack Jansen, jack@htsa.UUCP (or jack@mcvax.UUCP)
	...!mcvax!vu44!htsa!jack
	The shell is my oyster.
