String getServerWithDfs() { if (dfsReferral != null) { return dfsReferral.server; } return getServer(); } /**
String getServerWithDfs() { if (dfsReferral != null) { return dfsReferral.server; } return getServer(); } /**
String getServerWithDfs() { if (dfsReferral != null) { return dfsReferral.server; } return getServer(); } /**
public String getServer() { if (this instanceof DcerpcPipeHandle) return ((DcerpcPipeHandle)this).pipe.getServer(); return null; } public Principal getPrincipal() {
String getServerWithDfs() { if (dfsReferral != null) { return dfsReferral.server; } return getServer(); } /**
/** * Computes a hashCode for this file based on the URL string and IP * address if the server. The hashing function uses the hashcode of the * server address, the canonical representation of the URL, and does not * compare authentication information. In essance, two * <code>SmbFile</code> objects that refer to * the same file should generate the same hashcode provided it is possible * to make such a determination. * * @return A hashcode for this abstract file * @throws SmbException */ public int hashCode() { int hash; try { hash = getAddress().hashCode(); } catch( UnknownHostException uhe ) { hash = getServer().toUpperCase().hashCode(); } getUncPath0(); return hash + canon.toUpperCase().hashCode(); }
/** * Computes a hashCode for this file based on the URL string and IP * address if the server. The hashing function uses the hashcode of the * server address, the canonical representation of the URL, and does not * compare authentication information. In essance, two * <code>SmbFile</code> objects that refer to * the same file should generate the same hashcode provided it is possible * to make such a determination. * * @return A hashcode for this abstract file * @throws SmbException */ public int hashCode() { int hash; try { hash = getAddress().hashCode(); } catch( UnknownHostException uhe ) { hash = getServer().toUpperCase().hashCode(); } getUncPath0(); return hash + canon.toUpperCase().hashCode(); }
/** * Computes a hashCode for this file based on the URL string and IP * address if the server. The hashing function uses the hashcode of the * server address, the canonical representation of the URL, and does not * compare authentication information. In essance, two * <code>SmbFile</code> objects that refer to * the same file should generate the same hashcode provided it is possible * to make such a determination. * * @return A hashcode for this abstract file * @throws SmbException */ public int hashCode() { int hash; try { hash = getAddress().hashCode(); } catch( UnknownHostException uhe ) { hash = getServer().toUpperCase().hashCode(); } getUncPath0(); return hash + canon.toUpperCase().hashCode(); }
/** * Computes a hashCode for this file based on the URL string and IP * address if the server. The hashing function uses the hashcode of the * server address, the canonical representation of the URL, and does not * compare authentication information. In essance, two * <code>SmbFile</code> objects that refer to * the same file should generate the same hashcode provided it is possible * to make such a determination. * * @return A hashcode for this abstract file * @throws SmbException */ public int hashCode() { int hash; try { hash = getAddress().hashCode(); } catch( UnknownHostException uhe ) { hash = getServer().toUpperCase().hashCode(); } getUncPath0(); return hash + canon.toUpperCase().hashCode(); }
protected void processAllowedSIDs(final SmbFile file, final SID sid, final Set<SID> sidSet) { if (logger.isDebugEnabled()) { logger.debug("SID:" + sid); } final int type = sid.getType(); sidSet.add(sid); if (type == SID.SID_TYPE_DOM_GRP || type == SID.SID_TYPE_ALIAS) { try { CIFSContext context = file.getContext(); final SID[] children = context.getSIDResolver().getGroupMemberSids(context, file.getServer(), sid.getDomainSid(), sid.getRid(), jcifs.smb.SID.SID_FLAG_RESOLVE_SIDS); for (SID child : children) { if (!sidSet.contains(child)) { processAllowedSIDs(file, child, sidSet); } } } catch (Exception e) { if (logger.isDebugEnabled()) { logger.debug("Exception on SID processing.", e); } } } }
if (dfs.isTrustedDomain(getServer(), auth)) {
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 {
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 {
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 {
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 {
childURL.setHost(smbFile.getServer()); childURL.setPath(smbFile.getURL().getPath());