============================== CAMDPAMS OldOracle HTTP server ============================== 1. Http authentication required. Now it's provided by mod_auth_pgsql v.2.0.3 for apache. Users get access via their CAMDPAMS Database login-password from 192.168.8.12. Base CAMDPAMS, table 'users', fields 'UserName' and 'UserPassword'. User (read-only) mis. Password ********. Passwords are md5-hashed by postgresql from concutenation 'PassName', not 'Pass' only, so Robert Ayrapetyan had been rewrited the source code of this module for providing data compartibility with existent fields of database. New mod_auth_pgsql.c file must be compiled (via Apxs) and must be added to httpd.conf file (apxs does it). Also libpq.so.5 required. All files are on CAMDPAMS ftp in ./OO/files/ a) If you want to compile module yourself then do next: Download and untar mod_auth_pgsql-2.0.3, replace .c source. Then yum install mod_auth_pgsql yum install libpqxx # must be libpq.so.5 currently yum install apxs yum install http-devel apxs -i -a -c -I /usr/include -L /usr/lib -lpq mod_auth_pgsql.c Look at paths carefully. Then check if the module has been added to .conf files and reload httpd. b) Install mod_auth_pgsql. Replace mod_auth_pgsql.so with new one to /usr/lib/modules/httpd/ and check if /usr/lib/libpq.so.5 exists. (yum install libpqxx). Then check if the module has been added to .conf files and reload httpd. You can get compiled module mod_auth_pgsql.so from svn repository: Add to .htaccess AuthName "Welcome to CAMDPAMS Management Information System" AuthType basic Auth_PG_host 10.224.18.10 Auth_PG_port 5432 Auth_PG_user mis Auth_PG_pwd ******** # ask db admin Auth_PG_database CAMDPAMS Auth_PG_pwd_table users Auth_PG_uid_field '"UserName"' Auth_PG_pwd_field '"UserPassword"' Auth_PG_hash_type MD5 require valid-user 2. Need to set DirectoryIndex in .htaccess DirectoryIndex status-overview.asp ----- PATCH ----- From line 834 goes the next (with some replace) -- CUT -- /* !!!patched for postgres pw||user support by * ARA!!!-----------------------------------*/ int ctn_user_pw_len = 1 + 2 * strlen(user) + 2 * strlen(sent_pw); char *ctn_user_pw = apr_palloc(r->pool, ctn_user_pw_len); memset(ctn_user_pw, 0, ctn_user_pw_len); strcat(strcat(ctn_user_pw, sent_pw), user); //apr_snprintf(pg_errstr, MAX_STRING_LEN, "Concatenation: %s", //ctn_user_pw); //ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", pg_errstr); /*--------------------------------------------------------------------------------------*/ if (sec->auth_pg_encrypted) switch (sec->auth_pg_hash_type) { case AUTH_PG_HASH_TYPE_MD5: sent_pw = auth_pg_md5(ctn_user_pw); /*!!!patched for postgres support by ARA (old value was sent_pw)!!!*/ //apr_snprintf(pg_errstr, MAX_STRING_LEN, "Digest: %s", sent_pw); //ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", pg_errstr); break; case AUTH_PG_HASH_TYPE_CRYPT: sent_pw = (char *) crypt(sent_pw, real_pw); break; case AUTH_PG_HASH_TYPE_BASE64: sent_pw = auth_pg_base64(sent_pw); break; } -- CUT --