Tabnine Logo
DcerpcHandle.close
Code IndexAdd Tabnine to your IDE (free)

How to use
close
method
in
jcifs.dcerpc.DcerpcHandle

Best Java code snippets using jcifs.dcerpc.DcerpcHandle.close (Showing top 20 results out of 315)

origin: AgNO3/jcifs-ng

  @Override
  public void close () throws IOException {
    super.close();
    try {
      this.handle.close();
    }
    finally {
      this.pipe.close();
    }
  }
}
origin: org.codelibs/jcifs

  @Override
  public void close () throws IOException {
    super.close();
    try {
      this.handle.close();
    }
    finally {
      this.pipe.close();
    }
  }
}
origin: jcifs/jcifs

  static void resolveSids0(String authorityServerName,
        NtlmPasswordAuthentication auth,
        SID[] sids) throws IOException {
    DcerpcHandle handle = null;
    LsaPolicyHandle policyHandle = null;

synchronized (sid_cache) {
    try {
      handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName +
          "[\\PIPE\\lsarpc]", auth);
      String server = authorityServerName;
      int dot = server.indexOf('.');
      if (dot > 0 && Character.isDigit(server.charAt(0)) == false)
        server = server.substring(0, dot);
      policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800);
      SID.resolveSids(handle, policyHandle, sids);
    } finally {
      if (handle != null) {
        if (policyHandle != null) {
          policyHandle.close();
        }
        handle.close();
      }
    }
}
  }
 
origin: org.samba.jcifs/jcifs

static void resolveSids0(String authorityServerName,
      NtlmPasswordAuthentication auth,
      SID[] sids) throws IOException {
  DcerpcHandle handle = null;
  LsaPolicyHandle policyHandle = null;
  try {
    handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName +
        "[\\PIPE\\lsarpc]", auth);
    String server = authorityServerName;
    int dot = server.indexOf('.');
    if (dot > 0 && Character.isDigit(server.charAt(0)) == false)
      server = server.substring(0, dot);
    policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800);
    SID.resolveSids(handle, policyHandle, sids);
  } finally {
    if (handle != null) {
      if (policyHandle != null) {
        policyHandle.close();
      }
      handle.close();
    }
  }
}
origin: com.jaeksoft/jcifs-krb5-jdk7

  static void resolveSids0(String authorityServerName,
        NtlmPasswordAuthentication auth,
        SID[] sids) throws IOException {
    DcerpcHandle handle = null;
    LsaPolicyHandle policyHandle = null;

synchronized (sid_cache) {
    try {
      handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName +
          "[\\PIPE\\lsarpc]", auth);
      String server = authorityServerName;
      int dot = server.indexOf('.');
      if (dot > 0 && Character.isDigit(server.charAt(0)) == false)
        server = server.substring(0, dot);
      policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800);
      SID.resolveSids(handle, policyHandle, sids);
    } finally {
      if (handle != null) {
        if (policyHandle != null) {
          policyHandle.close();
        }
        handle.close();
      }
    }
}
  }
 
origin: kohsuke/jcifs

  static void resolveSids0(String authorityServerName,
        NtlmPasswordAuthentication auth,
        SID[] sids) throws IOException {
    DcerpcHandle handle = null;
    LsaPolicyHandle policyHandle = null;

synchronized (sid_cache) {
    try {
      handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName +
          "[\\PIPE\\lsarpc]", auth);
      String server = authorityServerName;
      int dot = server.indexOf('.');
      if (dot > 0 && Character.isDigit(server.charAt(0)) == false)
        server = server.substring(0, dot);
      policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800);
      SID.resolveSids(handle, policyHandle, sids);
    } finally {
      if (handle != null) {
        if (policyHandle != null) {
          policyHandle.close();
        }
        handle.close();
      }
    }
}
  }
 
origin: jcifs/jcifs

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 {
origin: org.samba.jcifs/jcifs

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 {
origin: com.jaeksoft/jcifs-krb5-jdk7

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 {
origin: kohsuke/jcifs

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 {
origin: jcifs/jcifs

FileEntry[] doDfsRootEnum() throws IOException {
  MsrpcDfsRootEnum rpc;
  DcerpcHandle handle = null;
  FileEntry[] entries;
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\netdfs]", auth);
  try {
    rpc = new MsrpcDfsRootEnum(getServer());
    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[] doMsrpcShareEnum() throws IOException {
origin: com.jaeksoft/jcifs-krb5-jdk7

FileEntry[] doDfsRootEnum() throws IOException {
  MsrpcDfsRootEnum rpc;
  DcerpcHandle handle = null;
  FileEntry[] entries;
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\netdfs]", auth);
  try {
    rpc = new MsrpcDfsRootEnum(getServer());
    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[] doMsrpcShareEnum() throws IOException {
origin: kohsuke/jcifs

FileEntry[] doDfsRootEnum() throws IOException {
  MsrpcDfsRootEnum rpc;
  DcerpcHandle handle = null;
  FileEntry[] entries;
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\netdfs]", auth);
  try {
    rpc = new MsrpcDfsRootEnum(getServer());
    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[] doMsrpcShareEnum() throws IOException {
origin: org.samba.jcifs/jcifs

FileEntry[] doDfsRootEnum() throws IOException {
  MsrpcDfsRootEnum rpc;
  DcerpcHandle handle = null;
  FileEntry[] entries;
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\netdfs]", auth);
  try {
    rpc = new MsrpcDfsRootEnum(getServer());
    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[] doMsrpcShareEnum() throws IOException {
origin: org.samba.jcifs/jcifs

handle.close();
origin: jcifs/jcifs

handle.close();
origin: com.jaeksoft/jcifs-krb5-jdk7

handle.close();
origin: org.samba.jcifs/jcifs

  policyHandle.close();
handle.close();
origin: jcifs/jcifs

  policyHandle.close();
handle.close();
origin: com.jaeksoft/jcifs-krb5-jdk7

  policyHandle.close();
handle.close();
jcifs.dcerpcDcerpcHandleclose

Popular methods of DcerpcHandle

  • bind
    Bind the handle
  • doReceiveFragment
  • doSendFragment
  • getHandle
  • getServer
  • parseBinding
  • sendrecv
  • getPrincipal
  • doSendReceiveFragment
  • encodeMessage
  • getMaxRecv
  • getMaxXmit
  • getMaxRecv,
  • getMaxXmit,
  • getTransportContext,
  • receiveMoreFragments,
  • sendFragments,
  • setupReceivedFragment

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now