Monthly Archives: April 2008

Google Summer of Code & NT debugging Puzzler #3


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/15/d187295720/htdocs/home/wp-content/plugins/deans_code_highlighter/geshi.php on line 2146

As you probably know, Google launch every year the Summer of Code. Yesterday, Google published official 2008 result and I’ll be part of the Samba Team. My work is to implement compression functions into Samba.

Microsoft Advanced Windows Debugging Team published their third puzzler: Matrix Edition #3 . It looks they’ll publish one puzzler per week. As far I understand, the goal of this puzzler is to translate a function from Assembly to C.

Here is my solution:

    1.  

Samba eXPerience conference – Germany

SambaXP

  • Day 1 :: Workshop
  • 8.00 PM (yeah it’s late)
    I had almost 7 hours of time travel in Train from Paris to Goettigen.

    This year, SambaXP conference hold in Freizeit Hotel (Free time in English) in Goettingen (Germany) from 14th to 18th April.
    During the dinner, I met Samba Team, OpenChange Team and sponsors people.

  • Day 2 :: Workshop
  • I had a really interesting discussion with the folks of Samba about Protocol Freedom Information Foundation (PFIF).

    My main question was : What’s the difference between semi-private documentation provided by PFIF since December 2007 and public documentation provided by MSDN since March?
    Technically, the content is the same. But if you look the law part PFIF grants extra patents protections.
    For instance, if someone uses PFIF docs then Microsoft has a limited number of patents they can assert against the developer but if he uses MSDN docs then he doesn’t have patent protection.

    I strongly recommend you to read links I posted above. That’s really an impressive work they did since 1992.

  • Day 3 :: Tutorials
  • Weather in Germany is cold! I even wonder if it’s colder than North France one.

    During the dinner, I had the occasion to meet Tom Hanrahan from Port 25 (MSFT) who works as Director of Linux Interoperability.

    I’d like to share an interesting reference from Dan to a speech of Eben Moglen about “The Global Software Industry in Transformation: After GPLv3″. (Audio, Txt).

  • Day 4 :: Conference
  • Andrew Tridgell (Samba Team), Samba and the PFIF renamed Samba and Microsoft to focus on new relationship between Samba and Microsoft engineers.

    Andrew gave a quick review of the relationship with Microsoft timeline from early 90’s to now including the antitrust action in Europe during (99 – 07), WSPP/PFIF agreement (late 2007) to actual open cooperation publicly release of documentation MSDN (MSFT interoperability initiative).

    PFIF (Protocol Freedom information foundation) has been introduced. For people who never heard about PFIF, it’s a legal entity that allows free software projects to take advantage of the WSPP protocol program. It makes protocol documentation available under a NDA but compatible with GPL. With an additional guarantees provided for at least 5 years of updates and corrections. Andrew also talked about the recent errors discovered in the documentation and the fact that Microsoft is now close to developers to fix it.

    As you probably know, WSPP and MCPP documents are now public under a liberal license. It means Samba can now build an open community for cooperation on protocol knowledge. All previous secret on WSPP/PFIF is finished because the documentation is now available to everyone. PFIF also provides some additional guarantees on documentation updates and corrections.

    As Andrew said, it means a good technical cooperation because lawyers are now sidelined and engineers have taken over. He also mentioned there is now a public forum for protocol discussion where PFIF members and MS Engineers can talk.

    Tridge also highlighted two notable events for 2008:

      Samba’ll be participing file system plugfest at Microsoft in June.
      Microsoft will actively participate in the CIFS plugfest in August.

    Julien Kerihuel (OpenChange): When OpenChange assimilates the Borg
    OpenChange is 5 years old project build over Samba 4 infrastructure, two members of Openchange belong to Samba Team. Julien mostly talks about the libmapi client implementation This library provides an interface for NSPI & EMSMDB protocol.

    *Party!*

  • Day 5 :: Conference
  • This day is composed of three simultaneous room for three simultaneous talks.

    There is a presentation I really appreciated, entitled Samba Encryption by Jeremy Allison (Google & Samba Team). The talk was about SMB protocol internal and some programming stuff.

    Few words about Microsoft interoperability initiative.

    As you probably know, Microsoft released last month several thousands pages of documentation about office file format and Windows protocols.

    It means numerous hundreds(thousands?) of functions/algorithms documentation and pseudo-code. But, are these pseudo-function right? It looks not.

    While I was reading [MS-DRSR]: Directory Replication Service (DRS) Remote Protocol Specification, I was a bit curious to see the DecompressWin2k3() function (Thanks Aaron, Stefan , and Brendan).

    This function is in fact the decompression algorithm called Xpress implemented for the first time in Windows XP and not Windows 2003 as say the name. Xpress algorithm works on 64kb chunks and is used in Windows hibernation file format, Windows Imaging Format (WIM) , Outlook, Exchange, and… LDAP replication service of Active Directory.

    I’m quoting below, errors I found in the pseudo-code of DecompressWin2k3(). Here is the C implementation.

    while (outputIndex < = outputSize) 
    should be:
    while (outputIndex < outputSize) 
        if (indicatorBit = 0) then 
            indicatorBit := copy inputBuffer[inputIndex] as 32-bit integer in 
            little-endian format 
            should be:
            indicator := copy inputBuffer[inputIndex] as 32-bit integer in 
            little-endian format 
            inputIndex := inputIndex + 4 
            indicatorBit := 32 
        endif 
    
        indicatorBit := indicatorBit - 1 
    
    //* check whether the bit specified by indicatorBit is set or not 
    //* set in indicator. For example, if indicatorBit has value 4 
    //* check whether the 4th bit of the value in indicator is set  
    
        if indicatorBit bit in indicator is not set then 
            inputBuffer[inputIndex] := outputBuffer[outputIndex]
            should be:
            outputBuffer[outputIndex] := inputBuffer[inputIndex] 
            inputIndex := inputIndex + 1 
            outputIndex := outputIndex + 1 
        else 
            length := copy inputBuffer[inputIndex] as 16-bit integer in 
            little-endian format 
            inputIndex := inputIndex + 2 
            offset := length /8 
            length := length mod 8 
    
            if (length = 7) then 
    
                if (nibbleIndex = 0) then 
                    nibbleIndex := inputIndex 
                    length := inputBuffer[inputIndex] mod 16 
                    inputIndex := inputIndex + 1 
                else 
                    length := inputBuffer[inputIndex] / 16 
                    should be:
                    length := inputBuffer[nibbleIndex ] / 16 
                    nibbleIndex := 0 
                endif 
    
                if (length = 15) then 
    
                    length := inputBuffer[inputIndex] 
                    inputIndex := inputIndex + 1 
    
                        if (length = 255) then 
                            length := copy inputBuffer[inputIndex] as 16-bit integer in little-endian format 
                            inputIndex := inputIndex + 2 
                            length := length - (15 + 7) 
                        endif 
                    length := length + 15 
                endif 
    
                length := length + 7 
    
            endif 
    
        length := length + 3 
    
            while (not length = 0) 
            should be:
            while (length != 0) 
                outputBuffer[outputIndex] := outputBuffer[outputIndex - offset - 1] 
                outputIndex := outputIndex + 1 
                length := length - 1 
            endwhile 
        endif 
    
    endwhile 
    
    return