From: Antony Dovgal Date: Wed, 22 Mar 2006 09:45:39 +0000 (+0000) Subject: fix #36820 (Privileged connection with an Oracle password file fails) X-Git-Tag: php-5.1.3RC2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c101d64007fb555e8b82767e3ba25f964defcc1;p=php fix #36820 (Privileged connection with an Oracle password file fails) --- diff --git a/NEWS b/NEWS index 0fa2328853..0f9d3424df 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS (also fixes bug #36764). (Tony) - Removed the E_STRICT deprecation notice from "var". (Ilia) - Fixed debug_zval_dump() to support private and protected members. (Dmitry) +- Fixed bug #36820 (Privileged connection with an Oracle password file fails). + (Tony) - Fixed bug #36809 (__FILE__ behavior changed). (Dmitry) - Fixed bug #36808 (syslog ident becomes garbage between requests). (Tony) - Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection). diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 3b078b4617..cfa5a82197 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -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; }