static FileEntry[] doMsrpcShareEnum ( CIFSContext ctx, SmbResourceLocator loc, Address address ) throws IOException { try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + getRPCTarget(ctx, loc, address) + "[\\PIPE\\srvsvc]", ctx) ) { MsrpcShareEnum rpc = new MsrpcShareEnum(loc.getServer()); handle.sendrecv(rpc); if ( rpc.retval != 0 ) { throw new SmbException(rpc.retval, true); } return rpc.getEntries(); } }
static FileEntry[] doMsrpcShareEnum ( CIFSContext ctx, SmbResourceLocator loc, Address address ) throws IOException { try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + getRPCTarget(ctx, loc, address) + "[\\PIPE\\srvsvc]", ctx) ) { MsrpcShareEnum rpc = new MsrpcShareEnum(loc.getServer()); handle.sendrecv(rpc); if ( rpc.retval != 0 ) { throw new SmbException(rpc.retval, true); } return rpc.getEntries(); } }
FileEntry[] doMsrpcShareEnum() throws IOException { MsrpcShareEnum rpc; DcerpcHandle handle; rpc = new MsrpcShareEnum(url.getHost()); /* JCIFS will build a composite list of shares if the target host has * multiple IP addresses such as when domain-based DFS is in play. Because * of this, to ensure that we query each IP individually without re-resolving * the hostname and getting a different IP, we must use the current addresses * IP rather than just url.getHost() like we were using prior to 1.2.16. */ handle = DcerpcHandle.getHandle("ncacn_np:" + getAddress().getHostAddress() + "[\\PIPE\\srvsvc]", auth); try { handle.sendrecv(rpc); if (rpc.retval != 0) throw new SmbException(rpc.retval, true); return rpc.getEntries(); } finally { try { handle.close(); } catch(IOException ioe) { if (log.level >= 4) ioe.printStackTrace(log); } } } FileEntry[] doNetShareEnum() throws SmbException {
FileEntry[] doMsrpcShareEnum() throws IOException { MsrpcShareEnum rpc; DcerpcHandle handle; rpc = new MsrpcShareEnum(url.getHost()); /* JCIFS will build a composite list of shares if the target host has * multiple IP addresses such as when domain-based DFS is in play. Because * of this, to ensure that we query each IP individually without re-resolving * the hostname and getting a different IP, we must use the current addresses * IP rather than just url.getHost() like we were using prior to 1.2.16. */ handle = DcerpcHandle.getHandle("ncacn_np:" + getAddress().getHostAddress() + "[\\PIPE\\srvsvc]", auth); try { handle.sendrecv(rpc); if (rpc.retval != 0) throw new SmbException(rpc.retval, true); return rpc.getEntries(); } finally { try { handle.close(); } catch(IOException ioe) { if (log.level >= 4) ioe.printStackTrace(log); } } } FileEntry[] doNetShareEnum() throws SmbException {
FileEntry[] doMsrpcShareEnum() throws IOException { MsrpcShareEnum rpc; DcerpcHandle handle; rpc = new MsrpcShareEnum(url.getHost()); /* JCIFS will build a composite list of shares if the target host has * multiple IP addresses such as when domain-based DFS is in play. Because * of this, to ensure that we query each IP individually without re-resolving * the hostname and getting a different IP, we must use the current addresses * IP rather than just url.getHost() like we were using prior to 1.2.16. */ handle = DcerpcHandle.getHandle("ncacn_np:" + getAddress().getHostAddress() + "[\\PIPE\\srvsvc]", auth); try { handle.sendrecv(rpc); if (rpc.retval != 0) throw new SmbException(rpc.retval, true); return rpc.getEntries(); } finally { try { handle.close(); } catch(IOException ioe) { if (log.level >= 4) ioe.printStackTrace(log); } } } FileEntry[] doNetShareEnum() throws SmbException {
FileEntry[] doMsrpcShareEnum() throws IOException { MsrpcShareEnum rpc; DcerpcHandle handle; rpc = new MsrpcShareEnum(url.getHost()); /* JCIFS will build a composite list of shares if the target host has * multiple IP addresses such as when domain-based DFS is in play. Because * of this, to ensure that we query each IP individually without re-resolving * the hostname and getting a different IP, we must use the current addresses * IP rather than just url.getHost() like we were using prior to 1.2.16. */ handle = DcerpcHandle.getHandle("ncacn_np:" + getAddress().getHostAddress() + "[\\PIPE\\srvsvc]", auth); try { handle.sendrecv(rpc); if (rpc.retval != 0) throw new SmbException(rpc.retval, true); return rpc.getEntries(); } finally { try { handle.close(); } catch(IOException ioe) { if (log.level >= 4) ioe.printStackTrace(log); } } } FileEntry[] doNetShareEnum() throws SmbException {