diff options
author | Frank M. Kromann <fmk@php.net> | 2002-05-09 20:37:45 +0000 |
---|---|---|
committer | Frank M. Kromann <fmk@php.net> | 2002-05-09 20:37:45 +0000 |
commit | f0141f965f3df34d4dcc046d75555c18ff3650eb (patch) | |
tree | a3c0d54625133f99299a9cbcd580ce5d6a816c46 /ext/mssql/php_mssql.c | |
parent | 1e55a4239184b59b7e92a22769c39f48e3550080 (diff) | |
download | php-git-f0141f965f3df34d4dcc046d75555c18ff3650eb.tar.gz |
Allow the MSSQL extension to use NT authentication
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r-- | ext/mssql/php_mssql.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 242b8b4a7d..e2896bb7c3 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -136,6 +136,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY_EX("mssql.textlimit", "-1", PHP_INI_ALL, OnUpdateInt, textlimit, zend_mssql_globals, mssql_globals, display_text_size) STD_PHP_INI_ENTRY_EX("mssql.batchsize", "0", PHP_INI_ALL, OnUpdateInt, batchsize, zend_mssql_globals, mssql_globals, display_link_numbers) STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals) + STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals) PHP_INI_END() /* error handler */ @@ -441,11 +442,16 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) dbprocerrhandle(mssql.login, (DBERRHANDLE_PROC) php_mssql_error_handler); dbprocmsghandle(mssql.login, (DBMSGHANDLE_PROC) php_mssql_message_handler); - if (user) { - DBSETLUSER(mssql.login,user); + if (MS_SQL_G(secure_connection)){ + DBSETLSECURE(mssql.login); } - if (passwd) { - DBSETLPWD(mssql.login,passwd); + else { + if (user) { + DBSETLUSER(mssql.login,user); + } + if (passwd) { + DBSETLPWD(mssql.login,passwd); + } } DBSETLAPP(mssql.login,MS_SQL_G(appname)); mssql.valid = 1; |