From: Mike Taylor Date: Wed, 18 Jan 2006 10:50:13 +0000 (+0000) Subject: Recognise special database name "*" in user-register file, indicating X-Git-Tag: YP2.0.0.2~22 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=9925a274787e1d5ddcc3dc81054dd69ce1728049;p=metaproxy-moved-to-github.git Recognise special database name "*" in user-register file, indicating that the user is allowed access to all databases (but will still be subject to any target-authorisation tests to follow). --- diff --git a/src/filter_auth_simple.cpp b/src/filter_auth_simple.cpp index a6b225d..10f1f42 100644 --- a/src/filter_auth_simple.cpp +++ b/src/filter_auth_simple.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_auth_simple.cpp,v 1.8 2006-01-18 10:30:32 mike Exp $ +/* $Id: filter_auth_simple.cpp,v 1.9 2006-01-18 10:50:13 mike Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -202,7 +202,8 @@ void yf::AuthSimple::process_search(yp2::Package &package) const std::string user = m_p->userBySession[package.session()]; yf::AuthSimple::Rep::PasswordAndDBs pdb = m_p->userRegister[user]; for (int i = 0; i < req->num_databaseNames; i++) { - if (!contains(pdb.dbs, req->databaseNames[i])) { + if (!contains(pdb.dbs, req->databaseNames[i]) && + !contains(pdb.dbs, "*")) { // Make an Search rejection APDU yp2::odr odr; Z_APDU *apdu = odr.create_searchResponse(