-/* $Id: mod_helsinki.cpp,v 1.1 2006-03-25 10:56:28 adam Exp $
+/* $Id: mod_helsinki.cpp,v 1.3 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2005, Index Data.
This file is part of the yaz-proxy.
#include <time.h>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
{
// see if we have an "args" attribute
const char *args = 0;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr = (xmlNodePtr) element_ptr;
struct _xmlAttr *attr;
#endif
// args holds args (or NULL if none are provided)
- yaz_log(YLOG_LOG, "Authentication: authenticating user %s, address %s", user ? user : "-", peer_IP ? peer_IP : "-");
+ yaz_log(YLOG_LOG, "Authentication: authenticating user %s, address %s", user ? user : "(none)", peer_IP ? peer_IP : "-");
// authentication handler
char user_file[255], ip_file[255];
*ip_file = '\0';
sscanf(args, "%254[^:]:%254s", user_file, ip_file);
- yaz_log(YLOG_LOG, "Authentication: user file: %s, ip file: %s", user_file, ip_file);
+ yaz_log(YLOG_DEBUG, "Authentication: user file: %s, ip file: %s", user_file, ip_file);
// Check if the IP address is listed in the file of allowed address ranges.
// The format of the file:
int status = YAZPROXY_RET_PERM;
if (ip_file && peer_IP)
{
- yaz_log(YLOG_LOG, "Authentication: checking ip address");
+ yaz_log(YLOG_DEBUG, "Authentication: checking ip address");
const char *pIP = peer_IP;
if (strncmp(pIP, "tcp:", 4) == 0)
if (!user || !password || !*user_file)
{
- yaz_log(YLOG_WARN, "Authentication: no user name, password or user file specified");
+ yaz_log(YLOG_LOG, "Authentication: anonymous authentication failed");
return YAZPROXY_RET_PERM;
}