| 1360 | } |
| 1361 | |
| 1362 | void Mapping::setInternalFlags() |
| 1363 | { |
| 1364 | internalFlags &= ~(FLAG_DB | FLAG_SEC); |
| 1365 | |
| 1366 | if (!mainDb) |
| 1367 | internalFlags |= FLAG_DB; |
| 1368 | if (!securityAlias) |
| 1369 | internalFlags |= FLAG_SEC; |
| 1370 | |
| 1371 | // detect presence of non-plugin databases mapping in authBlock |
| 1372 | // in that case mapUser was already invoked for it |
| 1373 | if (authBlock) |
| 1374 | { |
| 1375 | AuthReader::Info info; |
| 1376 | for (AuthReader rdr(*authBlock); rdr.getInfo(info); rdr.moveNext()) |
| 1377 | { |
| 1378 | MAP_DEBUG(fprintf(stderr, "info.plugin=%s info.secDb=%s db=%s securityDb=%s\n", |
| 1379 | info.plugin.c_str(), info.secDb.c_str(), mainDb ? mainDb : "NULL", secExpanded.c_str())); |
| 1380 | |
| 1381 | if (info.plugin.isEmpty()) |
| 1382 | { |
| 1383 | if (mainDb && info.secDb == mainDb) |
| 1384 | internalFlags |= FLAG_DB; |
| 1385 | if (securityAlias && info.secDb == secExpanded.c_str()) |
| 1386 | internalFlags |= FLAG_SEC; |
| 1387 | } |
| 1388 | } |
| 1389 | } |
| 1390 | } |
| 1391 | |
| 1392 | void Mapping::setSqlRole(const Firebird::string& role) |
| 1393 | { |