Codota Logo
LsaPolicyHandle.<init>
Code IndexAdd Codota to your IDE (free)

How to use
jcifs.dcerpc.msrpc.LsaPolicyHandle
constructor

Best Java code snippets using jcifs.dcerpc.msrpc.LsaPolicyHandle.<init> (Showing top 12 results out of 315)

  • Common ways to obtain LsaPolicyHandle
private void myMethod () {
LsaPolicyHandle l =
  • Codota IconDcerpcHandle handle;new LsaPolicyHandle(handle, null, int1)
  • Smart code suggestions by Codota
}
origin: AgNO3/jcifs-ng

void resolveSids0 ( String authorityServerName, CIFSContext tc, jcifs.SID[] sids ) throws CIFSException {
  synchronized ( this.sidCache ) {
    try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName + "[\\PIPE\\lsarpc]", tc) ) {
      String server = authorityServerName;
      int dot = server.indexOf('.');
      if ( dot > 0 && Character.isDigit(server.charAt(0)) == false )
        server = server.substring(0, dot);
      try ( LsaPolicyHandle policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800) ) {
        resolveSids(handle, policyHandle, sids);
      }
    }
    catch ( IOException e ) {
      throw new CIFSException("Failed to resolve SIDs", e);
    }
  }
}
origin: org.codelibs/jcifs

void resolveSids0 ( String authorityServerName, CIFSContext tc, jcifs.SID[] sids ) throws CIFSException {
  synchronized ( this.sidCache ) {
    try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + authorityServerName + "[\\PIPE\\lsarpc]", tc) ) {
      String server = authorityServerName;
      int dot = server.indexOf('.');
      if ( dot > 0 && Character.isDigit(server.charAt(0)) == false )
        server = server.substring(0, dot);
      try ( LsaPolicyHandle policyHandle = new LsaPolicyHandle(handle, "\\\\" + server, 0x00000800) ) {
        resolveSids(handle, policyHandle, sids);
      }
    }
    catch ( IOException e ) {
      throw new CIFSException("Failed to resolve SIDs", e);
    }
  }
}
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: AgNO3/jcifs-ng

@Override
public SID getServerSid ( CIFSContext tc, String server ) throws CIFSException {
  lsarpc.LsarDomainInfo info = new lsarpc.LsarDomainInfo();
  MsrpcQueryInformationPolicy rpc;
  synchronized ( this.sidCache ) {
    try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + server + "[\\PIPE\\lsarpc]", tc) ) {
      // NetApp doesn't like the 'generic' access mask values
      try ( LsaPolicyHandle policyHandle = new LsaPolicyHandle(handle, null, 0x00000001) ) {
        rpc = new MsrpcQueryInformationPolicy(policyHandle, (short) lsarpc.POLICY_INFO_ACCOUNT_DOMAIN, info);
        handle.sendrecv(rpc);
        if ( rpc.retval != 0 )
          throw new SmbException(rpc.retval, false);
      }
      return new SID(info.sid, jcifs.SID.SID_TYPE_DOMAIN, ( new UnicodeString(info.name, false) ).toString(), null, false);
    }
    catch ( IOException e ) {
      throw new CIFSException("Failed to get SID from server", e);
    }
  }
}
origin: org.codelibs/jcifs

@Override
public SID getServerSid ( CIFSContext tc, String server ) throws CIFSException {
  lsarpc.LsarDomainInfo info = new lsarpc.LsarDomainInfo();
  MsrpcQueryInformationPolicy rpc;
  synchronized ( this.sidCache ) {
    try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + server + "[\\PIPE\\lsarpc]", tc) ) {
      // NetApp doesn't like the 'generic' access mask values
      try ( LsaPolicyHandle policyHandle = new LsaPolicyHandle(handle, null, 0x00000001) ) {
        rpc = new MsrpcQueryInformationPolicy(policyHandle, (short) lsarpc.POLICY_INFO_ACCOUNT_DOMAIN, info);
        handle.sendrecv(rpc);
        if ( rpc.retval != 0 )
          throw new SmbException(rpc.retval, false);
      }
      return new SID(info.sid, jcifs.SID.SID_TYPE_DOMAIN, ( new UnicodeString(info.name, false) ).toString(), null, false);
    }
    catch ( IOException e ) {
      throw new CIFSException("Failed to get SID from server", e);
    }
  }
}
origin: org.samba.jcifs/jcifs

    "[\\PIPE\\lsarpc]", auth);
policyHandle = new LsaPolicyHandle(handle, null, 0x00000001);
rpc = new MsrpcQueryInformationPolicy(policyHandle,
      (short)lsarpc.POLICY_INFO_ACCOUNT_DOMAIN,
origin: jcifs/jcifs

    "[\\PIPE\\lsarpc]", auth);
policyHandle = new LsaPolicyHandle(handle, null, 0x00000001);
rpc = new MsrpcQueryInformationPolicy(policyHandle,
      (short)lsarpc.POLICY_INFO_ACCOUNT_DOMAIN,
origin: com.jaeksoft/jcifs-krb5-jdk7

    "[\\PIPE\\lsarpc]", auth);
policyHandle = new LsaPolicyHandle(handle, null, 0x00000001);
rpc = new MsrpcQueryInformationPolicy(policyHandle,
      (short)lsarpc.POLICY_INFO_ACCOUNT_DOMAIN,
origin: kohsuke/jcifs

    "[\\PIPE\\lsarpc]", auth);
policyHandle = new LsaPolicyHandle(handle, null, 0x00000001);
rpc = new MsrpcQueryInformationPolicy(policyHandle,
      (short)lsarpc.POLICY_INFO_ACCOUNT_DOMAIN,
jcifs.dcerpc.msrpcLsaPolicyHandle<init>

Popular methods of LsaPolicyHandle

  • close

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • JFrame (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now