[jcifs] Account Locking

Michael B Allen ioplex at gmail.com
Fri Jun 24 21:34:26 MDT 2011


The 1.3.16 release now includes the SmbAuthException catch to abort
the retry loop and prevent an account lockout (although I have not
actually tested this with a server that has multiple IPs).

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

On Fri, Apr 9, 2010 at 11:22 AM, Michael B Allen <ioplex at gmail.com> wrote:
> Hi Rick,
>
> I have added your fix to the TODO list. I'm not sure when it will make
> it in because it's a non-trivial change and I don't have much Free
> time anymore. But your diagnosis and fix sound good.
>
> Thanks for the feedback,
> Mike
>
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
>
> On Fri, Apr 9, 2010 at 10:14 AM, Rick Poleshuck <RickPoleshuck at gmail.com> wrote:
>> There is a problem with SmbFile.connect() when the target has more than one IP
>> address and the target implements account locking on repetitive Auth Exceptions.
>> I have fixed the problem in my copy of the source.
>>
>>  public void connect() throws IOException {
>>        SmbTransport trans;
>>        SmbSession ssn;
>>        UniAddress addr;
>>
>>        if( isConnected() ) {
>>            return;
>>        }
>>
>>        getUncPath0();
>>        getFirstAddress();
>>        for ( ;; ) {
>>            try {
>>                doConnect();
>>                return;
>>            } catch(SmbAuthException sae) {
>>                throw sae; // Fail on first Auth exception, otherwise account could get locked
>>            } catch(SmbException se) {
>>                if (getNextAddress() == null)
>>                    throw se;
>>                if (log.level >= 3)
>>                    se.printStackTrace(log);
>>            }
>>        }
>>    }
>>
>>
>


More information about the jCIFS mailing list