public SmbTransport getDc ( String domain , SmbExtendedAuthenticator authenticator , NtlmPasswordAuthentication auth ) throws SmbAuthException { // public SmbTransport getDc(String domain, // NtlmPasswordAuthentication auth) throws SmbAuthException { // SmbAuthenticator<< if ( DISABLED ) return null ; try { UniAddress addr = UniAddress . getByName ( domain , true ) ; SmbTransport trans = SmbTransport . getSmbTransport ( addr , 0 ) ; // >>SmbAuthenticator Fixed trusted domain issue. DfsReferral dr = trans . getDfsReferrals ( authenticator , auth , "\\" + domain , 1 ) ; // DfsReferral dr = trans.getDfsReferrals(auth, "\\" + domain, 1); // SmbAuthenticator<< if ( dr != null ) { DfsReferral start = dr ; IOException e = null ; do { try { addr = UniAddress . getByName ( dr . server ) ; return SmbTransport . getSmbTransport ( addr , 0 ) ; } catch ( IOException ioe ) { e = ioe ; } dr = dr . next ; } while ( dr != start ) ; throw e ; } } catch ( IOException ioe ) { if ( log . level >= 3 ) ioe . printStackTrace ( log ) ; if ( strictView && ioe instanceof SmbAuthException ) { throw ( SmbAuthException ) ioe ; } } return null ; }
>> SmbAuthenticator Fixed trusted domain issue .