X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=src%2Fmodules.cpp;h=4d00b662217796e3304ecb7cbeb290abce5eca1f;hp=18238b63b2f7b80fab47e8dd69299a35d8ee4b40;hb=e7f41bcf7b9b13a3a744ade63f5c00ba9097c990;hpb=654c4c47282bad586232db5e5cfbfa97035f1bad diff --git a/src/modules.cpp b/src/modules.cpp index 18238b6..4d00b66 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -1,4 +1,4 @@ -/* $Id: modules.cpp,v 1.2 2005-06-10 22:53:43 adam Exp $ +/* $Id: modules.cpp,v 1.3 2005-06-21 18:46:04 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -43,7 +43,8 @@ public: Yaz_ProxyModule *get_next() { return m_next; }; int is_module(const char *name); int authenticate(const char *target_name, void *element_ptr, - const char *user, const char *group, const char *password); + const char *user, const char *group, const char *password, + const char *peer_IP); }; int Yaz_ProxyModule::is_module(const char *name) @@ -86,7 +87,8 @@ Yaz_ProxyModule::~Yaz_ProxyModule() int Yaz_ProxyModule::authenticate(const char *name, void *element_ptr, const char *user, const char *group, - const char *password) + const char *password, + const char *peer_IP) { if (m_entry->int_version == 0) { @@ -96,7 +98,7 @@ int Yaz_ProxyModule::authenticate(const char *name, if (!int0->authenticate) return YAZPROXY_RET_NOT_ME; return (*int0->authenticate)(m_user_handle, name, element_ptr, - user, group, password); + user, group, password, peer_IP); } return YAZPROXY_RET_NOT_ME; } @@ -131,7 +133,8 @@ int Yaz_ProxyModules::authenticate(const char *module_name, const char *target_name, void *element_ptr, const char *user, const char *group, - const char *password) + const char *password, + const char *peer_IP) { int ret = YAZPROXY_RET_NOT_ME; Yaz_ProxyModule *m = m_list; @@ -140,7 +143,8 @@ int Yaz_ProxyModules::authenticate(const char *module_name, if (m->is_module(module_name)) { ret = m->authenticate(target_name, element_ptr, - user, group, password); + user, group, password, + peer_IP); if (ret != YAZPROXY_RET_NOT_ME) break; }