From 9925a274787e1d5ddcc3dc81054dd69ce1728049 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 18 Jan 2006 10:50:13 +0000 Subject: [PATCH] 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). --- src/filter_auth_simple.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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( -- 1.7.10.4