/* */
parse arg configFile .
/***************************************************************************/
/* socket is number 0 */
sock=0
/***************************************************************************/
call readConfig(configFile)
call Pragma("D",global.RootDir)
/***************************************************************************/
/* who is it? */
if ~GetPeerName(0,"NAME")<0 then do
call ErrLog("hserv Can't get peer info (" || errno() || ")")
exit
end
peer = name.addrAddr
if global.HostnameLookups=="ON" then
if GetHostByAddr("HOST",name.addrAddr) then peer = host.hostName
/***************************************************************************/
/* auth */
if global.Auth=="ON" then do
auth=AuthFun(name.addrAddr,80,name.addrPort)
if left(auth,4)=="-ERR" then do
parse var auth"-ERR "code
call sen "HTTP/1.0 400 Forbidden"
call sen "Content-Type: text/html"
call sen ""
call sen "ERROR
ARexxRXSWebServer error:
sorry" peer ", you don't have the ident service running,
or an error stopped your lookup.