summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
57a48e6)
If no result was found in Torus lookup and user&password was given,
then return 'VInit/AC: Bad Userid and/or Password'. If lookup failed,
and user/password was not given (IP auth in effect) return
'Init/AC: Blocked network address'.
yaz_log(YLOG_LOG, "IP=%s", ip.c_str());
std::string torus_query;
yaz_log(YLOG_LOG, "IP=%s", ip.c_str());
std::string torus_query;
if (user.length() && password.length())
{
torus_query = "userName==\"" + escape_cql_term(user) +
"\" and password==\"" + escape_cql_term(password) + "\"";
if (user.length() && password.length())
{
torus_query = "userName==\"" + escape_cql_term(user) +
"\" and password==\"" + escape_cql_term(password) + "\"";
+ failure_code = YAZ_BIB1_INIT_AC_BAD_USERID_AND_OR_PASSWORD;
torus_query = "ip encloses/net.ipaddress \"";
torus_query += escape_cql_term(std::string(ip_cstr));
torus_query += "\"";
torus_query = "ip encloses/net.ipaddress \"";
torus_query += escape_cql_term(std::string(ip_cstr));
torus_query += "\"";
+ failure_code = YAZ_BIB1_INIT_AC_BLOCKED_NETWORK_ADDRESS;
torus_query, dummy_realm, m_p->proxy);
if (!doc)
{
torus_query, dummy_realm, m_p->proxy);
if (!doc)
{
- *error = YAZ_BIB1_UNSPECIFIED_ERROR;
+ // something fundamental broken in lookup.
+ *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR;
*addinfo = odr_strdup(odr, "Torus server unavailable or "
"incorrectly configured");
return;
*addinfo = odr_strdup(odr, "Torus server unavailable or "
"incorrectly configured");
return;
- *error = YAZ_BIB1_INIT_AC_BAD_USERID_AND_OR_PASSWORD;
return;
}
session_realm = mp::xml::get_text(ptr);
return;
}
session_realm = mp::xml::get_text(ptr);