X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffilter_auth_simple.cpp;h=d394777f94d99a276e97e78d61b91fc01620c75f;hb=85189f2d04df4cfc8b16ee78187fb89d00dfe3ff;hp=dca3558663dd49d627aa220cb861081947640b7b;hpb=e1c7fdb3e2ff41fb43ea3dd2c540b6d568dee851;p=metaproxy-moved-to-github.git diff --git a/src/filter_auth_simple.cpp b/src/filter_auth_simple.cpp index dca3558..d394777 100644 --- a/src/filter_auth_simple.cpp +++ b/src/filter_auth_simple.cpp @@ -1,7 +1,22 @@ -/* $Id: filter_auth_simple.cpp,v 1.21 2006-08-30 12:27:34 adam Exp $ - Copyright (c) 2005-2006, Index Data. +/* $Id: filter_auth_simple.cpp,v 1.25 2008-02-20 15:07:51 adam Exp $ + Copyright (c) 2005-2007, Index Data. - See the LICENSE file for details +This file is part of Metaproxy. + +Metaproxy is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Metaproxy; see the file LICENSE. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ #include "config.hpp" @@ -61,7 +76,7 @@ static void die(std::string s) { throw mp::filter::FilterException(s); } // Read XML config.. Put config info in m_p. -void mp::filter::AuthSimple::configure(const xmlNode * ptr) +void mp::filter::AuthSimple::configure(const xmlNode * ptr, bool test_only) { std::string userRegisterName; std::string targetRegisterName; @@ -342,8 +357,8 @@ void yf::AuthSimple::check_targets(mp::Package & package) const std::list authorisedTargets = m_p->targetsByUser[user]; std::list targets; - Z_OtherInformation *otherInfo = initReq->otherInfo; - mp::util::get_vhost_otherinfo(otherInfo, targets); + Z_OtherInformation **otherInfo = &initReq->otherInfo; + mp::util::remove_vhost_otherinfo(otherInfo, targets); // Check each of the targets specified in the otherInfo package std::list::iterator i; @@ -366,9 +381,8 @@ void yf::AuthSimple::check_targets(mp::Package & package) const YAZ_BIB1_ACCESS_TO_SPECIFIED_DATABASE_DENIED, // ### It would be better to use the Z-db name "all databases"); - mp::odr odr; - mp::util::set_vhost_otherinfo(&otherInfo, odr, targets); + mp::util::set_vhost_otherinfo(otherInfo, odr, targets); package.move(); }