boolean matches ( Address addr, int prt, InetAddress laddr, int lprt, String hostName ) { if ( this.state == 5 || this.state == 6 ) { // don't reuse disconnecting/disconnected transports return false; } if ( hostName == null ) hostName = addr.getHostName(); return ( this.tconHostName == null || hostName.equalsIgnoreCase(this.tconHostName) ) && addr.equals(this.address) && ( prt == 0 || prt == this.port || /* port 139 is ok if 445 was requested */ ( prt == 445 && this.port == 139 ) ) && ( laddr == this.localAddr || ( laddr != null && laddr.equals(this.localAddr) ) ) && lprt == this.localPort; }
boolean matches ( Address addr, int prt, InetAddress laddr, int lprt, String hostName ) { if ( this.state == 5 || this.state == 6 ) { // don't reuse disconnecting/disconnected transports return false; } if ( hostName == null ) hostName = addr.getHostName(); return ( this.tconHostName == null || hostName.equalsIgnoreCase(this.tconHostName) ) && addr.equals(this.address) && ( prt == 0 || prt == this.port || /* port 139 is ok if 445 was requested */ ( prt == 445 && this.port == 139 ) ) && ( laddr == this.localAddr || ( laddr != null && laddr.equals(this.localAddr) ) ) && lprt == this.localPort; }
private static String getRPCTarget ( CIFSContext ctx, SmbResourceLocator loc, Address serverAddress ) { // Try to stick to the same server. However if we are using kerberos authentication we need to use the name. // The comment about composite share lists was wrong, we do not iterate over multiple targets. Credentials creds = ctx.getCredentials(); if ( creds instanceof Kerb5Authenticator && serverAddress.getHostName() != null ) { return serverAddress.getHostName(); } return serverAddress.getHostAddress(); }
private static String getRPCTarget ( CIFSContext ctx, SmbResourceLocator loc, Address serverAddress ) { // Try to stick to the same server. However if we are using kerberos authentication we need to use the name. // The comment about composite share lists was wrong, we do not iterate over multiple targets. Credentials creds = ctx.getCredentials(); if ( creds instanceof Kerb5Authenticator && serverAddress.getHostName() != null ) { return serverAddress.getHostName(); } return serverAddress.getHostAddress(); }
String host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
String host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
getContext().getNameServiceClient().getByName(this.url.getHost()).getHostName();
getContext().getNameServiceClient().getByName(this.url.getHost()).getHostName();
this.tconHostName = this.address.getHostName(); this.negotiated = resp.getResponse(); if ( resp.getResponse().getSelectedDialect().atLeast(DialectVersion.SMB311) ) {
this.tconHostName = this.address.getHostName(); this.negotiated = resp.getResponse(); if ( resp.getResponse().getSelectedDialect().atLeast(DialectVersion.SMB311) ) {
@Override public void logon ( CIFSContext tf, Address dc, int port ) throws SmbException { try ( SmbTransportInternal smbTransport = tf.getTransportPool().getSmbTransport(tf, dc, port, false, tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class); SmbSessionInternal smbSession = smbTransport.getSmbSession(tf, dc.getHostName(), null).unwrap(SmbSessionInternal.class); SmbTreeInternal tree = smbSession.getSmbTree(tf.getConfig().getLogonShare(), null).unwrap(SmbTreeInternal.class) ) { tree.connectLogon(tf); } }
@Override public void logon ( CIFSContext tf, Address dc, int port ) throws SmbException { try ( SmbTransportInternal smbTransport = tf.getTransportPool().getSmbTransport(tf, dc, port, false, tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class); SmbSessionInternal smbSession = smbTransport.getSmbSession(tf, dc.getHostName(), null).unwrap(SmbSessionInternal.class); SmbTreeInternal tree = smbSession.getSmbTree(tf.getConfig().getLogonShare(), null).unwrap(SmbTreeInternal.class) ) { tree.connectLogon(tf); } }
host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();
host = trans.getRemoteAddress().getHostAddress(); try { host = trans.getRemoteAddress().getHostName();