<html><body><p><font size="4" face="Helvetica">Hello,</font><br><br><font size="4" face="Helvetica">I’m encountering an unexpected exception while retrieving SIDs/ACLs for a file served by Windows Server 2012 Standard Edition. We’re running on Windows in this instance, if that matters.</font><br><br><i><font size="4" face="Times-Roman">Caused by: java.io.IOException: Unexpected fragment length: 28757</font></i><br><i><font size="4" face="Times-Roman">           at jcifs.dcerpc.DcerpcPipeHandle.doReceiveFragment(DcerpcPipeHandle.java:96)</font></i><br><i><font size="4" face="Times-Roman">           at jcifs.dcerpc.DcerpcHandle.sendrecv(DcerpcHandle.java:220) </font></i><br><i><font size="4" face="Times-Roman">           at jcifs.smb.SID.resolveSids(SID.java:94)</font></i><br><i><font size="4" face="Times-Roman">           at com.vivisimo.connector.smb.SMBConnector.resolveSids(SMBConnector.java:629) ... 10 more</font></i><br><br><font size="4" face="Times-Roman">This is approximately where our code hands off to jcifs to resolve the SIDs:</font><br><br><font size="4" face="Courier New">            SID[] sidsToResolveArray = sidsToResolve.toArray(new SID[0]);</font><br><font size="4" face="Courier New">            try {</font><br><font size="4" face="Courier New">                LsaPolicyHandle policyHandle = null;</font><br><font size="4" face="Courier New">                try {</font><br><br><font size="4" face="Courier New">                    policyHandle = handle.openPolicyHandle(file);</font><br><font size="4" face="Courier New">                    SID.resolveSids(handle.getHandle(), policyHandle, sidsToResolveArray);</font><br><br><font size="4" face="Courier New">                } finally {</font><br><font size="4" face="Courier New">                    if (policyHandle != null) {</font><br><font size="4" face="Courier New">                        LOGGER.debug("Closing Policy handle for [" + file + "]");</font><br><font size="4" face="Courier New">                        policyHandle.close();</font><br><font size="4" face="Courier New">                    }</font><br><font size="4" face="Courier New">                    policyHandle = null;</font><br><font size="4" face="Courier New">                }</font><br><font size="4" face="Courier New">            } catch (IOException e) {</font><br><font size="4" face="Courier New">                throw new ConnectorException(e);</font><br><font size="4" face="Courier New">            }</font><br><br><font size="4" face="Times-Roman">It dies shortly after we call SID.resolveSids() there in the middle of the inner try.</font><br><br><font size="4" face="Times-Roman">We have a few theories:</font><br><br><font size="4" face="Times-Roman">1. This filesystem has a lot of files with Japanese characters in the filename. We considered that perhaps jCIFS or our software using it lacks support for Japanese characters, but we set up a testing environment with a bunch of files with Japanese filenames and it works for us. We’re pretty certain that our configuration mirrors that of the erring environment, but there might be subtle differences were are not able to replicate (e.g. real data instead of made up test data).</font><br><br><font size="4" face="Times-Roman">2. All of the files that are failing (we’re crawling a filesystem) share one trait: they have what appears in the Windows properties a permitted user that shows as “unknown user”, which may be an artifact remaining after the user was removed but its explicit permissions remained. Processing on a directory that has no “unknown users” yields no failures.</font><br><br><font size="4" face="Times-Roman">This leads me to believe that jCIFS is failing on unknown users. However, looking through the source, I don’t see an obvious way to detect this.</font><br><br><font size="4" face="Times-Roman">The obvious workaround appears to be “clean your unknown users” but I think this could be detectable and loggable during our processing of the share.</font><br><br><font size="4" face="Times-Roman">I’d appreciate input on this.</font><br><br><br>
<table border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="592" bgcolor="#FFFFFF" colspan="3" valign="middle"><hr width="100%" size="2" align="left" style="color:#CCCCCC; "></td></tr>
<tr valign="top"><td width="483" bgcolor="#FFFFFF" colspan="2"><b><font size="2" face="Verdana">Colin Dean<br>Advisory Software Engineer & Tech Lead, Watson Explorer Connectivity<br>email: </font></b><a href="mailto:colindean@us.ibm.com"><b><font size="2" color="#3399FF" face="Verdana">colindean@us.ibm.com</font></b></a><b><font size="2" face="Verdana"> | tel: +1 (412) 315-2066<br>Find me on:</font></b><font size="2" face="Verdana"> </font><a href="http://linkedin.com/in/colindean" target="_blank"><img src="cid:1__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="LinkedIn: http://linkedin.com/in/colindean" border="0"></a><font size="2" face="Verdana"> </font><a href="http://github.com/colindean" target="_blank"><img src="cid:2__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="Github: http://github.com/colindean" border="0"></a><font size="2" face="Verdana"> </font><a href="http://launchpad.net/~colindean" target="_blank"><img src="cid:3__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="Launchpad: http://launchpad.net/~colindean" border="0"></a><font size="2" face="Verdana">  </font></td><td width="109" bgcolor="#FFFFFF" rowspan="2" valign="bottom"><div align="right"><img src="cid:4__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="105" height="101" align="bottom"></div></td></tr>
<tr valign="top"><td width="165" bgcolor="#FFFFFF" valign="bottom"><img src="cid:5__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="163" height="23" alt="IBM Watson Group" align="bottom"></td><td width="314" bgcolor="#FFFFFF" valign="bottom"><a href="http://www.facebook.com/ibmwatson" target="_blank"><img src="cid:6__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="Watson on Facebook: http://www.facebook.com/ibmwatson" align="bottom" border="0"></a><a href="https://twitter.com/@ibmwatson" target="_blank"><img src="cid:7__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="Watson on Twitter: https://twitter.com/@ibmwatson" align="bottom" border="0"></a><a href="http://www.youtube.com/user/IBMWatsonSolutions/videos" target="_blank"><img src="cid:8__=0ABBF4A7DFFA8CE28f9e8a93df938690918c0AB@" width="16" height="16" alt="Watson on YouTube: http://www.youtube.com/user/IBMWatsonSolutions/videos" align="bottom" border="0"></a></td></tr>
<tr valign="top"><td width="592" bgcolor="#FFFFFF" colspan="3" valign="middle"><hr width="100%" size="2" align="left" style="color:#CCCCCC; "></td></tr></table><br><BR>
</body></html>