/** * {@inheritDoc} * * @see jcifs.Configuration#isIpcSigningEnforced() */ @Override public boolean isIpcSigningEnforced () { return this.delegate.isIpcSigningEnforced(); }
/** * {@inheritDoc} * * @see jcifs.Configuration#isIpcSigningEnforced() */ @Override public boolean isIpcSigningEnforced () { return this.delegate.isIpcSigningEnforced(); }
/** * * {@inheritDoc} * * @see jcifs.smb.SmbResourceLocatorInternal#shouldForceSigning() */ @Override public boolean shouldForceSigning () { return this.ctx.getConfig().isIpcSigningEnforced() && !this.ctx.getCredentials().isAnonymous() && isIPC(); }
/** * * {@inheritDoc} * * @see jcifs.smb.SmbResourceLocatorInternal#shouldForceSigning() */ @Override public boolean shouldForceSigning () { return this.ctx.getConfig().isIpcSigningEnforced() && !this.ctx.getCredentials().isAnonymous() && isIPC(); }
0, false, !tf.getCredentials().isAnonymous() && tf.getConfig().isSigningEnabled() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportImpl.class); transport.ensureConnected();
@Override public byte[] getChallenge ( CIFSContext tf, Address dc, int port ) throws SmbException { try ( SmbTransportInternal trans = tf.getTransportPool() .getSmbTransport(tf, dc, port, false, !tf.getCredentials().isAnonymous() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class) ) { trans.ensureConnected(); return trans.getServerEncryptionKey(); } catch ( SmbException e ) { throw e; } catch ( IOException e ) { throw new SmbException("Connection failed", e); } }
@Override public byte[] getChallenge ( CIFSContext tf, Address dc, int port ) throws SmbException { try ( SmbTransportInternal trans = tf.getTransportPool() .getSmbTransport(tf, dc, port, false, !tf.getCredentials().isAnonymous() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class) ) { trans.ensureConnected(); return trans.getServerEncryptionKey(); } catch ( SmbException e ) { throw e; } catch ( IOException e ) { throw new SmbException("Connection failed", e); } }
0, false, !tf.getCredentials().isAnonymous() && tf.getConfig().isSigningEnabled() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportImpl.class); transport.ensureConnected();
@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); } }
private static NtlmChallenge interrogate ( CIFSContext tf, Address addr ) throws SmbException { UniAddress dc = new UniAddress(addr); try ( SmbTransportInternal trans = tf.getTransportPool() .getSmbTransport(tf, dc, 0, false, tf.hasDefaultCredentials() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class) ) { if ( !tf.hasDefaultCredentials() ) { trans.ensureConnected(); log.warn( "Default credentials (jcifs.smb.client.username/password)" + " not specified. SMB signing may not work propertly." + " Skipping DC interrogation."); } else { try ( SmbSessionInternal ssn = trans.getSmbSession(tf.withDefaultCredentials()).unwrap(SmbSessionInternal.class) ) { ssn.treeConnectLogon(); } } return new NtlmChallenge(trans.getServerEncryptionKey(), dc); } catch ( SmbException e ) { throw e; } catch ( IOException e ) { throw new SmbException("Connection failed", e); } }
private static NtlmChallenge interrogate ( CIFSContext tf, Address addr ) throws SmbException { UniAddress dc = new UniAddress(addr); try ( SmbTransportInternal trans = tf.getTransportPool() .getSmbTransport(tf, dc, 0, false, tf.hasDefaultCredentials() && tf.getConfig().isIpcSigningEnforced()) .unwrap(SmbTransportInternal.class) ) { if ( !tf.hasDefaultCredentials() ) { trans.ensureConnected(); log.warn( "Default credentials (jcifs.smb.client.username/password)" + " not specified. SMB signing may not work propertly." + " Skipping DC interrogation."); } else { try ( SmbSessionInternal ssn = trans.getSmbSession(tf.withDefaultCredentials()).unwrap(SmbSessionInternal.class) ) { ssn.treeConnectLogon(); } } return new NtlmChallenge(trans.getServerEncryptionKey(), dc); } catch ( SmbException e ) { throw e; } catch ( IOException e ) { throw new SmbException("Connection failed", e); } }