 This package is an NSAPI plugin function to authenticate users
  against an MYSQL table.

It is for HTTP "Basic" authentication and gets the user/password
information from the "Authorization:" header.

This package does not include any tool for record input -- assuming
you have other tools to do this.

You may want to modify the code and Makefile to suit your system:
1) The code assumes a table structure
create table USERS (
 	  user  char(32),
	  password  char(32),
	  usergroup   char(32), 
        primary key(user)
	  ) 
You may modify the auth_mysql.c to accomodate your own table structure.

2) The password is encrypted in Unix password style.  If you have
something different, you may want to change the auth_mysql.c code.

3) Modify the Makefile.mysql variables:
CC=Your_C_Compiler
NS_INCLUDE=Your_NSAPI_header_file_directory
MYSQL=MySQL directory.

After this, you can compile and install the function:

1) Compile
% make -f Makefile.mysql

2) Modify your Netscape server configuration file:
 At the beginning of obj.conf add
 *Init fn=load-modules shlib=auth_mysql.so funcs=auth_mysql

 Inside an object in obj.conf:
 *AuthTrans fn=auth_mysql auth-type="basic" mysql_db=MYDB mysql_tb="user_records" \
 	mysql_host="localhost" [mysql_user=ME] [mysql_pw=PASSWORD]
 
 PathCheck realm="mysql" fn="require-auth" [auth-users=(USER1|USER2...)] \
 		auth-type="basic" 

3) Save obj.conf and start your server.
