/** * Manually resolve this SID. Normally SIDs are automatically * resolved. However, if a SID is constructed explicitly using a SID * constructor, JCIFS will have no knowledge of the server that created the * SID and therefore cannot possibly resolve it automatically. In this case, * this method will be necessary. * * @param authorityServerName The FQDN of the server that is an authority for the SID. * @param auth Credentials suitable for accessing the SID's information. */ public void resolve(String authorityServerName, NtlmPasswordAuthentication auth) throws IOException { SID[] sids = new SID[1]; sids[0] = this; SID.resolveSids(authorityServerName, auth, sids); }
/** * Manually resolve this SID. Normally SIDs are automatically * resolved. However, if a SID is constructed explicitly using a SID * constructor, JCIFS will have no knowledge of the server that created the * SID and therefore cannot possibly resolve it automatically. In this case, * this method will be necessary. * * @param authorityServerName The FQDN of the server that is an authority for the SID. * @param auth Credentials suitable for accessing the SID's information. */ public void resolve(String authorityServerName, NtlmPasswordAuthentication auth) throws IOException { SID[] sids = new SID[1]; sids[0] = this; SID.resolveSids(authorityServerName, auth, sids); }
/** * Manually resolve this SID. Normally SIDs are automatically * resolved. However, if a SID is constructed explicitly using a SID * constructor, JCIFS will have no knowledge of the server that created the * SID and therefore cannot possibly resolve it automatically. In this case, * this method will be necessary. * * @param authorityServerName The FQDN of the server that is an authority for the SID. * @param auth Credentials suitable for accessing the SID's information. */ public void resolve(String authorityServerName, NtlmPasswordAuthentication auth) throws IOException { SID[] sids = new SID[1]; sids[0] = this; SID.resolveSids(authorityServerName, auth, sids); }
/** * Manually resolve this SID. Normally SIDs are automatically * resolved. However, if a SID is constructed explicitly using a SID * constructor, JCIFS will have no knowledge of the server that created the * SID and therefore cannot possibly resolve it automatically. In this case, * this method will be necessary. * * @param authorityServerName The FQDN of the server that is an authority for the SID. * @param auth Credentials suitable for accessing the SID's information. */ public void resolve(String authorityServerName, NtlmPasswordAuthentication auth) throws IOException { SID[] sids = new SID[1]; sids[0] = this; SID.resolveSids(authorityServerName, auth, sids); }
private void processAces(ACE[] aces, boolean resolveSids) throws IOException { String server = getServerWithDfs(); int ai; if (resolveSids) { SID[] sids = new SID[aces.length]; String[] names = null; for (ai = 0; ai < aces.length; ai++) { sids[ai] = aces[ai].sid; } for (int off = 0; off < sids.length; off += 10) { int len = sids.length - off; if (len > 64) len = 64; SID.resolveSids(server, auth, sids, off, len); } } else { for (ai = 0; ai < aces.length; ai++) { aces[ai].sid.origin_server = server; aces[ai].sid.origin_auth = auth; } } } /**
private void processAces(ACE[] aces, boolean resolveSids) throws IOException { String server = getServerWithDfs(); int ai; if (resolveSids) { SID[] sids = new SID[aces.length]; String[] names = null; for (ai = 0; ai < aces.length; ai++) { sids[ai] = aces[ai].sid; } for (int off = 0; off < sids.length; off += 64) { int len = sids.length - off; if (len > 64) len = 64; SID.resolveSids(server, auth, sids, off, len); } } else { for (ai = 0; ai < aces.length; ai++) { aces[ai].sid.origin_server = server; aces[ai].sid.origin_auth = auth; } } } /**
private void processAces(ACE[] aces, boolean resolveSids) throws IOException { String server = getServerWithDfs(); int ai; if (resolveSids) { SID[] sids = new SID[aces.length]; String[] names = null; for (ai = 0; ai < aces.length; ai++) { sids[ai] = aces[ai].sid; } for (int off = 0; off < sids.length; off += 64) { int len = sids.length - off; if (len > 64) len = 64; SID.resolveSids(server, auth, sids, off, len); } } else { for (ai = 0; ai < aces.length; ai++) { aces[ai].sid.origin_server = server; aces[ai].sid.origin_auth = auth; } } } /**
private void processAces(ACE[] aces, boolean resolveSids) throws IOException { String server = getServerWithDfs(); int ai; if (resolveSids) { SID[] sids = new SID[aces.length]; String[] names = null; for (ai = 0; ai < aces.length; ai++) { sids[ai] = aces[ai].sid; } for (int off = 0; off < sids.length; off += 64) { int len = sids.length - off; if (len > 64) len = 64; SID.resolveSids(server, auth, sids, off, len); } } else { for (ai = 0; ai < aces.length; ai++) { aces[ai].sid.origin_server = server; aces[ai].sid.origin_auth = auth; } } } /**
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(); } } }
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(); } } } }
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(); } } } }
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(); } } } }
SID.resolveSids(origin_server, origin_auth, sids);
SID.resolveSids(origin_server, origin_auth, sids);
SID.resolveSids(origin_server, origin_auth, sids);
SID.resolveSids(origin_server, origin_auth, sids);