Gossamer Forum
Home : Products : DBMan : Customization :

Re: Apache Password Authorisation

Quote Reply
Re: Apache Password Authorisation In reply to
I did some experimentation with this, and managed to make it work by adding some lines into the auth.pl script. Basically, when using web server authentication, the lock file is not created and other variables are not initialised. Adding the following lines in seems to sort out the problem:

After the line
elsif ($server_auth) { # The user has logged in via server authentication.

Add the following:
$userid = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};
$uid = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};
srand( time() ^ ($$ + ($$ << 15)) );
$db_uid = "$userid." . time() . (int(rand(100000)) + 1);
open(AUTH, ">$auth_dir/$db_uid") or &cgierr("unable to open auth file: $auth_dir/$uid. Reason: $!\n");
print AUTH "$uid: $ENV{'REMOTE_HOST'}\n";
close AUTH;
foreach (0 .. 3) { $permissions[$_] = int($permissions[$_]); }
&auth_logging('logged on', $userid) if ($auth_logging);

The only slight problem with this is that ypu are required to maintain two password files: the dbman one and the web server one. However, it should be possible to modify the script to maintain these automatically...
Subject Author Views Date
Thread Apache Password Authorisation Patrick Keys 1699 Oct 4, 1999, 7:46 AM
Post Re: Apache Password Authorisation
JPDeni 1650 Oct 4, 1999, 7:50 AM
Post Re: Apache Password Authorisation
bboru 1648 Oct 4, 1999, 4:51 PM
Post Re: Apache Password Authorisation
Eliot 1643 Oct 4, 1999, 5:41 PM
Post Re: Apache Password Authorisation
Patrick Keys 1641 Oct 5, 1999, 9:55 AM
Post Re: Apache Password Authorisation
bboru 1642 Oct 5, 1999, 2:15 PM
Post Re: Apache Password Authorisation
Patrick Keys 1639 Oct 6, 1999, 3:06 AM
Post Re: Apache Password Authorisation
bboru 1635 Feb 5, 2000, 12:13 PM
Post Re: Apache Password Authorisation
Eliot 1653 Feb 5, 2000, 6:09 PM