Re: [Sqlrelay-discussion] SQLRelay hangs with incorrect connection string
Brought to you by:
mused
|
From: Maciej W. <mac...@co...> - 2005-09-02 14:05:11
|
And now I'm receiving "Authentication error" :)
Thanks
--
Maciej Wisniowski
Firstworks/4access napisał(a):
>Looks like there's a bug in the sqlr-listener.
>
>If you edit src/listener/sqlrlistener.C and look for the clientSession()
>function, there's a bit of code like this in the function:
>
> // snooze before and after returning an
> // authentication error to discourage
> // brute-force password attacks
> snooze::macrosnooze(2);
> clientsock->write((unsigned short)ERROR);
> snooze::macrosnooze(2);
>
>(or something similar)
>
>insert a call to flushWriteBuffer(clientsock)
>directly after the call to clientsock->write() and
>it should fix the problem.
>
>Dave
>dav...@fi...
>
>On Wed, 2005-08-31 at 10:53 +0200, Maciej Wisniowski wrote:
>
>
>>Hi
>>
>>I've just ecountered one problem with connection parameters to SQLRelay
>>
>>. In sqlrelay.conf I have:
>>
>><instance id="xadm" port="9004"
>> socket="/tmp/xadm.socket"
>> dbase="oracle7" connections="3" maxconnections="5"
>> maxqueuelength="0"
>> growby="1" ttl="60" endofsession="commit"
>> sessiontimeout="600" runasuser="nobody"
>> runasgroup="nobody" cursors="5"
>> authtier="listener" handoff="pass"
>> debug="None">
>><users>
>> <user user="test" password="test"/>
>> </users>
>> <connections>
>> <connection connectionid="xadm"
>>string="user=xadm;password=xadm;oracle_sid=devz" metric="1"/>
>> </connections>
>></instance>
>>
>>
>>when using script like this:
>>
>>// ------------------------------------------------------------
>>from SQLRelay import PySQLRClient
>>from SQLRelay import PySQLRDB
>>
>>con=PySQLRDB.connect('localhost',9004,'','test','test',0,1)
>>cur=PySQLRClient.sqlrcursor(con)
>>res = cur.sendQuery('select * from xxx')
>>// ------------------------------------------------------------
>>
>>everything is OK (ORA exception is thrown (table xxx not known)
>>and res == 0)
>>but changing connection string to:
>>
>>con=PySQLRDB.connect('localhost',9004,'','test','testx',0,1)
>>
>>(here is incorrect password: testx) causes script to
>>hang waiting for response...
>>
>>This is PythonAPI and SQLRelay 0.36.4.
>>Is this a bug or my config file or script is wrong?
>>
>>
>>
>
>
>
>-------------------------------------------------------
>SF.Net email is Sponsored by the Better Software Conference & EXPO
>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
>_______________________________________________
>Sqlrelay-discussion mailing list
>Sql...@li...
>https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
>
|