]> granicus.if.org Git - php/commitdiff
fix #36820 (Privileged connection with an Oracle password file fails)
authorAntony Dovgal <tony2001@php.net>
Wed, 22 Mar 2006 09:45:39 +0000 (09:45 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 22 Mar 2006 09:45:39 +0000 (09:45 +0000)
NEWS
ext/oci8/oci8.c

diff --git a/NEWS b/NEWS
index 0fa2328853f1a9387d69356a76f56f839b38ab73..0f9d3424dfdc76e5084e6456da96b7788d59e4fc 100644 (file)
--- 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).
index 3b078b4617ac67b67c4889b245e2a6f25f18a16a..cfa5a82197a6a7e1a41f6863db638ca7cfd58de3 100644 (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;
                }