MF51: fix #36820 (Privileged connection with an Oracle password file fails)

This commit is contained in:
Antony Dovgal 2006-03-22 09:46:13 +00:00
parent 45f6a3d87d
commit 49b16f7254

View File

@ -1286,7 +1286,11 @@ open:
case OCI_SYSDBA:
case OCI_SYSOPER:
default:
OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_EXT, (ub4) session_mode));
if (username_len == 1 && username[0] == '/' && password_len == 0) {
OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_EXT, (ub4) session_mode));
} else {
OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_RDBMS, (ub4) session_mode));
}
break;
}